[Android 6.1] general protection fault in fsg_common_set_num_buffers

2 views
Skip to first unread message

syzbot

unread,
Nov 1, 2026, 3:51:31 PM (7 days ago) Nov 1
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 743bbe988cbf UPSTREAM: blk-crypto: fix NULL deref and UAF ..
git tree: android14-6.1
console+strace: https://syzkaller.appspot.com/x/log.txt?x=11150581580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3533141b441d6292
dashboard link: https://syzkaller.appspot.com/bug?extid=ccc4c7e7ead25f734a47
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15ac85f1580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ac85f1580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9010bf0a8775/disk-743bbe98.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9612e00a62aa/vmlinux-743bbe98.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f452dbaf437a/bzImage-743bbe98.xz

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

LUN: removable file: (no medium)
general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 1 PID: 305 Comm: syz-executor400 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
RIP: 0010:fsg_common_set_num_buffers+0x60/0x2a0 drivers/usb/gadget/function/f_mass_storage.c:2762
Code: 9a 01 00 00 49 89 c6 49 bd 00 00 00 00 00 fc ff df bf 00 40 00 00 be c0 0c 00 00 e8 da 0e 57 fe 48 89 c3 4c 89 f0 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 f7 e8 11 49 66 fe 49 89 1e 48 85 db 0f
RSP: 0018:ffffc90000e17b28 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff888123f24000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffffffff8350c626 RDI: ffffed10247e5000
RBP: ffffc90000e17b70 R08: 0000000000004000 R09: ffffed10247e5000
R10: dffffc0000000000 R11: fffff9400091f92c R12: ffff88810e5b1c00
R13: dffffc0000000000 R14: 0000000000000010 R15: 0000000000000000
FS: 00005555906f63c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa05cfcf008 CR3: 0000000121e90000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
fsg_opts_num_buffers_store+0x138/0x1c0 drivers/usb/gadget/function/f_mass_storage.c:3456
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x323/0x410 fs/configfs/file.c:229
call_write_iter include/linux/fs.h:2282 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x5ef/0xd00 fs/read_write.c:584
ksys_write+0x14a/0x260 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:646
x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fa05cf32ef9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff380df358 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000200000000300 RCX: 00007fa05cf32ef9
RDX: 0000000000000012 RSI: 0000200000000300 RDI: 0000000000000003
RBP: 6769666e6f632f2e R08: 000000000000000f R09: 00007fff380df498
R10: 0000000000000001 R11: 0000000000000246 R12: 00007fff380df488
R13: 0000000000000002 R14: 0000200000000008 R15: 0000000000000002
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:fsg_common_set_num_buffers+0x60/0x2a0 drivers/usb/gadget/function/f_mass_storage.c:2762
Code: 9a 01 00 00 49 89 c6 49 bd 00 00 00 00 00 fc ff df bf 00 40 00 00 be c0 0c 00 00 e8 da 0e 57 fe 48 89 c3 4c 89 f0 48 c1 e8 03 <42> 80 3c 28 00 74 08 4c 89 f7 e8 11 49 66 fe 49 89 1e 48 85 db 0f
RSP: 0018:ffffc90000e17b28 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff888123f24000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffffffff8350c626 RDI: ffffed10247e5000
RBP: ffffc90000e17b70 R08: 0000000000004000 R09: ffffed10247e5000
R10: dffffc0000000000 R11: fffff9400091f92c R12: ffff88810e5b1c00
R13: dffffc0000000000 R14: 0000000000000010 R15: 0000000000000000
FS: 00005555906f63c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa05cfcf008 CR3: 0000000121e90000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 00 00 add %al,(%rax)
2: 49 89 c6 mov %rax,%r14
5: 49 bd 00 00 00 00 00 movabs $0xdffffc0000000000,%r13
c: fc ff df
f: bf 00 40 00 00 mov $0x4000,%edi
14: be c0 0c 00 00 mov $0xcc0,%esi
19: e8 da 0e 57 fe call 0xfe570ef8
1e: 48 89 c3 mov %rax,%rbx
21: 4c 89 f0 mov %r14,%rax
24: 48 c1 e8 03 shr $0x3,%rax
* 28: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1) <-- trapping instruction
2d: 74 08 je 0x37
2f: 4c 89 f7 mov %r14,%rdi
32: e8 11 49 66 fe call 0xfe664948
37: 49 89 1e mov %rbx,(%r14)
3a: 48 85 db test %rbx,%rbx
3d: 0f .byte 0xf


---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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