[moderation] [exfat?] KCSAN: data-race in fat_alloc_clusters / fat_clusters_flush

1 view
Skip to first unread message

syzbot

unread,
6:26 AM (16 hours ago) 6:26 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b6151c4e60e5 Merge tag 'erofs-for-6.19-rc5-fixes' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1490e19a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c160236e1ef1e401
dashboard link: https://syzkaller.appspot.com/bug?extid=56be2a55de6142438317
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [hiro...@mail.parknet.co.jp linki...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org sj155...@samsung.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/39e707a231a5/disk-b6151c4e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/63580ec462ab/vmlinux-b6151c4e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6503ebc38c29/bzImage-b6151c4e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+56be2a...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in fat_alloc_clusters / fat_clusters_flush

write to 0xffff88811b3ea0a8 of 4 bytes by task 5505 on cpu 0:
fat_alloc_clusters+0x630/0xa80 fs/fat/fatent.c:509
fat_add_cluster fs/fat/inode.c:108 [inline]
__fat_get_block fs/fat/inode.c:155 [inline]
fat_get_block+0x258/0x5e0 fs/fat/inode.c:190
__block_write_begin_int+0x400/0xf90 fs/buffer.c:2145
block_write_begin fs/buffer.c:2256 [inline]
cont_write_begin+0x5ff/0x970 fs/buffer.c:2594
fat_write_begin+0x4f/0xe0 fs/fat/inode.c:230
generic_perform_write+0x184/0x490 mm/filemap.c:4314
__generic_file_write_iter+0x9e/0x120 mm/filemap.c:4431
generic_file_write_iter+0x8d/0x2f0 mm/filemap.c:4457
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x52a/0x960 fs/read_write.c:686
ksys_write+0xda/0x1a0 fs/read_write.c:738
__do_sys_write fs/read_write.c:749 [inline]
__se_sys_write fs/read_write.c:746 [inline]
__x64_sys_write+0x40/0x50 fs/read_write.c:746
x64_sys_call+0x2847/0x3000 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811b3ea0a8 of 4 bytes by task 52 on cpu 1:
fat_clusters_flush+0x15a/0x210 fs/fat/misc.c:94
fat_write_inode+0x73/0xd0 fs/fat/inode.c:922
write_inode fs/fs-writeback.c:1582 [inline]
__writeback_single_inode+0x324/0x7c0 fs/fs-writeback.c:1802
writeback_sb_inodes+0x4b0/0xb20 fs/fs-writeback.c:2030
wb_writeback+0x252/0x5c0 fs/fs-writeback.c:2216
wb_do_writeback fs/fs-writeback.c:2363 [inline]
wb_workfn+0x194/0x910 fs/fs-writeback.c:2403
process_one_work kernel/workqueue.c:3257 [inline]
process_scheduled_works+0x4ce/0x9d0 kernel/workqueue.c:3340
worker_thread+0x582/0x770 kernel/workqueue.c:3421
kthread+0x489/0x510 kernel/kthread.c:463
ret_from_fork+0x149/0x290 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

value changed: 0x0000001b -> 0x0000001c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 52 Comm: kworker/u8:3 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Workqueue: writeback wb_workfn (flush-7:4)
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages