[moderation] [scsi?] KCSAN: data-race in sg_ioctl / sg_rq_end_io (5)

7 views
Skip to first unread message

syzbot

unread,
Oct 22, 2024, 5:07:37 PM10/22/24
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d12937763990 Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=112e0c30580000
kernel config: https://syzkaller.appspot.com/x/.config?x=91af2aaf073838b1
dashboard link: https://syzkaller.appspot.com/bug?extid=2239bbb1012ad9fb368d
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [James.B...@HansenPartnership.com dgil...@interlog.com linux-...@vger.kernel.org linux...@vger.kernel.org martin....@oracle.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/84049b9d0a23/disk-d1293776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/36e0699c1f10/vmlinux-d1293776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4a9bb89ead25/bzImage-d1293776.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2239bb...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in sg_ioctl / sg_rq_end_io

write to 0xffff888114d1e11c of 4 bytes by interrupt on cpu 1:
sg_rq_end_io+0x154/0x710 drivers/scsi/sg.c:1350
__blk_mq_end_request+0x2fa/0x380 block/blk-mq.c:1041
scsi_end_request+0x29f/0x4d0 drivers/scsi/scsi_lib.c:664
scsi_io_completion+0x9f/0x200 drivers/scsi/scsi_lib.c:1067
scsi_finish_command+0x1be/0x1d0 drivers/scsi/scsi.c:198
scsi_complete+0x19a/0x1d0 drivers/scsi/scsi_lib.c:1523
blk_complete_reqs block/blk-mq.c:1126 [inline]
blk_done_softirq+0x74/0xb0 block/blk-mq.c:1131
handle_softirqs+0xbf/0x280 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0x3e/0x90 kernel/softirq.c:649
common_interrupt+0x81/0x90 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
kcsan_setup_watchpoint+0x404/0x410 kernel/kcsan/core.c:705
pv_queued_spin_unlock arch/x86/include/asm/paravirt.h:589 [inline]
queued_spin_unlock arch/x86/include/asm/qspinlock.h:57 [inline]
do_raw_spin_unlock include/linux/spinlock.h:204 [inline]
__raw_spin_unlock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_unlock+0x14/0x50 kernel/locking/spinlock.c:186
spin_unlock include/linux/spinlock.h:391 [inline]
io_poll_remove_all_table+0x17b/0x1c0 io_uring/poll.c:785
io_poll_remove_all+0x2a/0x50 io_uring/poll.c:799
io_uring_try_cancel_requests+0x2cd/0x370 io_uring/io_uring.c:3125
io_ring_exit_work+0x160/0x500 io_uring/io_uring.c:2913
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 0xffff888114d1e11c of 4 bytes by task 4364 on cpu 0:
sg_fill_request_table drivers/scsi/sg.c:881 [inline]
sg_ioctl_common drivers/scsi/sg.c:1089 [inline]
sg_ioctl+0x965/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: 0xfffc2778 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4364 Comm: syz.4.283 Not tainted 6.12.0-rc4-syzkaller-00045-gd12937763990 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Dec 17, 2024, 4:07:17 PM12/17/24
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages