usb usb9: usbfs: process 24912 (syz-executor.2) 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 ffff88802452c9c0 by task syz-executor.2/24905 CPU: 0 PID: 24905 Comm: syz-executor.2 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:0x7ff7291edf56 Code: 73 47 49 89 16 48 89 fa 49 89 78 f8 49 8b 0e 49 8b 7e 08 eb 91 0f 1f 80 00 00 00 00 4c 89 fa 4c 89 c6 48 89 df e8 0a ff ff ff <48> 89 d8 4c 29 f0 48 3d 80 00 00 00 0f 8e 94 00 00 00 4d 85 ff 74 RSP: 002b:00007fff315caa40 EFLAGS: 00000283 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000048 RBX: 00007ff728fda3d0 RCX: ffffffff83771e05 RDX: 0000000000000013 RSI: 00007ff728fda418 RDI: 00007ff728fda3d0 RBP: 00007ff728fda398 R08: 00007ff728fda418 R09: 00000000ee5a3a10 R10: 00007fff315cae10 R11: 0000000000000246 R12: 00007ff728fda390 R13: 00007ff728fda3d0 R14: 00007ff728fda388 R15: 0000000000000013 Allocated by task 24912: __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 8131: __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/ipv6/netfilter/ip6_tables.c:886 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0x719/0x910 net/ipv6/netfilter/ip6_tables.c:1714 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1b6/0x260 net/ipv6/ipv6_sockglue.c:1388 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 ffff88802452c9c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88802452c9c0, ffff88802452c9e0) The buggy address belongs to the page: page:ffffea0000914b00 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff88802452cfc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00024d7788 ffffea00027d4408 ffff88813bff01c0 raw: ffff88802452cfc1 ffff88802452c000 0000000100000037 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88802452c880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88802452c900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88802452c980: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff88802452ca00: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ffff88802452ca80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================