1
linux/fs/fat
Nikolaus Schulz 30d1872d9e fat: fix buffer overflow in vfat_create_shortname()
When using the string representation of a random counter as part of the base
name, ensure that it is no longer than 4 bytes.

Since we are repeatedly decrementing the counter in a loop until we have found a
unique base name, the counter may wrap around zero; therefore, it is not enough
to mask its higher bits before entering the loop, this must be done inside the
loop.

[hirofumi@mail.parknet.co.jp: use snprintf()]
Signed-off-by: Nikolaus Schulz <microschulz@web.de>
Cc: stable@kernel.org
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-31 10:34:11 -07:00
..
cache.c FAT: add 'errors' mount option 2009-06-04 02:34:51 +09:00
dir.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
fat.h fat: make discard a mount option 2009-11-21 20:36:52 +09:00
fatent.c fat: make discard a mount option 2009-11-21 20:36:52 +09:00
file.c fat: Opencode sync_page_range_nolock() 2009-09-14 17:08:17 +02:00
inode.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6 2010-03-12 16:35:21 -08:00
Kconfig vfat: Note the NLS requirement 2009-04-17 09:32:11 -07:00
Makefile fat: move fs/vfat/* and fs/msdos/* to fs/fat 2008-11-06 15:41:20 -08:00
misc.c fatfs: use common time_to_tm in fat_time_unix2fat() 2009-12-16 07:20:06 -08:00
namei_msdos.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
namei_vfat.c fat: fix buffer overflow in vfat_create_shortname() 2010-03-31 10:34:11 -07:00