syz-executor.1 (28125): drop_caches: 2 usb usb9: usbfs: process 28159 (syz-executor.3) did not claim interface 0 before use syz-executor.1 (28125): drop_caches: 2 ================================================================== 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 ffff888096f94300 by task syz-executor.4/28157 CPU: 1 PID: 28157 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:lock_acquire+0x1ec/0x3c0 kernel/locking/lockdep.c:3911 Code: 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 b7 01 00 00 48 83 3d 09 2e a6 08 00 0f 84 2a 01 00 00 48 8b 7c 24 08 57 9d <0f> 1f 44 00 00 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 65 8b RSP: 0018:ffff88822315f668 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: ffff88803e2bc280 RCX: 101c7ce80a9a1d98 RDX: dffffc0000000000 RSI: 00000000015b370c RDI: 0000000000000286 RBP: ffffffff89f85fa0 R08: 00000000c985a8da R09: 0000000000000001 R10: ffff88803e2bcb30 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:627 [inline] lock_page_memcg+0x36/0x220 mm/memcontrol.c:1908 page_remove_file_rmap+0x36/0xa30 mm/rmap.c:1212 page_remove_rmap+0xe5/0x120 mm/rmap.c:1297 zap_pte_range mm/memory.c:1350 [inline] zap_pmd_range mm/memory.c:1463 [inline] zap_pud_range mm/memory.c:1492 [inline] zap_p4d_range mm/memory.c:1513 [inline] unmap_page_range+0x147d/0x2c50 mm/memory.c:1534 unmap_single_vma+0x198/0x300 mm/memory.c:1579 unmap_vmas+0xa9/0x180 mm/memory.c:1609 exit_mmap+0x2b9/0x530 mm/mmap.c:3093 __mmput kernel/fork.c:1016 [inline] mmput+0x14e/0x4a0 kernel/fork.c:1037 exit_mm kernel/exit.c:549 [inline] do_exit+0xaec/0x2be0 kernel/exit.c:857 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fad1530a199 Code: Bad RIP value. RSP: 002b:00007fad13c7f218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007fad1541cf68 RCX: 00007fad1530a199 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fad1541cf68 RBP: 00007fad1541cf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fad1541cf6c R13: 00007ffef60411bf R14: 00007fad13c7f300 R15: 0000000000022000 Allocated by task 28159: __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 8130: __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 ffff888096f94300 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff888096f94300, ffff888096f94320) The buggy address belongs to the page: page:ffffea00025be500 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff888096f94fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0000fb0bc8 ffffea00026dba88 ffff88813bff01c0 raw: ffff888096f94fc1 ffff888096f94000 0000000100000033 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888096f94200: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff888096f94280: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff888096f94300: 01 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ^ ffff888096f94380: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff888096f94400: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 08 00 or %al,(%rax) 2: 00 00 add %al,(%rax) 4: 00 00 add %al,(%rax) 6: 00 48 c1 add %cl,-0x3f(%rax) 9: e8 03 80 3c 10 callq 0x103c8011 e: 00 0f add %cl,(%rdi) 10: 85 b7 01 00 00 48 test %esi,0x48000001(%rdi) 16: 83 3d 09 2e a6 08 00 cmpl $0x0,0x8a62e09(%rip) # 0x8a62e26 1d: 0f 84 2a 01 00 00 je 0x14d 23: 48 8b 7c 24 08 mov 0x8(%rsp),%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: 48 83 c4 18 add $0x18,%rsp 33: 5b pop %rbx 34: 5d pop %rbp 35: 41 5c pop %r12 37: 41 5d pop %r13 39: 41 5e pop %r14 3b: 41 5f pop %r15 3d: c3 retq 3e: 65 gs 3f: 8b .byte 0x8b