usb usb9: usbfs: process 9713 (syz-executor.5) did not claim interface 0 before use ================================================================== 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 ffff8880b3513bc0 by task syz-executor.5/9708 CPU: 0 PID: 9708 Comm: syz-executor.5 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: 0033:0x7f3a5b6b2f29 Code: b8 00 00 00 80 48 01 d0 48 3d ff ff ff 7e 0f 87 2a 02 00 00 44 89 c0 c1 e8 10 44 31 c0 83 f0 3d 8d 04 c0 89 c7 c1 ef 04 31 f8 <69> c0 2d eb d4 27 31 c5 c1 e8 0f 31 c5 80 3d 54 e4 09 01 00 75 81 RSP: 002b:00007ffc1f1e30a0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 0000000096c7c1c6 RBX: 00007f3a5b817ff8 RCX: 0000001b2fb20000 RDX: ffffffff83772075 RSI: 0000001b2fb222e4 RDI: 0000000009f34895 RBP: 0000000083772075 R08: ffffffff83771e31 R09: 000000003253460c R10: 00007ffc1f1e3270 R11: 0000000000000246 R12: 00007f3a5b80c000 R13: 0000000000000001 R14: 00000000000016cd R15: ffffffff83772075 Allocated by task 9713: __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 18343: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kvfree+0x59/0x60 mm/util.c:452 xt_free_table_info+0xb6/0x180 net/netfilter/x_tables.c:1193 __do_replace+0x6ab/0x870 net/ipv6/netfilter/ip6_tables.c:1107 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline] do_ip6t_set_ctl+0x2d2/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 The buggy address belongs to the object at ffff8880b3513bc0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b3513bc0, ffff8880b3513be0) The buggy address belongs to the page: page:ffffea0002cd44c0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880b3513fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00024af5c8 ffffea0002a3ce48 ffff88813bff01c0 raw: ffff8880b3513fc1 ffff8880b3513000 000000010000001b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b3513a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b3513b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880b3513b80: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880b3513c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b3513c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================