netlink: 'syz-executor.1': attribute type 4 has an invalid length. usb usb9: usbfs: process 21882 (syz-executor.4) 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 ffff88809558c440 by task syz-executor.1/21880 CPU: 0 PID: 21880 Comm: syz-executor.1 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:should_resched arch/x86/include/asm/preempt.h:99 [inline] RIP: 0010:__local_bh_enable_ip+0x18d/0x270 kernel/softirq.c:196 Code: 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 dd 00 00 00 48 83 3d c8 5f b8 08 00 0f 84 8d 00 00 00 fb 66 0f 1f 44 00 00 <65> 8b 05 6c bc c8 7e 85 c0 74 7d 5b 5d 41 5c c3 80 3d f3 87 d5 09 RSP: 0018:ffff88809186ee60 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3053 RBX: 0000000000000200 RCX: 1ffff11012e51985 RDX: dffffc0000000000 RSI: ffff88809728cc08 RDI: ffff88809728cc04 RBP: ffffffff86a43e12 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809728c380 R13: 00000000000021e8 R14: 0000000000000000 R15: 0000000000000001 local_bh_enable include/linux/bottom_half.h:32 [inline] get_next_corpse net/netfilter/nf_conntrack_core.c:1907 [inline] nf_ct_iterate_cleanup+0x239/0x520 net/netfilter/nf_conntrack_core.c:1930 nf_ct_iterate_cleanup_net net/netfilter/nf_conntrack_core.c:2015 [inline] nf_ct_iterate_cleanup_net+0x113/0x170 net/netfilter/nf_conntrack_core.c:2000 masq_device_event+0xd6/0x110 net/ipv4/netfilter/nf_nat_masquerade_ipv4.c:100 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] __dev_notify_flags+0x1da/0x2b0 net/core/dev.c:7719 dev_change_flags+0xf0/0x140 net/core/dev.c:7753 do_setlink+0x14f1/0x3540 net/core/rtnetlink.c:2449 rtnl_setlink+0x243/0x350 net/core/rtnetlink.c:2709 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 sock_write_iter+0x287/0x3c0 net/socket.c:966 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_writev+0x153/0x2e0 fs/read_write.c:1005 do_writev+0x136/0x330 fs/read_write.c:1040 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f6e925060e9 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f6e90e7b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f6e92618f60 RCX: 00007f6e925060e9 RDX: 0000000000000001 RSI: 0000000020000180 RDI: 0000000000000003 RBP: 00007f6e9256008d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffeb07faef R14: 00007f6e90e7b300 R15: 0000000000022000 Allocated by task 21882: __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 19276: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kfree_const+0x51/0x60 mm/util.c:38 kobject_cleanup lib/kobject.c:668 [inline] kobject_release lib/kobject.c:691 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x2b5/0x5d0 lib/kobject.c:708 netdev_run_todo+0x77f/0xab0 net/core/dev.c:9011 ip_tunnel_delete_nets+0x3d8/0x580 net/ipv4/ip_tunnel.c:1089 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:554 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88809558c440 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88809558c440, ffff88809558c460) The buggy address belongs to the page: page:ffffea0002556300 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff88809558cfc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002cbffc8 ffffea0002d18a88 ffff88813bff01c0 raw: ffff88809558cfc1 ffff88809558c000 000000010000003d 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809558c300: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88809558c380: fb fb fb fb fc fc fc fc 00 00 00 02 fc fc fc fc >ffff88809558c400: 07 fc fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff88809558c480: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88809558c500: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 6 bytes skipped: 0: df 48 c1 fisttps -0x3f(%rax) 3: e8 03 80 3c 10 callq 0x103c800b 8: 00 0f add %cl,(%rdi) a: 85 dd test %ebx,%ebp c: 00 00 add %al,(%rax) e: 00 48 83 add %cl,-0x7d(%rax) 11: 3d c8 5f b8 08 cmp $0x8b85fc8,%eax 16: 00 0f add %cl,(%rdi) 18: 84 8d 00 00 00 fb test %cl,-0x5000000(%rbp) 1e: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) * 24: 65 8b 05 6c bc c8 7e mov %gs:0x7ec8bc6c(%rip),%eax # 0x7ec8bc97 <-- trapping instruction 2b: 85 c0 test %eax,%eax 2d: 74 7d je 0xac 2f: 5b pop %rbx 30: 5d pop %rbp 31: 41 5c pop %r12 33: c3 retq 34: 80 .byte 0x80 35: 3d f3 87 d5 09 cmp $0x9d587f3,%eax