syzbot


KCSAN: data-race in sg_common_write / sg_finish_rem_req (3)

Status: auto-obsoleted due to no activity on 2024/11/20 21:45
Subsystems: scsi
[Documentation on labels]
Reported-by: syzbot+4c2d92d5458db3497c40@syzkaller.appspotmail.com
First crash: 132d, last: 65d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in sg_common_write / sg_finish_rem_req scsi 3 427d 460d 0/28 auto-obsoleted due to no activity on 2023/11/25 03:57
upstream KCSAN: data-race in sg_common_write / sg_finish_rem_req (2) scsi 1 181d 181d 0/28 auto-obsoleted due to no activity on 2024/07/27 17:57

Sample crash report:
==================================================================
BUG: KCSAN: data-race in sg_common_write / sg_finish_rem_req

write to 0xffff888114a9531d of 1 bytes by task 24 on cpu 1:
 sg_unlink_reserve drivers/scsi/sg.c:2068 [inline]
 sg_finish_rem_req+0x117/0x270 drivers/scsi/sg.c:1850
 sg_rq_end_io_usercontext+0x36/0x1c0 drivers/scsi/sg.c:1309
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 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 0xffff888114a9531d of 1 bytes by task 4539 on cpu 0:
 sg_start_req drivers/scsi/sg.c:1790 [inline]
 sg_common_write+0x659/0x8d0 drivers/scsi/sg.c:806
 sg_new_write+0x82b/0x8e0 drivers/scsi/sg.c:773
 sg_ioctl_common drivers/scsi/sg.c:938 [inline]
 sg_ioctl+0xe22/0x1870 drivers/scsi/sg.c:1163
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0xcd/0x140 fs/ioctl.c:893
 __x64_sys_ioctl+0x43/0x50 fs/ioctl.c:893
 x64_sys_call+0x15cc/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:17
 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: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4539 Comm: syz.0.508 Not tainted 6.12.0-rc3-syzkaller-00087-gc964ced77262 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/16 21:44 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/10/14 09:15 upstream 6485cf5ea253 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/09/26 23:35 upstream 11a299a7933e 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/09/18 09:20 upstream bdf56c7580d2 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/09/15 21:21 upstream d42f7708e27c 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/09/14 21:44 upstream 0babf683783d 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/09/05 08:40 upstream c763c4339688 dfbe2ed4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/31 23:59 upstream e8784b0aef62 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/30 15:26 upstream 20371ba12063 ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/30 01:24 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/30 01:23 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/23 04:27 upstream aa0743a22936 ce8a9099 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/13 06:48 upstream d74da846046a 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
2024/08/11 05:52 upstream 34ac1e82e5a7 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in sg_common_write / sg_finish_rem_req
* Struck through repros no longer work on HEAD.