syzbot


KCSAN: data-race in fat_bmap / generic_write_end (6)

Status: auto-obsoleted due to no activity on 2024/01/14 23:13
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+65464efd1087dc110d9d@syzkaller.appspotmail.com
First crash: 176d, last: 82d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fat_bmap / generic_write_end exfat 1 1230d 1230d 0/26 auto-closed as invalid on 2020/11/23 09:14
upstream KCSAN: data-race in fat_bmap / generic_write_end (3) exfat 12 652d 801d 0/26 auto-closed as invalid on 2022/06/24 01:02
upstream KCSAN: data-race in fat_bmap / generic_write_end (4) exfat 1 593d 593d 0/26 auto-closed as invalid on 2022/08/21 21:59
upstream KCSAN: data-race in fat_bmap / generic_write_end (7) exfat 5 8d08h 11d 0/26 moderation: reported on 2024/02/20 17:32
upstream KCSAN: data-race in fat_bmap / generic_write_end (5) exfat 2 445d 462d 0/26 auto-obsoleted due to no activity on 2023/01/17 16:08
upstream KCSAN: data-race in fat_bmap / generic_write_end (2) exfat 2 921d 943d 0/26 auto-closed as invalid on 2021/09/28 00:29

Sample crash report:
loop5: detected capacity change from 0 to 128
==================================================================
BUG: KCSAN: data-race in fat_bmap / generic_write_end

write to 0xffff88813d4adc30 of 8 bytes by task 20848 on cpu 1:
 i_size_write include/linux/fs.h:932 [inline]
 generic_write_end+0x94/0x230 fs/buffer.c:2291
 fat_write_end+0x4e/0x160 fs/fat/inode.c:244
 generic_perform_write+0x267/0x410 mm/filemap.c:3929
 __generic_file_write_iter+0xec/0x120 mm/filemap.c:4010
 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4039
 do_iter_write+0x4ad/0x770 fs/read_write.c:860
 vfs_iter_write+0x56/0x70 fs/read_write.c:901
 iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
 do_splice_from fs/splice.c:933 [inline]
 direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
 splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
 do_splice_direct+0x10d/0x190 fs/splice.c:1194
 do_sendfile+0x3c4/0x980 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1322 [inline]
 __se_sys_sendfile64 fs/read_write.c:1308 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88813d4adc30 of 8 bytes by task 20826 on cpu 0:
 i_size_read include/linux/fs.h:910 [inline]
 is_exceed_eof fs/fat/cache.c:340 [inline]
 fat_bmap+0x1d2/0x290 fs/fat/cache.c:375
 __fat_get_block fs/fat/inode.c:129 [inline]
 fat_get_block+0xd1/0x5e0 fs/fat/inode.c:190
 block_read_full_folio+0x27a/0x710 fs/buffer.c:2399
 do_mpage_readpage+0xc38/0xd80 fs/mpage.c:324
 mpage_read_folio+0x5b/0xd0 fs/mpage.c:399
 fat_read_folio+0x1c/0x20 fs/fat/inode.c:205
 filemap_read_folio mm/filemap.c:2323 [inline]
 filemap_update_page mm/filemap.c:2407 [inline]
 filemap_get_pages+0xcfd/0xf90 mm/filemap.c:2521
 filemap_splice_read+0x238/0x7f0 mm/filemap.c:2860
 vfs_splice_read fs/splice.c:993 [inline]
 splice_direct_to_actor+0x28c/0x690 fs/splice.c:1069
 do_splice_direct+0x10d/0x190 fs/splice.c:1194
 do_sendfile+0x3c4/0x980 fs/read_write.c:1254
 __do_sys_sendfile64 fs/read_write.c:1316 [inline]
 __se_sys_sendfile64 fs/read_write.c:1308 [inline]
 __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1308
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000005000 -> 0x00000000000050ee

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 20826 Comm: syz-executor.5 Not tainted 6.7.0-rc4-syzkaller-00424-gc527f5606aa5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/10 23:13 upstream c527f5606aa5 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/11/14 04:50 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/11/06 07:05 upstream 77fa2fbe87fc 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/10/15 13:19 upstream 9a3dad63edbe f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/10/09 23:31 upstream 94f6f0550c62 3c53c7d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/09/30 01:03 upstream 71e58659bfc0 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
2023/09/08 10:46 upstream 4a0fc73da97e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fat_bmap / generic_write_end
* Struck through repros no longer work on HEAD.