LUN: removable file: (no medium) 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000010 when write [00000010] *pgd=8bb5c003, *pmd=df789003 Internal error: Oops: a05 [#1] SMP ARM Modules linked in: CPU: 0 UID: 0 PID: 6299 Comm: syz.3.613 Not tainted syzkaller #0 PREEMPT Hardware name: ARM-Versatile Express PC is at fsg_common_set_num_buffers+0x60/0xf4 drivers/usb/gadget/function/f_mass_storage.c:2763 LR is at __kmalloc_large_noprof+0x60/0x6c mm/slub.c:5297 pc : [<81105094>] lr : [<8053e03c>] psr: a0000013 sp : ea855e58 ip : ea855e30 fp : ea855e84 r10: 81c2dadc r9 : 8ca3d800 r8 : 864fe000 r7 : 00000000 r6 : 00000010 r5 : 00000000 r4 : 00000010 r3 : 00004000 r2 : 00004000 r1 : 8cb0c000 r0 : 8cb0c000 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 30c5387d Table: 8ae263c0 DAC: fffffffd Register r0 information: non-slab/vmalloc memory Register r1 information: non-slab/vmalloc memory Register r2 information: non-paged memory Register r3 information: non-paged memory Register r4 information: zero-size pointer Register r5 information: NULL pointer Register r6 information: zero-size pointer Register r7 information: NULL pointer Register r8 information: slab kmalloc-512 start 864fe000 pointer offset 0 size 512 Register r9 information: slab kmalloc-64 start 8ca3d800 pointer offset 0 size 64 Register r10 information: non-slab/vmalloc memory Register r11 information: 2-page vmalloc region starting at 0xea854000 allocated at kernel_clone+0xc4/0x43c kernel/fork.c:2766 Register r12 information: 2-page vmalloc region starting at 0xea854000 allocated at kernel_clone+0xc4/0x43c kernel/fork.c:2766 Process syz.3.613 (pid: 6299, stack limit = 0xea854000) Stack: (0xea855e58 to 0xea856000) 5e40: 84000000 863eb204 5e60: 00000000 863eb2cc 00000012 8ca3d804 8ca3d800 81c2dadc ea855eac ea855e88 5e80: 81105194 81105040 00855eac 0a0a38ef 00000012 863b9800 ea855f08 863b9818 5ea0: ea855ed4 ea855eb0 80680750 81105134 00000012 86b9f300 20000300 ea855f68 5ec0: 806806a0 84000000 ea855f64 ea855ed8 805a1390 806806ac 81b7311c 00000001 5ee0: 5b4fd000 82a0b444 84000000 00000000 00010000 00000012 20000300 00000000 5f00: 00000001 00000000 86b9f300 00000000 00000000 00000000 00000000 00000000 5f20: 00000000 00004004 00000000 00000000 84000000 0a0a38ef ea855f64 86b9f303 5f40: 86b9f300 00000000 00000000 8020029c 84000000 00000004 ea855f94 ea855f68 5f60: 805a16b4 805a1120 00000000 00000000 00000000 0a0a38ef 00000000 00000000 5f80: 00356310 00000004 ea855fa4 ea855f98 805a173c 805a164c 00000000 ea855fa8 5fa0: 80200060 805a1738 00000000 00000000 00000003 20000300 00000012 00000000 5fc0: 00000000 00000000 00356310 00000004 003562d8 00000000 00000001 76fad0dc 5fe0: 76face88 76face78 00018fa0 00130a50 60000010 00000003 00000000 00000000 Call trace: [<81105034>] (fsg_common_set_num_buffers) from [<81105194>] (fsg_opts_num_buffers_store+0x6c/0xb0 drivers/usb/gadget/function/f_mass_storage.c:3452) r10:81c2dadc r9:8ca3d800 r8:8ca3d804 r7:00000012 r6:863eb2cc r5:00000000 r4:863eb204 r3:84000000 [<81105128>] (fsg_opts_num_buffers_store) from [<80680750>] (flush_write_buffer fs/configfs/file.c:207 [inline]) [<81105128>] (fsg_opts_num_buffers_store) from [<80680750>] (configfs_write_iter+0xb0/0x124 fs/configfs/file.c:229) r7:863b9818 r6:ea855f08 r5:863b9800 r4:00000012 [<806806a0>] (configfs_write_iter) from [<805a1390>] (new_sync_write fs/read_write.c:595 [inline]) [<806806a0>] (configfs_write_iter) from [<805a1390>] (vfs_write fs/read_write.c:687 [inline]) [<806806a0>] (configfs_write_iter) from [<805a1390>] (vfs_write+0x27c/0x42c fs/read_write.c:667) r9:84000000 r8:806806a0 r7:ea855f68 r6:20000300 r5:86b9f300 r4:00000012 [<805a1114>] (vfs_write) from [<805a16b4>] (ksys_write+0x74/0xec fs/read_write.c:739) r10:00000004 r9:84000000 r8:8020029c r7:00000000 r6:00000000 r5:86b9f300 r4:86b9f303 [<805a1640>] (ksys_write) from [<805a173c>] (__do_sys_write fs/read_write.c:750 [inline]) [<805a1640>] (ksys_write) from [<805a173c>] (sys_write+0x10/0x14 fs/read_write.c:747) r7:00000004 r6:00356310 r5:00000000 r4:00000000 [<805a172c>] (sys_write) from [<80200060>] (ret_fast_syscall+0x0/0x1c arch/arm/mm/proc-v7.S:67) Exception stack(0xea855fa8 to 0xea855ff0) 5fa0: 00000000 00000000 00000003 20000300 00000012 00000000 5fc0: 00000000 00000000 00356310 00000004 003562d8 00000000 00000001 76fad0dc 5fe0: 76face88 76face78 00018fa0 00130a50 Code: e3a01d33 e3a00901 ebd0e3d2 e3500000 (e5840000) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: e3a01d33 mov r1, #3264 @ 0xcc0 4: e3a00901 mov r0, #16384 @ 0x4000 8: ebd0e3d2 bl 0xff438f58 c: e3500000 cmp r0, #0 * 10: e5840000 str r0, [r4] <-- trapping instruction