[syzbot] [scsi?] upstream test error: KMSAN: use-after-free in scsi_get_vpd_buf

syzbot
2025-10-06T17:06:39Z

Hello,

syzbot found the following issue on:

HEAD commit: fd94619c4336 Merge tag 'zonefs-6.18-rc1' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=169595cd980000
kernel config: https://syzkaller.appspot.com/x/.config?x=ad506767107aacda
dashboard link: https://syzkaller.appspot.com/bug?extid=f627b4ca9d1c5894ae1d
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f3f6ed23a50a/disk-fd94619c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e36679259d5c/vmlinux-fd94619c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c3e733ae21be/bzImage-fd94619c.xz

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

scsi 0:0:1:0: Direct-Access Google PersistentDisk 1 PQ: 0 ANSI: 6
=====================================================
BUG: KMSAN: use-after-free in scsi_vpd_inquiry drivers/scsi/scsi.c:323 [inline]
BUG: KMSAN: use-after-free in scsi_get_vpd_buf+0x4cc/0x720 drivers/scsi/scsi.c:455
scsi_vpd_inquiry drivers/scsi/scsi.c:323 [inline]
scsi_get_vpd_buf+0x4cc/0x720 drivers/scsi/scsi.c:455
scsi_update_vpd_page drivers/scsi/scsi.c:479 [inline]
scsi_attach_vpd+0x7a8/0xe70 drivers/scsi/scsi.c:532
scsi_add_lun drivers/scsi/scsi_scan.c:1110 [inline]
scsi_probe_and_add_lun+0x6933/0x7f20 drivers/scsi/scsi_scan.c:1288
__scsi_scan_target+0x2fb/0x2050 drivers/scsi/scsi_scan.c:1776
scsi_scan_channel drivers/scsi/scsi_scan.c:1864 [inline]
scsi_scan_host_selected+0x68f/0x9a0 drivers/scsi/scsi_scan.c:1893
do_scsi_scan_host drivers/scsi/scsi_scan.c:2032 [inline]
do_scan_async+0x1ad/0xdc0 drivers/scsi/scsi_scan.c:2042
async_run_entry_fn+0x90/0x570 kernel/async.c:129
process_one_work kernel/workqueue.c:3263 [inline]
process_scheduled_works+0xb91/0x1d80 kernel/workqueue.c:3346
worker_thread+0xedf/0x1590 kernel/workqueue.c:3427
kthread+0xd59/0xf00 kernel/kthread.c:463
ret_from_fork+0x230/0x380 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was created at:
slab_free_hook mm/slub.c:2440 [inline]
slab_free mm/slub.c:6566 [inline]
kfree+0x254/0x1460 mm/slub.c:6773
call_usermodehelper_freeinfo kernel/umh.c:43 [inline]
umh_complete kernel/umh.c:57 [inline]
call_usermodehelper_exec_async+0x666/0x6f0 kernel/umh.c:119
ret_from_fork+0x230/0x380 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

CPU: 1 UID: 0 PID: 69 Comm: kworker/u8:4 Not tainted syzkaller #0 PREEMPT(none)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Workqueue: async async_run_entry_fn
=====================================================

---
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 syzkaller@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