usb usb9: usbfs: process 11235 (syz-executor.5) did not claim interface 0 before use ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [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 ffff88808d3f5980 by task syz-executor.1/11236 CPU: 0 PID: 11236 Comm: syz-executor.1 Not tainted 4.19.142-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/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report+0x8f/0x96 mm/kasan/report.c:412 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:373 [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:1703 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1716 __do_softirq+0x26c/0x9a0 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:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:check_kcov_mode kernel/kcov.c:67 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x14/0x50 kernel/kcov.c:101 Code: e8 80 0c eb ff 48 c7 05 c6 2b 28 0a 00 00 00 00 e9 39 ec ff ff 90 48 8b 34 24 65 48 8b 04 25 40 ee 01 00 65 8b 15 3c 3c 98 7e <81> e2 00 01 1f 00 75 2b 8b 90 d8 12 00 00 83 fa 02 75 20 48 8b 88 RSP: 0018:ffff888219057ab8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: ffff8882035c6700 RBX: 0000000000000200 RCX: ffffffff81b7c519 RDX: 0000000080000000 RSI: ffffffff81b7c559 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000422 R09: 0000000000000000 R10: 0000000000000007 R11: 0000000000000000 R12: ffff8882162e6700 R13: 000000000000043e R14: 0000000000000010 R15: 0000000000000003 arch_local_irq_disable arch/x86/include/asm/paravirt.h:794 [inline] lookup_bh_lru fs/buffer.c:1260 [inline] __find_get_block+0xa9/0xde0 fs/buffer.c:1291 sb_find_get_block include/linux/buffer_head.h:346 [inline] recently_deleted fs/ext4/ialloc.c:685 [inline] find_inode_bit+0x213/0x520 fs/ext4/ialloc.c:725 __ext4_new_inode+0x160c/0x5a20 fs/ext4/ialloc.c:917 ext4_symlink+0x3f5/0xc00 fs/ext4/namei.c:3146 vfs_symlink+0x453/0x6c0 fs/namei.c:4129 do_symlinkat+0x258/0x2c0 fs/namei.c:4156 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45d2e7 Code: 0f 1f 00 b8 5c 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 1d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 fd b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffce6220878 EFLAGS: 00000206 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045d2e7 RDX: 00007ffce6220913 RSI: 00000000004c30cd RDI: 00007ffce6220900 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000013 R10: 0000000000000075 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ffce62208b0 R14: 0000000000000000 R15: 00007ffce62208c0 Allocated by task 11235: __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:1668 proc_submiturb drivers/usb/core/devio.c:1822 [inline] usbdev_do_ioctl+0x773/0x3030 drivers/usb/core/devio.c:2476 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2580 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 4026: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 security_context_to_sid_core+0x2ce/0x590 security/selinux/ss/services.c:1504 security_context_to_sid+0x35/0x40 security/selinux/ss/services.c:1525 selinux_inode_setsecurity+0x197/0x3d0 security/selinux/hooks.c:3501 selinux_inode_notifysecctx+0x2b/0x60 security/selinux/hooks.c:6667 security_inode_notifysecctx+0x50/0xb0 security/security.c:1343 kernfs_refresh_inode+0x328/0x4b0 fs/kernfs/inode.c:195 kernfs_iop_permission+0x6a/0xb0 fs/kernfs/inode.c:302 do_inode_permission fs/namei.c:386 [inline] inode_permission.part.0+0x276/0x450 fs/namei.c:451 inode_permission fs/namei.c:432 [inline] may_lookup fs/namei.c:1703 [inline] link_path_walk.part.0+0x952/0x1230 fs/namei.c:2085 link_path_walk fs/namei.c:2270 [inline] path_lookupat+0xe4/0x8d0 fs/namei.c:2318 filename_lookup+0x1ac/0x5a0 fs/namei.c:2349 do_readlinkat+0xcd/0x2f0 fs/stat.c:394 __do_sys_readlinkat fs/stat.c:421 [inline] __se_sys_readlinkat fs/stat.c:418 [inline] __x64_sys_readlinkat+0x93/0xf0 fs/stat.c:418 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 ffff88808d3f5980 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88808d3f5980, ffff88808d3f59a0) The buggy address belongs to the page: page:ffffea000234fd40 count:1 mapcount:0 mapping:ffff88812c39c1c0 index:0xffff88808d3f5fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000278c408 ffffea0002a396c8 ffff88812c39c1c0 raw: ffff88808d3f5fc1 ffff88808d3f5000 0000000100000039 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808d3f5880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808d3f5900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88808d3f5980: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88808d3f5a00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808d3f5a80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================