syzbot


KCSAN: data-race in shmem_getattr / shmem_recalc_inode

Status: moderation: reported on 2024/07/04 23:41
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+dfb578404df369f6599b@syzkaller.appspotmail.com
First crash: 139d, last: 23h20m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in shmem_getattr / shmem_recalc_inode

read-write to 0xffff8881160c1180 of 8 bytes by task 13763 on cpu 0:
 shmem_recalc_inode+0x36/0x1b0 mm/shmem.c:442
 shmem_alloc_and_add_folio mm/shmem.c:1871 [inline]
 shmem_get_folio_gfp+0x7ce/0xd90 mm/shmem.c:2335
 shmem_get_folio mm/shmem.c:2441 [inline]
 shmem_write_begin+0xa2/0x180 mm/shmem.c:3094
 generic_perform_write+0x1a8/0x4a0 mm/filemap.c:4056
 shmem_file_write_iter+0xc2/0xe0 mm/shmem.c:3269
 __kernel_write_iter+0x24b/0x4e0 fs/read_write.c:612
 dump_emit_page fs/coredump.c:884 [inline]
 dump_user_range+0x3ac/0x550 fs/coredump.c:945
 elf_core_dump+0x1b66/0x1c60 fs/binfmt_elf.c:2127
 do_coredump+0x1736/0x1ce0 fs/coredump.c:758
 get_signal+0xd4f/0x1000 kernel/signal.c:3001
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 irqentry_exit_to_user_mode+0xa7/0x120 kernel/entry/common.c:231
 irqentry_exit+0x12/0x50 kernel/entry/common.c:334
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffff8881160c1180 of 8 bytes by task 3314 on cpu 1:
 shmem_getattr+0x42/0x200 mm/shmem.c:1162
 vfs_getattr_nosec fs/stat.c:208 [inline]
 vfs_getattr fs/stat.c:246 [inline]
 vfs_statx_path+0x171/0x2d0 fs/stat.c:283
 vfs_statx+0xe1/0x170 fs/stat.c:347
 vfs_fstatat fs/stat.c:366 [inline]
 __do_sys_newfstatat fs/stat.c:530 [inline]
 __se_sys_newfstatat+0xdc/0x300 fs/stat.c:524
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:524
 x64_sys_call+0x236d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:263
 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: 0x0000000000002d13 -> 0x0000000000002d14

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3314 Comm: syz-executor Tainted: G        W          6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (30):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 07:20 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/18 18:33 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/15 10:41 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/12 07:29 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/11 17:45 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/08 16:12 upstream 906bd684e4b1 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/07 16:43 upstream ff7afaeca1a1 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/04 03:01 upstream a33ab3f94f51 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/11/03 19:05 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/10/21 23:02 upstream d12937763990 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/10/19 20:02 upstream 3d5ad2d4eca3 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/10/12 19:28 upstream 09f6b0c8904b 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/10/08 02:25 upstream 87d6aab2389e d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/10/04 08:16 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/09/26 15:12 upstream 11a299a7933e 0d19f247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/09/25 19:48 upstream 684a64bf32b6 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/09/24 04:43 upstream 18ba6034468e 89298aad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/09/12 23:52 upstream fdf042df0463 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/09/05 16:09 upstream c763c4339688 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/08/20 23:00 upstream 521b1e7f4cf0 9f0ab3fb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/08/18 07:18 upstream 810996a36309 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/08/16 13:40 upstream d7a5aa4b3c00 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/08/13 12:36 upstream d74da846046a 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/08/09 12:02 upstream ee9a43b7cfe2 a83d9288 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/31 17:53 upstream e4fc196f5ba3 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/27 00:50 upstream 2f8c4f506285 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/17 05:52 upstream 0434dbe32053 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/13 11:08 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/10 14:03 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
2024/07/04 23:41 upstream 661e504db04c 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_getattr / shmem_recalc_inode
* Struck through repros no longer work on HEAD.