syzbot


KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr (5)

Status: moderation: reported on 2024/07/05 14:13
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+001e0f4dc8703945a00f@syzkaller.appspotmail.com
First crash: 138d, last: 3h22m
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr (2) mm 4 1154d 1216d 0/28 auto-closed as invalid on 2021/10/28 10:08
upstream KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr (3) mm 1 1088d 1088d 0/28 auto-closed as invalid on 2022/01/02 06:59
upstream KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr (4) mm 1 983d 983d 0/28 auto-closed as invalid on 2022/04/17 18:38
upstream KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr mm 2 1265d 1269d 0/28 auto-closed as invalid on 2021/07/10 05:40

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

read-write to 0xffff888107ea5f58 of 8 bytes by task 11667 on cpu 1:
 shmem_add_to_page_cache+0x3b9/0x4b0 mm/shmem.c:825
 shmem_alloc_and_add_folio mm/shmem.c:1839 [inline]
 shmem_get_folio_gfp+0x4f6/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 0xffff888107ea5f58 of 8 bytes by task 3710 on cpu 0:
 shmem_getattr+0x69/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: 0x0000000000001405 -> 0x0000000000001406

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3710 Comm: syz-executor Not tainted 6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (27):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/21 03:07 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/19 23:28 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/16 14:11 upstream e8bdb3c8be08 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/12 06:47 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/09 22:40 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/08 08:54 upstream 906bd684e4b1 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/03 03:44 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/11/01 05:45 upstream 5635f189425e 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/27 15:05 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/11 19:01 upstream 1d227fcc7222 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/07 21:21 upstream 87d6aab2389e d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/07 08:41 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/03 19:46 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/10/03 06:34 upstream f23aa4c0761a a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/09/12 21:37 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/09/01 20:50 upstream 431c1646e1f8 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/08/24 11:50 upstream 60f0560f53e3 d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/08/15 22:09 upstream 1fb918967b56 e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/08/11 12:30 upstream 5189dafa4cf9 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/08/07 02:19 upstream eb5e56d14912 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/08/03 13:16 upstream 17712b7ea075 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/28 05:12 upstream ff30564411ff 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/26 20:30 upstream 2f8c4f506285 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/22 20:58 upstream 933069701c1b df655b64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/18 22:09 upstream b1bc554e009e 71884c12 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/15 14:33 upstream 0c3836482481 c605e6a2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
2024/07/05 14:13 upstream 661e504db04c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_add_to_page_cache / shmem_getattr
* Struck through repros no longer work on HEAD.