================================================================== BUG: KASAN: use-after-free in tcp_retransmit_timer+0x2fc3/0x33f0 net/ipv4/tcp_timer.c:480 Read of size 8 at addr ffff8880af108338 by task systemd-udevd/16909 CPU: 0 PID: 16909 Comm: systemd-udevd 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 mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 tcp_retransmit_timer+0x2fc3/0x33f0 net/ipv4/tcp_timer.c:480 tcp_write_timer_handler+0x5e6/0xa60 net/ipv4/tcp_timer.c:593 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:seccomp_run_filters+0x100/0x590 kernel/seccomp.c:211 Code: c1 e8 03 4c 01 e0 48 89 44 24 10 e8 3a cc ff ff 48 8d 7b 10 48 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 c9 03 00 00 48 8b 6b 10 <48> 8d 7d 30 48 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 c3 03 00 00 RSP: 0018:ffff888094cc7bc0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 1ffff110131510da RBX: ffff888098a886c0 RCX: ffffffff8162b98c RDX: 0000000000000000 RSI: ffffffff8162b936 RDI: ffff888098a886d0 RBP: ffffc90001b4c000 R08: 0000000000000000 R09: 000000007fff0000 R10: 0000000000000004 R11: 0000000000000000 R12: dffffc0000000000 R13: 000000007fff0000 R14: 000000007fff0000 R15: 000000007fff0000 __seccomp_filter+0x93/0xca0 kernel/seccomp.c:667 __secure_computing+0xfc/0x360 kernel/seccomp.c:796 syscall_trace_enter+0x563/0xd60 arch/x86/entry/common.c:121 do_syscall_64+0x486/0x620 arch/x86/entry/common.c:283 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb583e7ef72 Code: 41 5e 41 5f c3 48 8b 15 24 ff 2a 00 f7 d8 64 89 02 b8 ff ff ff ff eb cf 4c 63 d2 48 63 ff ba 08 00 00 00 b8 21 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 f3 c3 0f 1f 40 00 48 8b 15 f1 fe 2a 00 f7 RSP: 002b:00007ffc0ca9c968 EFLAGS: 00000246 ORIG_RAX: 0000000000000121 RAX: ffffffffffffffda RBX: 00007ffc0ca9ca60 RCX: 00007fb583e7ef72 RDX: 0000000000000008 RSI: 00007ffc0ca9ca60 RDI: ffffffffffffffff RBP: 00005557bc2ea028 R08: 0000000000000020 R09: 0000000000000018 R10: 0000000000080800 R11: 0000000000000246 R12: 00005557bc2ea010 R13: 00005557bc2f96e0 R14: 00005557bc2ea010 R15: 00005557bc2ea028 Allocated by task 8116: 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 9389: __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 ffff8880af108100 which belongs to the cache net_namespace of size 8704 The buggy address is located 568 bytes inside of 8704-byte region [ffff8880af108100, ffff8880af10a300) The buggy address belongs to the page: page:ffffea0002bc4200 count:1 mapcount:0 mapping:ffff88823b843e00 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff8880b5b46948 ffffea0000c59d08 ffff88823b843e00 raw: 0000000000000000 ffff8880af108100 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880af108200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880af108280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880af108300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880af108380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880af108400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: c1 e8 03 shr $0x3,%eax 3: 4c 01 e0 add %r12,%rax 6: 48 89 44 24 10 mov %rax,0x10(%rsp) b: e8 3a cc ff ff callq 0xffffcc4a 10: 48 8d 7b 10 lea 0x10(%rbx),%rdi 14: 48 89 f8 mov %rdi,%rax 17: 48 c1 e8 03 shr $0x3,%rax 1b: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 20: 0f 85 c9 03 00 00 jne 0x3ef 26: 48 8b 6b 10 mov 0x10(%rbx),%rbp * 2a: 48 8d 7d 30 lea 0x30(%rbp),%rdi <-- trapping instruction 2e: 48 89 f8 mov %rdi,%rax 31: 48 c1 e8 03 shr $0x3,%rax 35: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) 3a: 0f 85 c3 03 00 00 jne 0x403