Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/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
dir.c
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
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
Makefile
misc.c fatfs: use common time_to_tm in fat_time_unix2fat() 2009-12-16 07:20:06 -08:00
namei_msdos.c
namei_vfat.c fat: fix buffer overflow in vfat_create_shortname() 2010-03-31 10:34:11 -07:00