syzbot


KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (9)

Status: moderation: reported on 2024/06/11 17:26
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+8bce3dd851b881dbbaa8@syzkaller.appspotmail.com
First crash: 37d, last: 16h00m
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (8) exfat 1 145d 145d 0/27 auto-obsoleted due to no activity on 2024/03/30 16:35
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (4) ext4 5 1307d 1319d 0/27 auto-closed as invalid on 2021/01/23 11:44
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers exfat 8 1632d 1701d 0/27 auto-closed as invalid on 2020/04/08 22:27
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (3) exfat 10 1393d 1485d 0/27 auto-closed as invalid on 2020/10/29 18:32
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (7) exfat 42 195d 223d 0/27 auto-obsoleted due to no activity on 2024/02/03 09:04
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (2) exfat 1 1522d 1522d 0/27 closed as invalid on 2020/06/18 14:13
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (6) exfat 174 316d 957d 0/27 auto-obsoleted due to no activity on 2023/10/11 19:19
upstream KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers (5) exfat 32 997d 1225d 0/27 auto-closed as invalid on 2021/11/29 11:14

Sample crash report:
loop0: detected capacity change from 0 to 8192
==================================================================
BUG: KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers

write to 0xffff88810576c260 of 8 bytes by task 5201 on cpu 1:
 __remove_assoc_queue fs/buffer.c:514 [inline]
 fsync_buffers_list fs/buffer.c:789 [inline]
 sync_mapping_buffers+0x162/0x7e0 fs/buffer.c:575
 fat_file_fsync+0xad/0x100 fs/fat/file.c:195
 vfs_fsync_range+0x122/0x140 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2816 [inline]
 generic_file_write_iter+0x191/0x1d0 mm/filemap.c:4141
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/0x950 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1356 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0xbd/0x150 fs/read_write.c:1348
 x64_sys_call+0xed5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810576c260 of 8 bytes by task 5191 on cpu 0:
 mark_buffer_dirty_inode+0x96/0x1c0 fs/buffer.c:678
 fat16_ent_put+0x4f/0x60 fs/fat/fatent.c:184
 fat_ent_write+0x66/0xe0 fs/fat/fatent.c:417
 fat_chain_add+0x15f/0x400 fs/fat/misc.c:136
 fat_add_cluster fs/fat/inode.c:112 [inline]
 __fat_get_block fs/fat/inode.c:154 [inline]
 fat_get_block+0x46b/0x5e0 fs/fat/inode.c:189
 __block_write_begin_int+0x417/0xfa0 fs/buffer.c:2125
 __block_write_begin fs/buffer.c:2174 [inline]
 block_write_begin+0x7b/0x170 fs/buffer.c:2233
 cont_write_begin+0x486/0x6b0 fs/buffer.c:2585
 fat_write_begin+0x61/0xf0 fs/fat/inode.c:229
 generic_perform_write+0x1d5/0x410 mm/filemap.c:4016
 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4111
 generic_file_write_iter+0x7d/0x1d0 mm/filemap.c:4137
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x78f/0x900 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27dd/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888106ce0808 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5191 Comm: syz.0.581 Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/18 15:08 upstream b1bc554e009e 71884c12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/07/18 15:07 upstream b1bc554e009e 71884c12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/07/02 15:23 upstream 1dfe225e9af5 07f0a0a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/07/01 14:39 upstream 22a40d14b572 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/25 03:11 upstream 626737a5791b 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/24 11:52 upstream f2661062f16b edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/21 09:02 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/20 05:08 upstream e5b3efbe1ab1 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/19 12:07 upstream 92e5605a199e 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/13 17:18 upstream 2ccbdf43d5e7 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/11 17:26 upstream 83a7eefedc9b b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
2024/06/11 17:25 upstream 83a7eefedc9b b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mark_buffer_dirty_inode / sync_mapping_buffers
* Struck through repros no longer work on HEAD.