diff options
author | Sungjong Seo <sj1557.seo@samsung.com> | 2022-12-29 12:52:38 +0100 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2023-02-27 13:14:45 +0100 |
commit | bdaadfd343e3cba49ad0b009ff4b148dad0fa404 (patch) | |
tree | d61b1fbe8bac61e2630ddd2590c5fc80420fca96 /fs/exfat/namei.c | |
parent | exfat: fix reporting fs error when reading dir beyond EOF (diff) | |
download | linux-bdaadfd343e3cba49ad0b009ff4b148dad0fa404.tar.xz linux-bdaadfd343e3cba49ad0b009ff4b148dad0fa404.zip |
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: 1acf1a564b60 ("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>
Diffstat (limited to 'fs/exfat/namei.c')
0 files changed, 0 insertions, 0 deletions