Re: [PATCH v2] exfat: add cluster chain loop check for dir

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

 



On Sat, Jul 5, 2025 at 5:24 PM Yuezhang.Mo@xxxxxxxx
<Yuezhang.Mo@xxxxxxxx> wrote:
>
> An infinite loop may occur if the following conditions occur due to
> file system corruption.
>
> (1) Condition for exfat_count_dir_entries() to loop infinitely.
>     - The cluster chain includes a loop.
>     - There is no UNUSED entry in the cluster chain.
>
> (2) Condition for exfat_create_upcase_table() to loop infinitely.
>     - The cluster chain of the root directory includes a loop.
>     - There are no UNUSED entry and up-case table entry in the cluster
>       chain of the root directory.
>
> (3) Condition for exfat_load_bitmap() to loop infinitely.
>     - The cluster chain of the root directory includes a loop.
>     - There are no UNUSED entry and bitmap entry in the cluster chain
>       of the root directory.
>
> (4) Condition for exfat_find_dir_entry() to loop infinitely.
>     - The cluster chain includes a loop.
>     - The unused directory entries were exhausted by some operation.
>
> (5) Condition for exfat_check_dir_empty() to loop infinitely.
>     - The cluster chain includes a loop.
>     - The unused directory entries were exhausted by some operation.
>     - All files and sub-directories under the directory are deleted.
>
> This commit adds checks to break the above infinite loop.
>
> 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