JIRA: https://issues.redhat.com/browse/RHEL-75663
CVE: CVE-2024-57940
commit fee873761bd978d077d8c55334b4966ac4cb7b59
Author: Yuezhang Mo <Yuezhang.Mo@sony.com>
Date: Fri Dec 13 13:08:37 2024 +0800
exfat: fix the infinite loop in exfat_readdir()
If the file system is corrupted so that a cluster is linked to
itself in the cluster chain, and there is an unused directory
entry in the cluster, 'dentry' will not be incremented, causing
condition 'dentry < max_dentries' unable to prevent an infinite
loop.
This infinite loop causes s_lock not to be released, and other
tasks will hang, such as exfat_sync_fs().
This commit stops traversing the cluster chain when there is unused
directory entry in the cluster to avoid this infinite loop.
Reported-by: syzbot+205c2644abdff9d3f9fc@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=205c2644abdff9d3f9fc
Tested-by: syzbot+205c2644abdff9d3f9fc@syzkaller.appspotmail.com
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
balloc.c | ||
cache.c | ||
dir.c | ||
exfat_fs.h | ||
exfat_raw.h | ||
fatent.c | ||
file.c | ||
inode.c | ||
misc.c | ||
namei.c | ||
nls.c | ||
super.c |