syzbot


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

Status: auto-obsoleted due to no activity on 2024/02/12 19:37
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+48662affc221aa5e3a78@syzkaller.appspotmail.com
First crash: 305d, last: 305d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fsnotify_perm / setattr_copy fs 1 1214d 1214d 0/28 auto-closed as invalid on 2021/08/17 01:02
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (3) fs 1 1024d 1024d 0/28 auto-closed as invalid on 2022/02/23 05:39
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (4) ext4 1 437d 437d 0/28 auto-obsoleted due to no activity on 2023/10/04 00:14
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (2) ext4 1 1151d 1151d 0/28 auto-closed as invalid on 2021/10/19 09:08

Sample crash report:
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
==================================================================
BUG: KCSAN: data-race in fsnotify_perm / setattr_copy

write to 0xffff88813d36c660 of 2 bytes by task 24 on cpu 1:
 setattr_copy+0x29d/0x2b0 fs/attr.c:321
 shmem_setattr+0x52e/0x830 mm/shmem.c:1219
 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 0xffff88813d36c660 of 2 bytes by task 3154 on cpu 0:
 fsnotify_parent include/linux/fsnotify.h:65 [inline]
 fsnotify_file include/linux/fsnotify.h:100 [inline]
 fsnotify_perm+0x2a5/0x380 include/linux/fsnotify.h:125
 security_file_open+0x53/0x70 security/security.c:2840
 do_dentry_open+0x224/0xbd0 fs/open.c:935
 vfs_open+0x4a/0x50 fs/open.c:1082
 do_open fs/namei.c:3622 [inline]
 path_openat+0x1819/0x1d70 fs/namei.c:3779
 do_filp_open+0xf6/0x200 fs/namei.c:3809
 do_sys_openat2+0xab/0x110 fs/open.c:1437
 do_sys_open fs/open.c:1452 [inline]
 __do_sys_openat fs/open.c:1468 [inline]
 __se_sys_openat fs/open.c:1463 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1463
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 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: 3154 Comm: udevd Not tainted 6.7.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================
block device autoloading is deprecated and will be removed.
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory
udevd[3154]: inotify_add_watch(7, /dev/loop11, 10) failed: No such file or directory

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/08 19:36 upstream 0dd3ee311255 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fsnotify_perm / setattr_copy
* Struck through repros no longer work on HEAD.