[syzbot] [ide?] general protection fault in ata_msense_control_spgt2

From: syzbot
Date: Tue Sep 24 2024 - 01:31:35 EST


Hello,

syzbot found the following issue on:

HEAD commit: baeb9a7d8b60 Merge tag 'sched-rt-2024-09-17' of git://git...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=129b7f00580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5d3981d50a2855c2
dashboard link: https://syzkaller.appspot.com/bug?extid=fb415bc0af1b572478e1
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-baeb9a7d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/02c319355ed9/vmlinux-baeb9a7d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/41f9f78e928c/bzImage-baeb9a7d.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fb415bc0af1b572478e1@xxxxxxxxxxxxxxxxxxxxxxxxx

program syz.1.2960 is using a deprecated SCSI ioctl, please convert it to SG_IO
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 3 UID: 0 PID: 13886 Comm: syz.1.2960 Not tainted 6.11.0-syzkaller-07341-gbaeb9a7d8b60 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:ata_msense_control_spgt2.isra.0+0x4ce/0x610 drivers/ata/libata-scsi.c:2276
Code: 00 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc e8 23 70 92 fb 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 12 01 00 00
RSP: 0018:ffffc900034d74f0 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffffffff9a8cbffc RCX: ffffc900062e1000
RDX: 0000000000000000 RSI: ffffffff85fa94fd RDI: 0000000000000001
RBP: 0000000000000007 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000007 R14: ffff888026e72df8 R15: 00000000000000ff
FS: 00007f42191ff6c0(0000) GS:ffff88806a900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3efc33 CR3: 000000002a25a000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
ata_msense_control+0x1a4/0x6e0 drivers/ata/libata-scsi.c:2358
ata_scsiop_mode_sense drivers/ata/libata-scsi.c:2474 [inline]
ata_scsi_rbuf_fill drivers/ata/libata-scsi.c:1815 [inline]
ata_scsi_simulate+0xcff/0x34c0 drivers/ata/libata-scsi.c:4316
__ata_scsi_queuecmd+0xb35/0x13c0 drivers/ata/libata-scsi.c:4191
ata_scsi_queuecmd+0xac/0x160 drivers/ata/libata-scsi.c:4234
scsi_dispatch_cmd drivers/scsi/scsi_lib.c:1608 [inline]
scsi_queue_rq+0x1273/0x3650 drivers/scsi/scsi_lib.c:1850
blk_mq_dispatch_rq_list+0x443/0x1dc0 block/blk-mq.c:2032
__blk_mq_sched_dispatch_requests+0x219/0x1620 block/blk-mq-sched.c:301
blk_mq_sched_dispatch_requests+0xd4/0x150 block/blk-mq-sched.c:331
blk_mq_run_hw_queue+0x645/0x9a0 block/blk-mq.c:2245
blk_execute_rq+0x198/0x410 block/blk-mq.c:1398
sg_scsi_ioctl drivers/scsi/scsi_ioctl.c:593 [inline]
scsi_ioctl+0x983/0x1840 drivers/scsi/scsi_ioctl.c:901
sg_ioctl_common drivers/scsi/sg.c:1109 [inline]
sg_ioctl+0xaf3/0x2750 drivers/scsi/sg.c:1163
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x18d/0x210 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f421977def9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f42191ff038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f4219935f80 RCX: 00007f421977def9
RDX: 0000000020000380 RSI: 0000000000000001 RDI: 0000000000000001
RBP: 00007f42197f0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f4219935f80 R15: 00007ffcd901abf8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ata_msense_control_spgt2.isra.0+0x4ce/0x610 drivers/ata/libata-scsi.c:2276
Code: 00 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc e8 23 70 92 fb 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 12 01 00 00
RSP: 0018:ffffc900034d74f0 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffffffff9a8cbffc RCX: ffffc900062e1000
RDX: 0000000000000000 RSI: ffffffff85fa94fd RDI: 0000000000000001
RBP: 0000000000000007 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000007 R14: ffff888026e72df8 R15: 00000000000000ff
FS: 00007f42191ff6c0(0000) GS:ffff88806a900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c3efc33 CR3: 000000002a25a000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 48 83 c4 08 add $0x8,%rsp
4: 5b pop %rbx
5: 5d pop %rbp
6: 41 5c pop %r12
8: 41 5d pop %r13
a: 41 5e pop %r14
c: 41 5f pop %r15
e: c3 ret
f: cc int3
10: cc int3
11: cc int3
12: cc int3
13: e8 23 70 92 fb call 0xfb92703b
18: 4c 89 e2 mov %r12,%rdx
1b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
22: fc ff df
25: 48 c1 ea 03 shr $0x3,%rdx
* 29: 0f b6 04 02 movzbl (%rdx,%rax,1),%eax <-- trapping instruction
2d: 4c 89 e2 mov %r12,%rdx
30: 83 e2 07 and $0x7,%edx
33: 38 d0 cmp %dl,%al
35: 7f 08 jg 0x3f
37: 84 c0 test %al,%al
39: 0f 85 12 01 00 00 jne 0x151


---
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@xxxxxxxxxxxxxxxx.

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