syzbot


KCSAN: data-race in generic_permission / setattr_copy (8)

Status: moderation: reported on 2025/01/11 11:07
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+7ba4a35d106e16d95bbb@syzkaller.appspotmail.com
First crash: 3d21h, last: 3d21h
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_permission / setattr_copy (5) fs 1 451d 451d 0/28 auto-obsoleted due to no activity on 2023/11/25 12:17
upstream KCSAN: data-race in generic_permission / setattr_copy fs 1 1348d 1348d 0/28 auto-closed as invalid on 2021/06/11 22:43
upstream KCSAN: data-race in generic_permission / setattr_copy (6) ext4 1 353d 353d 0/28 auto-obsoleted due to no activity on 2024/03/02 13:46
upstream KCSAN: data-race in generic_permission / setattr_copy (2) fs 1 1248d 1248d 0/28 auto-closed as invalid on 2021/09/20 03:05
upstream KCSAN: data-race in generic_permission / setattr_copy (7) ext4 1 263d 263d 0/28 auto-obsoleted due to no activity on 2024/06/01 01:41
upstream KCSAN: data-race in generic_permission / setattr_copy (3) fs 1 1022d 1022d 0/28 auto-closed as invalid on 2022/05/03 21:30
upstream KCSAN: data-race in generic_permission / setattr_copy (4) ext4 1 749d 749d 0/28 auto-obsoleted due to no activity on 2023/02/08 07:52

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

write to 0xffff888101fe4080 of 2 bytes by task 26 on cpu 0:
 setattr_copy+0x18c/0x4a0 fs/attr.c:352
 shmem_setattr+0x532/0x830 mm/shmem.c:1262
 notify_change+0x85c/0x8e0 fs/attr.c:552
 handle_remove drivers/base/devtmpfs.c:337 [inline]
 handle drivers/base/devtmpfs.c:386 [inline]
 devtmpfs_work_loop+0x841/0x8f0 drivers/base/devtmpfs.c:399
 devtmpfsd+0x47/0x50 drivers/base/devtmpfs.c:441
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888101fe4080 of 2 bytes by task 14797 on cpu 1:
 acl_permission_check fs/namei.c:383 [inline]
 generic_permission+0x29/0x460 fs/namei.c:471
 do_inode_permission fs/namei.c:532 [inline]
 inode_permission+0x77/0x300 fs/namei.c:592
 path_permission include/linux/fs.h:2937 [inline]
 inotify_find_inode fs/notify/inotify/inotify_user.c:381 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:771 [inline]
 __se_sys_inotify_add_watch+0x17c/0x790 fs/notify/inotify/inotify_user.c:729
 __x64_sys_inotify_add_watch+0x43/0x50 fs/notify/inotify/inotify_user.c:729
 x64_sys_call+0x1f6d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:255
 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: 0x61b0 -> 0x6000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 14797 Comm: udevd Not tainted 6.13.0-rc6-syzkaller-00231-g77a903cd8e5a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/11 11:06 upstream 77a903cd8e5a 6dbc6a9b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_permission / setattr_copy
* Struck through repros no longer work on HEAD.