IPVS: sync thread started: state = BACKUP, mcast_ifn = veth1_to_bond, syncid = 0, id = 0 usb usb9: usbfs: process 12005 (syz-executor.1) did not claim interface 0 before use ================================================================== 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 ffff8880a9c794c0 by task syz-executor.5/8133 CPU: 1 PID: 8133 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:orc_ip arch/x86/kernel/unwind_orc.c:26 [inline] RIP: 0010:__orc_find+0x80/0xf0 arch/x86/kernel/unwind_orc.c:48 Code: fa 02 48 01 d0 48 d1 f8 48 8d 5c 85 00 48 89 d8 48 c1 e8 03 42 0f b6 14 38 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 48 <48> 63 03 48 01 d8 48 39 c1 73 b0 4c 8d 63 fc 49 39 ec 73 b3 4d 29 RSP: 0018:ffff888099aff758 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000007 RBX: ffffffff8b4ac55c RCX: ffffffff8331e30f RDX: 0000000000000000 RSI: ffffffff8bb48470 RDI: ffffffff8b4ac554 RBP: ffffffff8b4ac554 R08: 0000000000000000 R09: ffffffff8bb48470 R10: ffff888099aff92f R11: 0000000000074071 R12: ffffffff8b4ac564 R13: ffffffff8b4ac554 R14: ffffffff8b4ac554 R15: dffffc0000000000 orc_find arch/x86/kernel/unwind_orc.c:159 [inline] unwind_next_frame+0x339/0x1400 arch/x86/kernel/unwind_orc.c:422 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 slab_post_alloc_hook mm/slab.h:445 [inline] slab_alloc mm/slab.c:3397 [inline] kmem_cache_alloc_trace+0x11a/0x380 mm/slab.c:3623 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] aa_alloc_file_ctx security/apparmor/include/file.h:60 [inline] apparmor_file_alloc_security+0x394/0xad0 security/apparmor/lsm.c:438 security_file_alloc+0x40/0x90 security/security.c:880 __alloc_file+0xd8/0x340 fs/file_table.c:105 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 alloc_file+0x5e/0x4d0 fs/file_table.c:192 alloc_file_pseudo+0x165/0x250 fs/file_table.c:231 sock_alloc_file+0x48/0x180 net/socket.c:406 sock_map_fd net/socket.c:429 [inline] __sys_socket+0x13d/0x200 net/socket.c:1462 __do_sys_socket net/socket.c:1467 [inline] __se_sys_socket net/socket.c:1465 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1465 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f8154c78787 Code: f0 ff ff 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 66 90 b8 29 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:00007ffcaeb3dbb8 EFLAGS: 00000206 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8154c78787 RDX: 0000000000000006 RSI: 0000000000000001 RDI: 0000000000000002 RBP: 00007ffcaeb3dbe0 R08: 0000000000000000 R09: ff00000000000000 R10: 0000000000000010 R11: 0000000000000206 R12: 0000000000000032 R13: 00000000001b2164 R14: 0000000000000002 R15: 00007f8154d5ad20 Allocated by task 12005: __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 8134: __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:1705 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:2050 __do_sys_getsockopt net/socket.c:2061 [inline] __se_sys_getsockopt net/socket.c:2058 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2058 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 ffff8880a9c794c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a9c794c0, ffff8880a9c794e0) The buggy address belongs to the page: page:ffffea0002a71e40 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880a9c79fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea000244b648 ffffea0002bbc248 ffff88813bff01c0 raw: ffff8880a9c79fc1 ffff8880a9c79000 000000010000003b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a9c79380: 05 fc fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ffff8880a9c79400: 06 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a9c79480: 05 fc fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880a9c79500: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880a9c79580: 00 00 00 02 fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: fa cli 1: 02 48 01 add 0x1(%rax),%cl 4: d0 48 d1 rorb -0x2f(%rax) 7: f8 clc 8: 48 8d 5c 85 00 lea 0x0(%rbp,%rax,4),%rbx d: 48 89 d8 mov %rbx,%rax 10: 48 c1 e8 03 shr $0x3,%rax 14: 42 0f b6 14 38 movzbl (%rax,%r15,1),%edx 19: 48 89 d8 mov %rbx,%rax 1c: 83 e0 07 and $0x7,%eax 1f: 83 c0 03 add $0x3,%eax 22: 38 d0 cmp %dl,%al 24: 7c 04 jl 0x2a 26: 84 d2 test %dl,%dl 28: 75 48 jne 0x72 * 2a: 48 63 03 movslq (%rbx),%rax <-- trapping instruction 2d: 48 01 d8 add %rbx,%rax 30: 48 39 c1 cmp %rax,%rcx 33: 73 b0 jae 0xffffffe5 35: 4c 8d 63 fc lea -0x4(%rbx),%r12 39: 49 39 ec cmp %rbp,%r12 3c: 73 b3 jae 0xfffffff1 3e: 4d rex.WRB 3f: 29 .byte 0x29