syzbot


KCSAN: data-race in __d_instantiate / path_openat

Status: moderation: reported on 2025/06/02 17:10
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+a3164c21168dd5225fdc@syzkaller.appspotmail.com
First crash: 4d02h, last: 4d02h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __d_instantiate / path_openat

write to 0xffff888143d82630 of 8 bytes by task 1178 on cpu 0:
 __d_set_inode_and_type fs/dcache.c:406 [inline]
 __d_instantiate+0x1f8/0x3b0 fs/dcache.c:1920
 d_instantiate+0x59/0x80 fs/dcache.c:1947
 shmem_mknod+0x153/0x180 mm/shmem.c:3860
 shmem_create+0x34/0x50 mm/shmem.c:3913
 lookup_open fs/namei.c:3708 [inline]
 open_last_lookups fs/namei.c:3807 [inline]
 path_openat+0x1102/0x2170 fs/namei.c:4043
 do_filp_open+0x109/0x230 fs/namei.c:4073
 do_sys_openat2+0xa6/0x110 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_creat fs/open.c:1530 [inline]
 __se_sys_creat fs/open.c:1524 [inline]
 __x64_sys_creat+0x65/0x90 fs/open.c:1524
 x64_sys_call+0x114d/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:86
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888143d82630 of 8 bytes by task 1184 on cpu 1:
 lookup_fast_for_open fs/namei.c:3751 [inline]
 open_last_lookups fs/namei.c:3778 [inline]
 path_openat+0x45e/0x2170 fs/namei.c:4043
 do_filp_open+0x109/0x230 fs/namei.c:4073
 do_sys_openat2+0xa6/0x110 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_creat fs/open.c:1530 [inline]
 __se_sys_creat fs/open.c:1524 [inline]
 __x64_sys_creat+0x65/0x90 fs/open.c:1524
 x64_sys_call+0x114d/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:86
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000000 -> 0xffff888104504650

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 1184 Comm: syz.5.15943 Tainted: G        W           6.15.0-syzkaller-10820-gcd2e103d57e5 #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/02 17:10 upstream cd2e103d57e5 b396b4bf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __d_instantiate / path_openat
* Struck through repros no longer work on HEAD.