usb usb9: usbfs: process 15952 (syz-executor.4) 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 ffff8880aeb28c00 by task syz-executor.4/15952 CPU: 0 PID: 15952 Comm: syz-executor.4 Not tainted 4.19.198-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: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 d9 2f 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:ffff8880494af730 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3049 RBX: ffff8880b06c2140 RCX: 6ef1e41ac93df87f RDX: dffffc0000000000 RSI: 000000009004fc4c RDI: 0000000000000282 RBP: ffffffff89f85f20 R08: 00000000594ea6fa R09: 0000000000000000 R10: ffff8880b06c29c8 R11: 0000000000074071 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] is_bpf_text_address+0x36/0x1b0 kernel/bpf/core.c:545 kernel_text_address kernel/extable.c:152 [inline] kernel_text_address+0xbd/0xf0 kernel/extable.c:122 __kernel_text_address+0x9/0x30 kernel/extable.c:107 unwind_get_return_address arch/x86/kernel/unwind_orc.c:297 [inline] unwind_get_return_address+0x51/0x90 arch/x86/kernel/unwind_orc.c:292 __save_stack_trace+0xaf/0x190 arch/x86/kernel/stacktrace.c:45 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 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] kmem_cache_alloc+0x110/0x370 mm/slab.c:3557 kmem_cache_zalloc include/linux/slab.h:699 [inline] __alloc_file+0x21/0x330 fs/file_table.c:100 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe9/0x2df0 fs/namei.c:3526 do_filp_open+0x18c/0x3f0 fs/namei.c:3567 do_sys_open+0x3b3/0x520 fs/open.c:1085 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f07690f2188 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000801 RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffca6ad046f R14: 00007f07690f2300 R15: 0000000000022000 Allocated by task 15952: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] proc_do_submiturb+0x2d08/0x3af0 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 8758: __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 bpf_prog_free_deferred+0x2d8/0x410 kernel/bpf/core.c:1814 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880aeb28c00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880aeb28c00, ffff8880aeb28c20) The buggy address belongs to the page: page:ffffea0002baca00 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880aeb28fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a22b48 ffffea00028c8048 ffff88813bff01c0 raw: ffff8880aeb28fc1 ffff8880aeb28000 000000010000002b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aeb28b00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880aeb28b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880aeb28c00: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880aeb28c80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880aeb28d00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================