================================================================== BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 Read of size 4 at addr ffff88808fed8650 by task syz-executor.3/30698 CPU: 0 PID: 30698 Comm: syz-executor.3 Not tainted 5.3.0-rc3+ #163 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:612 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131 tcp_probe_timer net/ipv4/tcp_timer.c:360 [inline] tcp_write_timer_handler+0x8c6/0x8d0 net/ipv4/tcp_timer.c:596 tcp_write_timer+0xa8/0x1e0 net/ipv4/tcp_timer.c:612 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers kernel/time/timer.c:1685 [inline] __run_timers kernel/time/timer.c:1653 [inline] run_timer_softirq+0x697/0x17a0 kernel/time/timer.c:1698 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:537 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1095 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 RIP: 0010:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:49 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 90 90 90 90 90 90 55 48 89 e5 41 57 41 56 41 55 41 54 53 RSP: 0000:ffff88809a897760 EFLAGS: 00010246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000381 RCX: 0000000000000540 RDX: 1ffff11012be66b1 RSI: dffffc0000000000 RDI: ffff888083418ac0 RBP: ffff88809a8977b8 R08: ffff888095f323c0 R09: ffffed1010683000 R10: fffff9400041a0c6 R11: ffffea00020d0637 R12: ffffea00020d0600 R13: 0000000000000000 R14: ffffea00020d0600 R15: ffff888095f323c0 get_page_from_freelist+0x1c35/0x39d0 mm/page_alloc.c:3691 __alloc_pages_nodemask+0x2d0/0x900 mm/page_alloc.c:4725 alloc_pages_vma+0xdd/0x560 mm/mempolicy.c:2096 alloc_zeroed_user_highpage_movable include/linux/highmem.h:208 [inline] wp_page_copy+0xbc3/0x15e0 mm/memory.c:2312 do_wp_page+0x499/0x14d0 mm/memory.c:2619 handle_pte_fault mm/memory.c:3856 [inline] __handle_mm_fault+0x22f7/0x3f20 mm/memory.c:3964 handle_mm_fault+0x1b5/0x6b0 mm/memory.c:4001 do_user_addr_fault arch/x86/mm/fault.c:1441 [inline] __do_page_fault+0x536/0xdd0 arch/x86/mm/fault.c:1506 do_page_fault+0x38/0x590 arch/x86/mm/fault.c:1530 page_fault+0x39/0x40 arch/x86/entry/entry_64.S:1202 RIP: 0033:0x40e9c8 Code: 8b 34 c6 4a 8d 04 2e 48 3d ff ff ff 7e 0f 86 77 ff ff ff bf 35 ee 4b 00 31 c0 e8 63 33 ff ff 31 ff e8 ac 2f ff ff 0f 1f 40 00 <89> 3c b5 00 00 73 00 eb b6 31 ed 0f 1f 44 00 00 80 3d 9e 1a 66 00 RSP: 002b:00007ffe39928600 EFLAGS: 00010246 RAX: 000000009b158ee0 RBX: 00000000800e568d RCX: 0000001b2ea20000 RDX: 0000000000000000 RSI: 0000000000000ee0 RDI: ffffffff9b158ee0 RBP: 0000000000000008 R08: 000000009b158ee0 R09: 000000009b158ee4 R10: 00007ffe399287a0 R11: 0000000000000246 R12: 000000000075bfa8 R13: 0000000080000000 R14: 00007f90a867f008 R15: 0000000000000008 Allocated by task 3785: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:460 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:495 slab_post_alloc_hook mm/slab.h:520 [inline] slab_alloc mm/slab.c:3319 [inline] kmem_cache_alloc+0x121/0x710 mm/slab.c:3483 kmem_cache_zalloc include/linux/slab.h:738 [inline] net_alloc net/core/net_namespace.c:410 [inline] copy_net_ns+0xf1/0x41f net/core/net_namespace.c:462 create_new_namespaces+0x400/0x7b0 kernel/nsproxy.c:103 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:202 ksys_unshare+0x444/0x980 kernel/fork.c:2831 __do_sys_unshare kernel/fork.c:2899 [inline] __se_sys_unshare kernel/fork.c:2897 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2897 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 15559: save_stack+0x23/0x90 mm/kasan/common.c:69 set_track mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 mm/kasan/common.c:457 __cache_free mm/slab.c:3425 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3693 net_free net/core/net_namespace.c:438 [inline] net_drop_ns.part.0+0x70/0x90 net/core/net_namespace.c:445 net_drop_ns net/core/net_namespace.c:444 [inline] cleanup_net+0x774/0xa60 net/core/net_namespace.c:613 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88808fed8080 which belongs to the cache net_namespace of size 6784 The buggy address is located 1488 bytes inside of 6784-byte region [ffff88808fed8080, ffff88808fed9b00) The buggy address belongs to the page: page:ffffea00023fb600 refcount:1 mapcount:0 mapping:ffff8880a99a1e00 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000283b888 ffffea0002917408 ffff8880a99a1e00 raw: 0000000000000000 ffff88808fed8080 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808fed8500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808fed8580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808fed8600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808fed8680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808fed8700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================