syzbot


KCSAN: data-race in open_wait / sg_release

Status: auto-obsoleted due to no activity on 2024/08/28 10:57
Subsystems: scsi
[Documentation on labels]
Reported-by: syzbot+c0e7a152d3caf2a1b1e2@syzkaller.appspotmail.com
First crash: 45d, last: 45d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in open_wait / sg_release

read-write to 0xffff888101ba1428 of 4 bytes by task 26898 on cpu 0:
 sg_release+0x1f5/0x2a0 drivers/scsi/sg.c:397
 __fput+0x192/0x6f0 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:222
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888101ba1428 of 4 bytes by task 26897 on cpu 1:
 open_wait+0x2fb/0x3f0 drivers/scsi/sg.c:253
 sg_open+0x2c8/0x5c0 drivers/scsi/sg.c:338
 chrdev_open+0x323/0x3a0 fs/char_dev.c:414
 do_dentry_open+0x647/0xa50 fs/open.c:959
 vfs_open+0x3b/0x1f0 fs/open.c:1089
 do_open fs/namei.c:3727 [inline]
 path_openat+0x1a26/0x1f10 fs/namei.c:3886
 do_filp_open+0xf7/0x200 fs/namei.c:3913
 do_sys_openat2+0xab/0x120 fs/open.c:1416
 do_sys_open fs/open.c:1431 [inline]
 __do_sys_openat fs/open.c:1447 [inline]
 __se_sys_openat fs/open.c:1442 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1442
 x64_sys_call+0x1ac/0x2e00 arch/x86/include/generated/asm/syscalls_64.h:258
 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: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 26897 Comm: syz.1.7344 Not tainted 6.10.0-syzkaller-12246-g786c8248dbd3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/24 10:56 upstream 786c8248dbd3 57b2edb1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in open_wait / sg_release
* Struck through repros no longer work on HEAD.