usb usb9: usbfs: process 24710 (syz-executor.5) did not claim interface 0 before use nla_parse: 1 callbacks suppressed netlink: 12 bytes leftover after parsing attributes in process `syz-executor.1'. usb usb9: Requested nonsensical USBDEVFS_URB_ZERO_PACKET. ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 Write of size 2 at addr ffff8880b01e3a40 by task syz-executor.1/7456 CPU: 1 PID: 7456 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:deref_stack_reg+0x16/0x1d0 arch/x86/kernel/unwind_orc.c:330 Code: e6 6e 00 0f b6 44 24 04 eb a0 66 2e 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 41 56 41 55 49 89 d5 41 54 49 89 fc <55> 48 89 f5 53 48 83 ec 68 48 c7 44 24 08 b3 8a b5 41 48 8d 5c 24 RSP: 0018:ffff8880af6377e8 EFLAGS: 00000283 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff11015ec6f0a RCX: ffffffff8b8cd909 RDX: ffff8880af637978 RSI: ffff8880af637f38 RDI: ffff8880af637938 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000001 R10: ffff8880af637997 R11: 0000000000074071 R12: ffff8880af637938 R13: ffff8880af637978 R14: ffff8880af637938 R15: ffffffff8b8cd904 unwind_next_frame+0xf83/0x1400 arch/x86/kernel/unwind_orc.c:555 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x61/0xf0 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] xt_alloc_table_info+0x3c/0xa0 net/netfilter/x_tables.c:1177 do_replace net/ipv6/netfilter/ip6_tables.c:1145 [inline] do_ip6t_set_ctl+0x214/0x430 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x6f/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x103/0x160 net/ipv6/ipv6_sockglue.c:945 tcp_setsockopt+0x86/0xd0 net/ipv4/tcp.c:3108 __sys_setsockopt+0x14d/0x240 net/socket.c:2013 __do_sys_setsockopt net/socket.c:2024 [inline] __se_sys_setsockopt net/socket.c:2021 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2021 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb12b12769a Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe678d5b08 EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 00007fb12b12769a RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007ffe678d5b30 R08: 0000000000000558 R09: fefefeff646b666d R10: 00007fb12b208940 R11: 0000000000000206 R12: 00007ffe678d5b90 R13: 0000000000000003 R14: 00007ffe678d5b2c R15: 00007fb12b2088e0 Allocated by task 24710: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] proc_do_submiturb+0x2d17/0x3b00 drivers/usb/core/devio.c:1673 proc_submiturb drivers/usb/core/devio.c:1827 [inline] usbdev_do_ioctl+0x773/0x3030 drivers/usb/core/devio.c:2481 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2585 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8170: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kvfree+0x59/0x60 mm/util.c:452 __vunmap+0x2a5/0x3f0 mm/vmalloc.c:1534 vfree+0x65/0x100 mm/vmalloc.c:1598 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:870 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1027 [inline] do_ipt_get_ctl+0x6e8/0x8e0 net/ipv4/netfilter/ip_tables.c:1705 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1574 [inline] ip_getsockopt+0x167/0x1c0 net/ipv4/ip_sockglue.c:1554 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3629 __sys_getsockopt+0x135/0x210 net/socket.c:2050 __do_sys_getsockopt net/socket.c:2061 [inline] __se_sys_getsockopt net/socket.c:2058 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2058 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880b01e3a40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b01e3a40, ffff8880b01e3a60) The buggy address belongs to the page: page:ffffea0002c078c0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880b01e3fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002cdb588 ffffea0002768f88 ffff88813bff01c0 raw: ffff8880b01e3fc1 ffff8880b01e3000 0000000100000037 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b01e3900: 07 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b01e3980: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880b01e3a00: 00 00 00 00 fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880b01e3a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b01e3b00: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: e6 6e out %al,$0x6e 2: 00 0f add %cl,(%rdi) 4: b6 44 mov $0x44,%dh 6: 24 04 and $0x4,%al 8: eb a0 jmp 0xffffffaa a: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 11: 00 00 00 14: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1b: fc ff df 1e: 41 56 push %r14 20: 41 55 push %r13 22: 49 89 d5 mov %rdx,%r13 25: 41 54 push %r12 27: 49 89 fc mov %rdi,%r12 * 2a: 55 push %rbp <-- trapping instruction 2b: 48 89 f5 mov %rsi,%rbp 2e: 53 push %rbx 2f: 48 83 ec 68 sub $0x68,%rsp 33: 48 c7 44 24 08 b3 8a movq $0x41b58ab3,0x8(%rsp) 3a: b5 41 3c: 48 rex.W 3d: 8d .byte 0x8d 3e: 5c pop %rsp 3f: 24 .byte 0x24