usb usb9: usbfs: process 18443 (syz-executor.3) did not claim interface 0 before use attempt to access beyond end of device loop2: rw=2049, want=128, limit=16 ================================================================== 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 ffff8880afb90200 by task syz-executor.3/18421 CPU: 1 PID: 18421 Comm: syz-executor.3 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:0x7fc55bcdc081 Code: c7 44 24 08 00 00 00 00 41 89 ed 4c 8d 25 97 8f 15 00 eb 24 0f 1f 44 00 00 4c 89 ff e8 d8 18 ff ff 41 08 c5 0f 85 f7 01 00 00 <41> 83 c6 01 44 39 73 04 0f 86 b7 00 00 00 48 8b 04 24 44 89 f7 48 RSP: 002b:00007fff7ddfabd0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000032534608 RBX: 00007fc55be410c8 RCX: 0000001b2f920000 RDX: 0000000032534608 RSI: 0000001b2f923ce0 RDI: 0000000009f34889 RBP: 0000000032534608 R08: 0000000000000608 R09: 000000003253460c R10: 00007fff7ddfada0 R11: 0000000000000246 R12: 00007fc55be35000 R13: 0000000000000001 R14: 0000000000009c41 R15: ffffffff83771e31 Allocated by task 18443: __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 5502: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 aa_free_task_ctx security/apparmor/include/task.h:61 [inline] apparmor_task_free+0x143/0x1e0 security/apparmor/lsm.c:93 security_task_free+0x3e/0x70 security/security.c:992 __put_task_struct+0xea/0x340 kernel/fork.c:688 put_task_struct include/linux/sched/task.h:98 [inline] delayed_put_task_struct+0x1dc/0x320 kernel/exit.c:181 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881 __do_softirq+0x265/0x980 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880afb90200 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880afb90200, ffff8880afb90220) The buggy address belongs to the page: page:ffffea0002bee400 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880afb90fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea000292a308 ffffea0002972d88 ffff88813bff01c0 raw: ffff8880afb90fc1 ffff8880afb90000 000000010000003e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880afb90100: 06 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ffff8880afb90180: 06 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880afb90200: 01 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ^ ffff8880afb90280: 06 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ffff8880afb90300: 05 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ==================================================================