audit: type=1800 audit(1636254201.910:107): pid=16822 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="syz-executor.2" name="bus" dev="sda1" ino=14638 res=0 netlink: 8 bytes leftover after parsing attributes in process `syz-executor.3'. ================================================================== 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 ffff8880b2a30b40 by task syz-executor.5/16821 CPU: 0 PID: 16821 Comm: syz-executor.5 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:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:48 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 90 90 90 90 90 90 41 57 41 56 41 55 41 54 55 53 48 89 fb RSP: 0018:ffff88804462f0d8 EFLAGS: 00010246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff888000000000 RCX: 00000000000007c0 RDX: 1ffff11009ea2f1f RSI: ffffffff818aeed1 RDI: ffff888026ccd840 RBP: ffff88804f516540 R08: ffffffffffffffe8 R09: 0000000000000000 R10: 0000000000000004 R11: 00000000f1c5d7ed R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88804462f298 clear_page arch/x86/include/asm/page_64.h:49 [inline] clear_user_page arch/x86/include/asm/page.h:28 [inline] clear_user_highpage include/linux/highmem.h:137 [inline] clear_subpage.constprop.0+0x7d/0x100 mm/memory.c:4849 process_huge_page mm/memory.c:4803 [inline] clear_huge_page+0xa2/0x460 mm/memory.c:4863 __do_huge_pmd_anonymous_page mm/huge_memory.c:583 [inline] do_huge_pmd_anonymous_page+0xbb5/0x1e60 mm/huge_memory.c:740 create_huge_pmd mm/memory.c:4066 [inline] __handle_mm_fault+0x289c/0x41c0 mm/memory.c:4270 handle_mm_fault+0x436/0xb10 mm/memory.c:4336 faultin_page mm/gup.c:539 [inline] __get_user_pages+0x6f0/0x1710 mm/gup.c:745 __get_user_pages_locked mm/gup.c:916 [inline] get_user_pages_unlocked+0x256/0x400 mm/gup.c:1039 get_user_pages_fast+0x2a0/0x350 mm/gup.c:1923 iov_iter_get_pages+0x25b/0xe80 lib/iov_iter.c:1211 __bio_iov_iter_get_pages block/bio.c:849 [inline] bio_iov_iter_get_pages+0x174/0x5d0 block/bio.c:896 __blkdev_direct_IO fs/block_dev.c:377 [inline] blkdev_direct_IO+0x830/0xf60 fs/block_dev.c:448 generic_file_read_iter+0x28b/0x2b60 mm/filemap.c:2364 blkdev_read_iter+0x127/0x1c0 fs/block_dev.c:1971 call_read_iter include/linux/fs.h:1815 [inline] aio_read+0x2d4/0x420 fs/aio.c:1534 __io_submit_one fs/aio.c:1855 [inline] io_submit_one+0xeef/0x20c0 fs/aio.c:1909 __do_sys_io_submit fs/aio.c:1953 [inline] __se_sys_io_submit+0x11b/0x4a0 fs/aio.c:1924 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f5f4f8bdae9 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:00007f5f4ce33188 EFLAGS: 00000246 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 00007f5f4f9d0f60 RCX: 00007f5f4f8bdae9 RDX: 00000000200000c0 RSI: 0000000000000008 RDI: 00007f5f4f9b4000 RBP: 00007f5f4f917f25 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffee256f4ff R14: 00007f5f4ce33300 R15: 0000000000022000 Allocated by task 16824: __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 kobject_uevent_env+0x2a5/0x1480 lib/kobject_uevent.c:623 __loop_clr_fd+0x5dd/0xe50 drivers/block/loop.c:1123 lo_release+0x1ad/0x1f0 drivers/block/loop.c:1804 __blkdev_put+0x636/0x870 fs/block_dev.c:1819 deactivate_locked_super+0x94/0x160 fs/super.c:329 deactivate_super+0x174/0x1a0 fs/super.c:360 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880b2a30b40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b2a30b40, ffff8880b2a30b60) The buggy address belongs to the page: page:ffffea0002ca8c00 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880b2a30fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002c2eac8 ffffea0002724908 ffff88813bff01c0 raw: ffff8880b2a30fc1 ffff8880b2a30000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b2a30a00: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b2a30a80: 00 00 00 00 fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880b2a30b00: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880b2a30b80: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc ffff8880b2a30c00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 48 89 47 18 mov %rax,0x18(%rdi) 4: 48 89 47 20 mov %rax,0x20(%rdi) 8: 48 89 47 28 mov %rax,0x28(%rdi) c: 48 89 47 30 mov %rax,0x30(%rdi) 10: 48 89 47 38 mov %rax,0x38(%rdi) 14: 48 8d 7f 40 lea 0x40(%rdi),%rdi 18: 75 d9 jne 0xfffffff3 1a: 90 nop 1b: c3 retq 1c: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 23: b9 00 10 00 00 mov $0x1000,%ecx 28: 31 c0 xor %eax,%eax * 2a: f3 aa rep stos %al,%es:(%rdi) <-- trapping instruction 2c: c3 retq 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 90 nop 33: 41 57 push %r15 35: 41 56 push %r14 37: 41 55 push %r13 39: 41 54 push %r12 3b: 55 push %rbp 3c: 53 push %rbx 3d: 48 89 fb mov %rdi,%rbx