[moderation] [usb?] BUG: spinlock bad magic in gadget_dev_open

1 view
Skip to first unread message

syzbot

unread,
1:52 AM (12 hours ago) 1:52 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4235cb24ec1e Merge tag 'vfs-7.2-rc5.fixes' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1769e6b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f221a1b5d497ed15
dashboard link: https://syzkaller.appspot.com/bug?extid=78c46fcd3a95e16c3a24
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
userspace arch: i386
CC: [gre...@linuxfoundation.org linux-...@vger.kernel.org linu...@vger.kernel.org]

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

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-4235cb24.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/68eef4847f46/vmlinux-4235cb24.xz
kernel image: https://storage.googleapis.com/syzbot-assets/77e73df69f7f/bzImage-4235cb24.xz

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

BUG: spinlock bad magic on CPU#2, syz.3.4960/23729
Oops: general protection fault, probably for non-canonical address 0xdffffc00000000d2: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000690-0x0000000000000697]
CPU: 2 UID: 0 PID: 23729 Comm: syz.3.4960 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:task_pid_nr include/linux/pid.h:236 [inline]
RIP: 0010:spin_dump+0xd7/0x160 kernel/locking/spinlock_debug.c:64
Code: 09 84 d2 74 05 e8 f9 33 57 01 44 8b 63 08 48 85 ed 74 37 48 8d bd 40 06 00 00 b8 ff ff 37 00 48 89 fa 48 c1 e0 2a 48 c1 ea 03 <8a> 04 02 84 c0 74 09 3c 03 7f 05 e8 c9 33 57 01 44 8b ad 40 06 00
RSP: 0018:ffffc90003d078b8 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: ffff88802597c000 RCX: 0000000000000000
RDX: 00000000000000d2 RSI: ffffffff81e815e9 RDI: 0000000000000690
RBP: 0000000000000050 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 697073203a475542 R12: 0000000089ad02c0
R13: ffff888021460000 R14: ffff888021f67e48 R15: ffff888021f67e28
FS: 0000000000000000(0000) GS:ffff888096de3000(0063) knlGS:00000000f53ddb40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f7f1a190 CR3: 000000004acf7000 CR4: 0000000000352ef0
Call Trace:
<TASK>
spin_bug kernel/locking/spinlock_debug.c:78 [inline]
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock.cold+0x37/0x3c kernel/locking/spinlock_debug.c:115
spin_lock_irq include/linux/spinlock.h:372 [inline]
gadget_dev_open+0x44/0x1b0 drivers/usb/gadget/legacy/inode.c:1919
do_dentry_open+0x6ab/0x14d0 fs/open.c:947
vfs_open+0x82/0x3f0 fs/open.c:1052
do_open fs/namei.c:4700 [inline]
path_openat+0x2873/0x4280 fs/namei.c:4863
do_file_open+0x20e/0x430 fs/namei.c:4892
do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
do_sys_open fs/open.c:1374 [inline]
__do_compat_sys_openat fs/open.c:1436 [inline]
__se_compat_sys_openat fs/open.c:1434 [inline]
__ia32_compat_sys_openat+0x12d/0x210 fs/open.c:1434
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe7/0x970 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf6feefec
Code: Unable to access opcode bytes at 0xf6feefc2.
RSP: 002b:00000000f53dd50c EFLAGS: 00000292 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00000000ffffff9c RCX: 0000000080000300
RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:task_pid_nr include/linux/pid.h:236 [inline]
RIP: 0010:spin_dump+0xd7/0x160 kernel/locking/spinlock_debug.c:64
Code: 09 84 d2 74 05 e8 f9 33 57 01 44 8b 63 08 48 85 ed 74 37 48 8d bd 40 06 00 00 b8 ff ff 37 00 48 89 fa 48 c1 e0 2a 48 c1 ea 03 <8a> 04 02 84 c0 74 09 3c 03 7f 05 e8 c9 33 57 01 44 8b ad 40 06 00
RSP: 0018:ffffc90003d078b8 EFLAGS: 00010006
RAX: dffffc0000000000 RBX: ffff88802597c000 RCX: 0000000000000000
RDX: 00000000000000d2 RSI: ffffffff81e815e9 RDI: 0000000000000690
RBP: 0000000000000050 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 697073203a475542 R12: 0000000089ad02c0
R13: ffff888021460000 R14: ffff888021f67e48 R15: ffff888021f67e28
FS: 0000000000000000(0000) GS:ffff888096de3000(0063) knlGS:00000000f53ddb40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f6fef000 CR3: 000000004acf7000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
0: 09 84 d2 74 05 e8 f9 or %eax,-0x617fa8c(%rdx,%rdx,8)
7: 33 57 01 xor 0x1(%rdi),%edx
a: 44 8b 63 08 mov 0x8(%rbx),%r12d
e: 48 85 ed test %rbp,%rbp
11: 74 37 je 0x4a
13: 48 8d bd 40 06 00 00 lea 0x640(%rbp),%rdi
1a: b8 ff ff 37 00 mov $0x37ffff,%eax
1f: 48 89 fa mov %rdi,%rdx
22: 48 c1 e0 2a shl $0x2a,%rax
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 8a 04 02 mov (%rdx,%rax,1),%al <-- trapping instruction
2d: 84 c0 test %al,%al
2f: 74 09 je 0x3a
31: 3c 03 cmp $0x3,%al
33: 7f 05 jg 0x3a
35: e8 c9 33 57 01 call 0x1573403
3a: 44 rex.R
3b: 8b .byte 0x8b
3c: ad lods %ds:(%rsi),%eax
3d: 40 06 rex (bad)


---
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
Reply all
Reply to author
Forward
0 new messages