syzbot


KCSAN: data-race in may_open / setattr_copy (5)

Status: auto-obsoleted due to no activity on 2024/03/05 00:01
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+dc376fb8f84c2b05b852@syzkaller.appspotmail.com
First crash: 101d, last: 75d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in may_open / setattr_copy (4) fs 1 232d 232d 0/26 auto-obsoleted due to no activity on 2023/09/30 13:14
upstream KCSAN: data-race in may_open / setattr_copy fs 1 930d 930d 0/26 auto-closed as invalid on 2021/11/01 17:23
upstream KCSAN: data-race in may_open / setattr_copy (3) fs 1 297d 297d 0/26 auto-obsoleted due to no activity on 2023/07/27 17:10
upstream KCSAN: data-race in may_open / setattr_copy (2) fs 1 827d 827d 0/26 auto-closed as invalid on 2022/02/12 13:06

Sample crash report:
==================================================================
BUG: KCSAN: data-race in may_open / setattr_copy

write to 0xffff888103e05220 of 2 bytes by task 24 on cpu 1:
 setattr_copy+0x29d/0x2b0 fs/attr.c:321
 shmem_setattr+0x52e/0x830 mm/shmem.c:1220
 notify_change+0x866/0x8e0 fs/attr.c:499
 handle_remove drivers/base/devtmpfs.c:337 [inline]
 handle drivers/base/devtmpfs.c:386 [inline]
 devtmpfs_work_loop+0x828/0x8e0 drivers/base/devtmpfs.c:399
 devtmpfsd+0x43/0x50 drivers/base/devtmpfs.c:441
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read to 0xffff888103e05220 of 2 bytes by task 16470 on cpu 0:
 may_open+0x42/0x340 fs/namei.c:3242
 do_open fs/namei.c:3639 [inline]
 path_openat+0x1789/0x1d30 fs/namei.c:3798
 do_filp_open+0xf6/0x200 fs/namei.c:3825
 do_sys_openat2+0xab/0x110 fs/open.c:1404
 do_sys_open fs/open.c:1419 [inline]
 __do_sys_openat fs/open.c:1435 [inline]
 __se_sys_openat fs/open.c:1430 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1430
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x59/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x6180 -> 0x6000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16470 Comm: udevd Not tainted 6.8.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: setting owner of /dev/loop0 to uid=0, gid=6 failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory
udevd[16470]: inotify_add_watch(7, /dev/loop0, 10) failed: No such file or directory

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/30 00:00 upstream 41bccc98fb79 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in may_open / setattr_copy
2024/01/04 05:40 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in may_open / setattr_copy
* Struck through repros no longer work on HEAD.