Skip to content
Snippets Groups Projects
Commit d23f2621 authored by Yuezhang Mo's avatar Yuezhang Mo Committed by Greg Kroah-Hartman
Browse files

exfat: fix the infinite loop in __exfat_free_cluster()


[ Upstream commit a5324b3a ]

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: default avatar <syzbot+1de5a37cb85a2d536330@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=1de5a37cb85a2d536330


Tested-by: default avatar <syzbot+1de5a37cb85a2d536330@syzkaller.appspotmail.com>
Fixes: 31023864 ("exfat: add fat entry operations")
Signed-off-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 31beabd0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment