================================================================== 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 ffff8880b59e7140 by task syz-executor.0/14694 CPU: 1 PID: 14694 Comm: syz-executor.0 Not tainted 4.19.187-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:535 [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:queue_lock kernel/futex.c:2325 [inline] RIP: 0010:futex_wait_setup+0x136/0x300 kernel/futex.c:2774 Code: 85 ed 0f 85 92 01 00 00 e8 d7 86 0a 00 4c 89 f7 e8 1f ae ff ff be 04 00 00 00 48 89 c7 49 89 c5 e8 8f 34 40 00 f0 41 ff 45 00 <48> 8b 44 24 08 4d 8d 45 08 80 38 00 0f 85 8a 01 00 00 48 8b 04 24 RSP: 0018:ffff88803cef7998 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: fffff5200018dcd1 RBX: ffff88803cef7ab8 RCX: ffffffff8157d701 RDX: fffff5200018dcd1 RSI: 0000000000000004 RDI: ffffc90000c6e680 RBP: ffffed10079def57 R08: 0000000000000001 R09: fffff5200018dcd0 R10: ffffc90000c6e683 R11: 0000000000000000 R12: 000000000056bf68 R13: ffffc90000c6e680 R14: ffff88803cef7b80 R15: ffff88803cef79f0 futex_wait+0x1c5/0x610 kernel/futex.c:2832 do_futex+0x15b/0x18a0 kernel/futex.c:3890 __do_sys_futex kernel/futex.c:3951 [inline] __se_sys_futex+0x28f/0x3b0 kernel/futex.c:3919 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466459 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:00007ff07fbfa218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 000000000056bf68 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056bf68 RBP: 000000000056bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf6c R13: 00007ffd4a5e2def R14: 00007ff07fbfa300 R15: 0000000000022000 Allocated by task 14694: __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 8123: __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 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:870 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1027 [inline] do_ipt_get_ctl+0x6e8/0x8e0 net/ipv4/netfilter/ip_tables.c:1703 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1574 [inline] ip_getsockopt+0x167/0x1c0 net/ipv4/ip_sockglue.c:1554 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3629 __sys_getsockopt+0x135/0x210 net/socket.c:1938 __do_sys_getsockopt net/socket.c:1949 [inline] __se_sys_getsockopt net/socket.c:1946 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:1946 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 ffff8880b59e7140 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b59e7140, ffff8880b59e7160) The buggy address belongs to the page: page:ffffea0002d679c0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880b59e7fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a56e88 ffffea0001097f48 ffff88813bff01c0 raw: ffff8880b59e7fc1 ffff8880b59e7000 0000000100000034 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b59e7000: fb fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc ffff8880b59e7080: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880b59e7100: 00 fc fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880b59e7180: 07 fc fc fc fc fc fc fc 00 fc fc fc fc fc fc fc ffff8880b59e7200: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ==================================================================