vfs-7.3-rc1.fat

Please consider pulling these changes from the signed vfs-7.3-rc1.fat tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCan7RJAAKCRCRxhvAZXjc
 onKkAP40wNdwV6l2ve+dioDeEAd7L8hBANbh6X6p7s8s1WUaQAEAtdq8PsA2UqBy
 RjS/Mj5X+MTttydrrp3A7FQdhf5/lwQ=
 =DHKe
 -----END PGP SIGNATURE-----

Merge tag 'vfs-7.3-rc1.fat' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull FAT update from Christian Brauner:
 "This rejects names longer than NAME_MAX in msdos_format_name().

  The VFS only enforces PATH_MAX rather than the length of an individual
  component. open() on such a path component reported success for a name
  far longer than NAME_MAX"

* tag 'vfs-7.3-rc1.fat' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fat: reject name longer than NAME_MAX in msdos_format_name()
This commit is contained in:
Linus Torvalds 2026-08-17 09:30:42 -07:00
commit 3d1f952677

View File

@ -29,6 +29,9 @@ static int msdos_format_name(const unsigned char *name, int len,
unsigned char c;
int space;
if (len > NAME_MAX)
return -ENAMETOOLONG;
if (name[0] == '.') { /* dotfile because . and .. already done */
if (opts->dotsOK) {
/* Get rid of dot - test for it elsewhere */