[moderation] [usb?] general protection fault in fsg_common_set_num_buffers

0 views
Skip to first unread message

syzbot

unread,
Aug 4, 2026, 8:23:33 PM (15 hours ago) Aug 4
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3708dd948844 Merge tag 'pm-7.2-rc6' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=137978c6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f221a1b5d497ed15
dashboard link: https://syzkaller.appspot.com/bug?extid=fb9d9605bab5bb5aebaf
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-3708dd94.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7f5f60b633ba/vmlinux-3708dd94.xz
kernel image: https://storage.googleapis.com/syzbot-assets/16c4d3a87f42/bzImage-3708dd94.xz

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

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 3 UID: 0 PID: 7346 Comm: syz.1.316 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:fsg_common_set_num_buffers+0xad/0x340 drivers/usb/gadget/function/f_mass_storage.c:2763
Code: 42 80 3c 30 00 0f 85 52 02 00 00 48 89 6d e0 e8 59 27 2c fa be c0 0c 00 00 bf 00 40 00 00 e8 aa 4b 8f fa 48 89 ea 48 c1 ea 03 <42> 80 3c 32 00 0f 85 04 02 00 00 48 89 45 00 48 85 c0 75 95 e8 2a
RSP: 0018:ffffc9000ebdfba8 EFLAGS: 00010202
RAX: ffff88807071c000 RBX: 0000000000000000 RCX: 0000000000004000
RDX: 0000000000000002 RSI: ffffffff8c400a00 RDI: ffffffff8e46d938
RBP: 0000000000000010 R08: 0000000000000cc0 R09: 00000000ffffffff
R10: ffffed100e0e4000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000010 R14: dffffc0000000000 R15: ffff888050138000
FS: 0000000000000000(0000) GS:ffff888096ee1000(0063) knlGS:00000000f53fcb40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 0000000080001000 CR3: 0000000050a24000 CR4: 0000000000352ef0
Call Trace:
<TASK>
fsg_opts_num_buffers_store+0x168/0x1b0 drivers/usb/gadget/function/f_mass_storage.c:3452
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
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:0xf702efec
Code: Unable to access opcode bytes at 0xf702efc2.
RSP: 002b:00000000f53fc50c EFLAGS: 00000292 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000080000540
RDX: 00000000fffffdd8 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:fsg_common_set_num_buffers+0xad/0x340 drivers/usb/gadget/function/f_mass_storage.c:2763
Code: 42 80 3c 30 00 0f 85 52 02 00 00 48 89 6d e0 e8 59 27 2c fa be c0 0c 00 00 bf 00 40 00 00 e8 aa 4b 8f fa 48 89 ea 48 c1 ea 03 <42> 80 3c 32 00 0f 85 04 02 00 00 48 89 45 00 48 85 c0 75 95 e8 2a
RSP: 0018:ffffc9000ebdfba8 EFLAGS: 00010202
RAX: ffff88807071c000 RBX: 0000000000000000 RCX: 0000000000004000
RDX: 0000000000000002 RSI: ffffffff8c400a00 RDI: ffffffff8e46d938
RBP: 0000000000000010 R08: 0000000000000cc0 R09: 00000000ffffffff
R10: ffffed100e0e4000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000010 R14: dffffc0000000000 R15: ffff888050138000
FS: 0000000000000000(0000) GS:ffff888096ee1000(0063) knlGS:00000000f53fcb40
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f702f000 CR3: 0000000050a24000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
0: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1)
5: 0f 85 52 02 00 00 jne 0x25d
b: 48 89 6d e0 mov %rbp,-0x20(%rbp)
f: e8 59 27 2c fa call 0xfa2c276d
14: be c0 0c 00 00 mov $0xcc0,%esi
19: bf 00 40 00 00 mov $0x4000,%edi
1e: e8 aa 4b 8f fa call 0xfa8f4bcd
23: 48 89 ea mov %rbp,%rdx
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 42 80 3c 32 00 cmpb $0x0,(%rdx,%r14,1) <-- trapping instruction
2f: 0f 85 04 02 00 00 jne 0x239
35: 48 89 45 00 mov %rax,0x0(%rbp)
39: 48 85 c0 test %rax,%rax
3c: 75 95 jne 0xffffffd3
3e: e8 .byte 0xe8
3f: 2a .byte 0x2a


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