================================================================== BUG: KASAN: use-after-free in tcp_retransmit_timer+0x2fb8/0x3450 net/ipv4/tcp_timer.c:511 Read of size 8 at addr ffff888062fab5d8 by task systemd-udevd/23383 CPU: 1 PID: 23383 Comm: systemd-udevd Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 tcp_retransmit_timer+0x2fb8/0x3450 net/ipv4/tcp_timer.c:511 tcp_write_timer_handler+0x5b8/0xb00 net/ipv4/tcp_timer.c:622 tcp_write_timer+0xa2/0x2b0 net/ipv4/tcp_timer.c:642 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x45/0xc0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 RIP: 0033:0x7f50604a5430 Code: 87 35 25 00 00 44 8b 85 28 fb ff ff 45 29 c8 45 39 c7 0f 87 5a 19 00 00 44 03 8d 10 fb ff ff 48 8b a5 18 fb ff ff 0f 1f 40 00 <83> 85 58 fb ff ff 01 48 83 bd 38 fb ff ff 00 0f 85 ac 16 00 00 48 RSP: 002b:00007ffd815bef90 EFLAGS: 00000246 RAX: 000055569842c5a0 RBX: 00007ffd815bf500 RCX: 0000000000000000 RDX: 0000000000000062 RSI: 000055569842c5a1 RDI: 00007ffd815bf500 RBP: 00007ffd815bf4f0 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 00007ffd815bf4b8 R12: 0000555697953382 R13: 00007ffd815bf638 R14: 0000000000000000 R15: 00000000ffffffff Allocated by task 8913: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] __kasan_slab_alloc+0x84/0xa0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2921 [inline] kmem_cache_alloc+0x219/0x3a0 mm/slub.c:2926 kmem_cache_zalloc include/linux/slab.h:676 [inline] net_alloc net/core/net_namespace.c:409 [inline] copy_net_ns+0x12a/0x760 net/core/net_namespace.c:461 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x445/0x8e0 kernel/fork.c:2996 __do_sys_unshare kernel/fork.c:3064 [inline] __se_sys_unshare kernel/fork.c:3062 [inline] __ia32_sys_unshare+0x2c/0x40 kernel/fork.c:3062 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x67/0xe0 arch/x86/entry/common.c:143 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff888062fab380 which belongs to the cache net_namespace of size 6336 The buggy address is located 600 bytes inside of 6336-byte region [ffff888062fab380, ffff888062facc40) The buggy address belongs to the page: page:ffffea00018bea00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888062fab380 pfn:0x62fa8 head:ffffea00018bea00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 0000000100000001 ffff8880165cc000 raw: ffff888062fab380 0000000080040002 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8584, ts 124962213511, free_ts 0 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1645 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1785 new_slab mm/slub.c:1848 [inline] new_slab_objects mm/slub.c:2594 [inline] ___slab_alloc+0x4a1/0x810 mm/slub.c:2757 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2797 slab_alloc_node mm/slub.c:2879 [inline] slab_alloc mm/slub.c:2921 [inline] kmem_cache_alloc+0x34b/0x3a0 mm/slub.c:2926 kmem_cache_zalloc include/linux/slab.h:676 [inline] net_alloc net/core/net_namespace.c:409 [inline] copy_net_ns+0x12a/0x760 net/core/net_namespace.c:461 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:226 ksys_unshare+0x445/0x8e0 kernel/fork.c:2996 __do_sys_unshare kernel/fork.c:3064 [inline] __se_sys_unshare kernel/fork.c:3062 [inline] __ia32_sys_unshare+0x2c/0x40 kernel/fork.c:3062 do_syscall_32_irqs_on arch/x86/entry/common.c:78 [inline] __do_fast_syscall_32+0x67/0xe0 arch/x86/entry/common.c:143 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:168 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c page_owner free stack trace missing Memory state around the buggy address: ffff888062fab480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888062fab500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888062fab580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888062fab600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888062fab680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================