================================================================== 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 ffff8880ae82a180 by task syz-executor.2/7052 CPU: 0 PID: 7052 Comm: syz-executor.2 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:ext4_es_lookup_extent+0x0/0xb60 fs/ext4/extents_status.c:781 Code: ff e9 b4 fc ff ff 4c 89 f7 e8 ac b0 bc ff e9 1f fe ff ff 48 c7 c7 08 18 0f 8b e8 9b b0 bc ff e9 d3 fe ff ff 66 0f 1f 44 00 00 <41> 57 41 56 41 55 41 54 41 89 f4 55 53 48 83 ec 20 48 89 3c 24 48 RSP: 0018:ffff888066fe78a8 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: ffff888066fe7930 RBX: ffff888066fe7a08 RCX: ffffffff81df1342 RDX: ffff888066fe7930 RSI: 0000000000000000 RDI: ffff88806ef6e5f0 RBP: ffff88806ef6e5f0 R08: ffff888066fe7ba8 R09: 00000000ffffffff R10: 0000000000000005 R11: 000000007f6563fd R12: 0000000000000000 R13: 0000000000000000 R14: ffff88806ef6e5f0 R15: ffff888066fe7a14 ext4_map_blocks+0x15c/0x1a50 fs/ext4/inode.c:547 ext4_getblk+0x3f9/0x4f0 fs/ext4/inode.c:993 ext4_bread_batch+0x7c/0x430 fs/ext4/inode.c:1063 __ext4_find_entry+0x4cd/0xea0 fs/ext4/namei.c:1436 ext4_lookup_entry fs/ext4/namei.c:1535 [inline] ext4_lookup fs/ext4/namei.c:1603 [inline] ext4_lookup+0x16b/0x660 fs/ext4/namei.c:1594 __lookup_hash+0x117/0x180 fs/namei.c:1547 filename_create+0x186/0x490 fs/namei.c:3639 user_path_create fs/namei.c:3696 [inline] do_symlinkat+0xe1/0x2c0 fs/namei.c:4149 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f87ebc5b957 Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe18338f68 EFLAGS: 00000206 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f87ebc5b957 RDX: ffffffffffffffb8 RSI: 00007f87ebcb612e RDI: 00007f87ebcb52c2 RBP: 0000000000000001 R08: 0000000000000000 R09: 00007ffe183389e0 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffe18339030 Allocated by task 7043: __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 9: __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 ffff8880ae82a180 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880ae82a180, ffff8880ae82a1a0) The buggy address belongs to the page: page:ffffea0002ba0a80 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880ae82afc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002b704c8 ffffea0002bf4388 ffff88813bff01c0 raw: ffff8880ae82afc1 ffff8880ae82a000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ae82a080: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880ae82a100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880ae82a180: 01 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ^ ffff8880ae82a200: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880ae82a280: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: e9 b4 fc ff ff jmpq 0xfffffcb9 5: 4c 89 f7 mov %r14,%rdi 8: e8 ac b0 bc ff callq 0xffbcb0b9 d: e9 1f fe ff ff jmpq 0xfffffe31 12: 48 c7 c7 08 18 0f 8b mov $0xffffffff8b0f1808,%rdi 19: e8 9b b0 bc ff callq 0xffbcb0b9 1e: e9 d3 fe ff ff jmpq 0xfffffef6 23: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) * 29: 41 57 push %r15 <-- trapping instruction 2b: 41 56 push %r14 2d: 41 55 push %r13 2f: 41 54 push %r12 31: 41 89 f4 mov %esi,%r12d 34: 55 push %rbp 35: 53 push %rbx 36: 48 83 ec 20 sub $0x20,%rsp 3a: 48 89 3c 24 mov %rdi,(%rsp) 3e: 48 rex.W