usb usb9: usbfs: process 27507 (syz-executor.2) did not claim interface 0 before use 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 ffff8880a929ea40 by task systemd-udevd/4700 CPU: 1 PID: 4700 Comm: systemd-udevd 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:mntput+0x36/0x90 fs/namespace.c:1185 Code: 48 85 db 74 56 e8 7a db b7 ff 48 8d bb 04 01 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8d 63 e0 48 89 fa 48 c1 ea 03 0f b6 14 02 <48> 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 3a 8b ab 04 01 00 RSP: 0018:ffff88809a477b50 EFLAGS: 00000a03 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: ffff8880a343e420 RCX: 1ffff1101348d129 RDX: 0000000000000000 RSI: ffffffff81aaa9f6 RDI: ffff8880a343e524 RBP: ffff88809a477cf8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a343e400 R13: dffffc0000000000 R14: ffff88809a477d30 R15: 0000000000000000 path_put fs/namei.c:485 [inline] terminate_walk+0x490/0x5c0 fs/namei.c:602 path_lookupat+0x356/0x8d0 fs/namei.c:2333 filename_lookup+0x1ac/0x5a0 fs/namei.c:2349 user_path_at include/linux/namei.h:57 [inline] do_faccessat+0x248/0x7a0 fs/open.c:397 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f2c6687b9c7 Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48 RSP: 002b:00007ffc442ff3b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000015 RAX: ffffffffffffffda RBX: 00005581c549d8b0 RCX: 00007f2c6687b9c7 RDX: 00746e657665752f RSI: 0000000000000000 RDI: 00007ffc442ff3c0 RBP: 00007ffc442ff440 R08: 000000000000cc00 R09: 0000000000001010 R10: 00007f2c66b39b58 R11: 0000000000000246 R12: 00005581c4f2d856 R13: 00005581c549c420 R14: 00007ffc442ff3c0 R15: 00005581c54ad760 Allocated by task 27507: __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 8120: __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 ffff8880a929ea40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a929ea40, ffff8880a929ea60) The buggy address belongs to the page: page:ffffea0002a4a780 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880a929efc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002665b48 ffffea00026f7a88 ffff88813bff01c0 raw: ffff8880a929efc1 ffff8880a929e000 000000010000003e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a929e900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a929e980: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a929ea00: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880a929ea80: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc ffff8880a929eb00: 00 07 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 48 85 db test %rbx,%rbx 3: 74 56 je 0x5b 5: e8 7a db b7 ff callq 0xffb7db84 a: 48 8d bb 04 01 00 00 lea 0x104(%rbx),%rdi 11: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 18: fc ff df 1b: 4c 8d 63 e0 lea -0x20(%rbx),%r12 1f: 48 89 fa mov %rdi,%rdx 22: 48 c1 ea 03 shr $0x3,%rdx 26: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx * 2a: 48 89 f8 mov %rdi,%rax <-- trapping instruction 2d: 83 e0 07 and $0x7,%eax 30: 83 c0 03 add $0x3,%eax 33: 38 d0 cmp %dl,%al 35: 7c 04 jl 0x3b 37: 84 d2 test %dl,%dl 39: 75 3a jne 0x75 3b: 8b .byte 0x8b 3c: ab stos %eax,%es:(%rdi) 3d: 04 01 add $0x1,%al