summaryrefslogtreecommitdiff
path: root/fs/exfat/file.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-06-11 03:40:24 +0300
committerNamjae Jeon <namjae.jeon@samsung.com>2021-07-04 03:33:00 +0300
commit1e5654de0f51890f88abd409ebf4867782431e81 (patch)
treef91e332eb9a2139f308a5226f11415e914e102ca /fs/exfat/file.c
parent839a534f1e853f1aec100d06040c0037b89c2dc3 (diff)
downloadlinux-1e5654de0f51890f88abd409ebf4867782431e81.tar.xz
exfat: handle wrong stream entry size in exfat_readdir()
The compatibility issue between linux exfat and exfat of some camera company was reported from Florian. In their exfat, if the number of files exceeds any limit, the DataLength in stream entry of the directory is no longer updated. So some files created from camera does not show in linux exfat. because linux exfat doesn't allow that cpos becomes larger than DataLength of stream entry. This patch check DataLength in stream entry only if the type is ALLOC_NO_FAT_CHAIN and add the check ensure that dentry offset does not exceed max dentries size(256 MB) to avoid the circular FAT chain issue. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org # v5.9 Reported-by: Florian Cramer <flrncrmr@gmail.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Tested-by: Chris Down <chris@chrisdown.name> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/file.c')
0 files changed, 0 insertions, 0 deletions