This is a note to let you know that I've just added the patch titled exfat: redefine DIR_DELETED as the bad cluster number to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: exfat-redefine-dir_deleted-as-the-bad-cluster-number.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From bdaadfd343e3cba49ad0b009ff4b148dad0fa404 Mon Sep 17 00:00:00 2001 From: Sungjong Seo <sj1557.seo@xxxxxxxxxxx> Date: Thu, 29 Dec 2022 20:52:38 +0900 Subject: exfat: redefine DIR_DELETED as the bad cluster number From: Sungjong Seo <sj1557.seo@xxxxxxxxxxx> commit bdaadfd343e3cba49ad0b009ff4b148dad0fa404 upstream. 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@xxxxxxxxxxxxxxx # v5.7+ Reported-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx> Signed-off-by: Sungjong Seo <sj1557.seo@xxxxxxxxxxx> Signed-off-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/exfat/exfat_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -42,7 +42,7 @@ enum { #define ES_2_ENTRIES 2 #define ES_ALL_ENTRIES 0 -#define DIR_DELETED 0xFFFF0321 +#define DIR_DELETED 0xFFFFFFF7 /* type values */ #define TYPE_UNUSED 0x0000 Patches currently in stable-queue which might be from sj1557.seo@xxxxxxxxxxx are queue-5.15/exfat-fix-reporting-fs-error-when-reading-dir-beyond-eof.patch queue-5.15/exfat-fix-unexpected-eof-while-reading-dir.patch queue-5.15/exfat-redefine-dir_deleted-as-the-bad-cluster-number.patch