linux/fs/exfat
Sungjong Seo bdaadfd343 exfat: redefine DIR_DELETED as the bad cluster number
When a file or a directory is deleted, the hint for the cluster of
its parent directory in its in-memory inode is set as DIR_DELETED.
Therefore, DIR_DELETED must be one of invalid cluster numbers. According
to the exFAT specification, a volume can have at most 2^32-11 clusters.
However, DIR_DELETED is wrongly defined as 0xFFFF0321, which could be
a valid cluster number. To fix it, let's redefine DIR_DELETED as
0xFFFFFFF7, the bad cluster number.

Fixes: 1acf1a564b ("exfat: add in-memory and on-disk structures and headers")
Cc: stable@vger.kernel.org # v5.7+
Reported-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2023-02-27 21:14:45 +09:00
..
balloc.c exfat: check if cluster num is valid 2022-05-23 11:17:30 +09:00
cache.c exfat: fix use of uninitialized spinlock on error path 2020-10-07 14:27:13 +09:00
dir.c exfat: fix reporting fs error when reading dir beyond EOF 2023-02-27 21:14:45 +09:00
exfat_fs.h exfat: redefine DIR_DELETED as the bad cluster number 2023-02-27 21:14:45 +09:00
exfat_raw.h exfat: fix shift-out-of-bounds in exfat_fill_super() 2021-02-22 09:55:13 +09:00
fatent.c exfat: fix overflow for large capacity partition 2022-09-04 09:38:40 +09:00
file.c exfat: remove i_size_write() from __exfat_truncate() 2022-12-12 11:02:51 +09:00
inode.c Description for this pull request: 2022-12-15 18:14:21 -08:00
Kconfig exfat: Improve wording of EXFAT_DEFAULT_IOCHARSET config option 2020-06-09 16:48:39 +09:00
Makefile exfat: add Kconfig and Makefile 2020-03-05 21:00:40 -05:00
misc.c exfat: Expand exfat_err() and co directly to pr_*() macro 2022-08-01 10:14:07 +09:00
namei.c exfat: remove unnecessary arguments from exfat_find_dir_entry() 2022-12-12 11:02:50 +09:00
nls.c exfat: Drop superfluous new line for error messages 2022-08-01 10:14:07 +09:00
super.c exfat: Drop superfluous new line for error messages 2022-08-01 10:14:07 +09:00