Re: [PATCH v1] exfat: fix the infinite loop in exfat_readdir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 16, 2024 at 12:37 PM Yuezhang.Mo@xxxxxxxx
<Yuezhang.Mo@xxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzkaller.appspot.com/bug?extid=205c2644abdff9d3f9fc
> Tested-by: syzbot+205c2644abdff9d3f9fc@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: ca06197382bd ("exfat: add directory operations")
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>
Applied it to #dev.
Thanks!





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux