device veth1_macvtap left promiscuous mode device veth0_macvtap left promiscuous mode device veth1_vlan left promiscuous mode device veth0_vlan left promiscuous mode ================================================================== BUG: KASAN: use-after-free in tcp_orphan_retries net/ipv4/tcp_timer.c:127 [inline] BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:369 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0xa4b/0xa60 net/ipv4/tcp_timer.c:597 Read of size 4 at addr ffff8880aa934828 by task kworker/u4:6/9445 CPU: 0 PID: 9445 Comm: kworker/u4:6 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net 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 mm/kasan/report.c:412 [inline] __asan_report_load4_noabort+0x88/0x90 mm/kasan/report.c:432 tcp_orphan_retries net/ipv4/tcp_timer.c:127 [inline] tcp_probe_timer net/ipv4/tcp_timer.c:369 [inline] tcp_write_timer_handler+0xa4b/0xa60 net/ipv4/tcp_timer.c:597 tcp_write_timer+0x103/0x1b0 net/ipv4/tcp_timer.c:613 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:ffff8880522af6f8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3053 RBX: 0000000000000200 RCX: 1ffff1100a4535ec RDX: dffffc0000000000 RSI: ffff88805229af40 RDI: ffff88805229aec4 RBP: ffffffff86a43e12 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88805229a640 R13: 00000000000037f0 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+0xae/0xe0 net/ipv6/netfilter/nf_nat_masquerade_ipv6.c:77 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] dev_close_many+0x323/0x670 net/core/dev.c:1514 rollback_registered_many+0x2f7/0xe70 net/core/dev.c:8173 unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9324 unregister_netdevice_many net/core/dev.c:9323 [inline] default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9795 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 Allocated by task 8136: kmem_cache_alloc+0x122/0x370 mm/slab.c:3559 kmem_cache_zalloc include/linux/slab.h:699 [inline] net_alloc net/core/net_namespace.c:386 [inline] copy_net_ns+0x106/0x340 net/core/net_namespace.c:426 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2542 __do_sys_unshare kernel/fork.c:2610 [inline] __se_sys_unshare kernel/fork.c:2608 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:2608 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9445: __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x7f/0x260 mm/slab.c:3765 net_free net/core/net_namespace.c:402 [inline] net_drop_ns+0x73/0x90 net/core/net_namespace.c:409 cleanup_net+0x64c/0x8b0 net/core/net_namespace.c:572 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 ffff8880aa9340c0 which belongs to the cache net_namespace of size 8704 The buggy address is located 1896 bytes inside of 8704-byte region [ffff8880aa9340c0, ffff8880aa9362c0) The buggy address belongs to the page: page:ffffea0002aa4d00 count:1 mapcount:0 mapping:ffff88823b843e00 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffffea0002459408 ffffea0002bcd308 ffff88823b843e00 raw: 0000000000000000 ffff8880aa9340c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880aa934700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aa934780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880aa934800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880aa934880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880aa934900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- 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