Commit 3ddd1cb2 authored by Yuezhang Mo's avatar Yuezhang Mo Committed by Greg Kroah-Hartman
Browse files

exfat: fix out-of-bounds access of directory entries



commit 184fa506 upstream.

In the case of the directory size is greater than or equal to
the cluster size, if start_clu becomes an EOF cluster(an invalid
cluster) due to file system corruption, then the directory entry
where ei->hint_femp.eidx hint is outside the directory, resulting
in an out-of-bounds access, which may cause further file system
corruption.

This commit adds a check for start_clu, if it is an invalid cluster,
the file or directory will be treated as empty.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarYuezhang Mo <Yuezhang.Mo@sony.com>
Co-developed-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c500b0cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment