summaryrefslogtreecommitdiff
path: root/lib/fault-inject-usercopy.c
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2025-08-30 14:44:35 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2025-09-30 13:34:42 +0900
commit79c1587b6cda74deb0c86fc7ba194b92958c793c (patch)
tree313c01db9ecbe6c30ea5aeb61c1ddb1d4916b139 /lib/fault-inject-usercopy.c
parent6dfba108387bf4e71411b3da90b2d5cce48ba054 (diff)
exfat: validate cluster allocation bits of the allocation bitmap
syzbot created an exfat image with cluster bits not set for the allocation bitmap. exfat-fs reads and uses the allocation bitmap without checking this. The problem is that if the start cluster of the allocation bitmap is 6, cluster 6 can be allocated when creating a directory with mkdir. exfat zeros out this cluster in exfat_mkdir, which can delete existing entries. This can reallocate the allocated entries. In addition, the allocation bitmap is also zeroed out, so cluster 6 can be reallocated. This patch adds exfat_test_bitmap_range to validate that clusters used for the allocation bitmap are correctly marked as in-use. Reported-by: syzbot+a725ab460fc1def9896f@syzkaller.appspotmail.com Tested-by: syzbot+a725ab460fc1def9896f@syzkaller.appspotmail.com Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'lib/fault-inject-usercopy.c')
0 files changed, 0 insertions, 0 deletions