1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
linux/fs/exfat
Yuezhang Mo a5324b3a48 exfat: fix the infinite loop in __exfat_free_cluster()
In __exfat_free_cluster(), the cluster chain is traversed until the
EOF cluster. If the cluster chain includes a loop due to file system
corruption, the EOF cluster cannot be traversed, resulting in an
infinite loop.

This commit uses the total number of clusters to prevent this infinite
loop.

Reported-by: syzbot+1de5a37cb85a2d536330@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1de5a37cb85a2d536330
Tested-by: syzbot+1de5a37cb85a2d536330@syzkaller.appspotmail.com
Fixes: 31023864e6 ("exfat: add fat entry operations")
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2024-12-31 17:51:21 +09:00
..
balloc.c exfat: fix memory leak in exfat_load_bitmap() 2024-09-18 07:40:58 +09:00
cache.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dir.c exfat: fix the infinite loop in exfat_readdir() 2024-12-31 17:49:40 +09:00
exfat_fs.h exfat: reduce FAT chain traversal 2024-11-25 17:08:27 +09:00
exfat_raw.h exfat: add ioctls for accessing attributes 2023-10-31 10:00:51 +09:00
fatent.c exfat: fix the infinite loop in __exfat_free_cluster() 2024-12-31 17:51:21 +09:00
file.c exfat: fix the new buffer was not zeroed before writing 2024-12-31 17:51:16 +09:00
inode.c exfat: add exfat_get_dentry_set_by_ei() helper 2024-11-25 17:08:23 +09:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
misc.c exfat: convert to new timestamp accessors 2023-10-18 13:26:21 +02:00
namei.c exfat: fix exfat_find_empty_entry() not returning error on failure 2024-12-17 20:21:59 +09:00
nls.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
super.c exfat: Implement sops->shutdown and ioctl 2024-09-18 07:40:56 +09:00