================================================================== BUG: KASAN: use-after-free in tcp_orphan_retries net/ipv4/tcp_timer.c:141 [inline] BUG: KASAN: use-after-free in tcp_probe_timer net/ipv4/tcp_timer.c:374 [inline] BUG: KASAN: use-after-free in tcp_write_timer_handler+0x92a/0x960 net/ipv4/tcp_timer.c:604 Read of size 4 at addr ffff8880a0408828 by task syz-fuzzer/7924 CPU: 1 PID: 7924 Comm: syz-fuzzer Not tainted 4.20.0+ #3 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+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 tcp_orphan_retries net/ipv4/tcp_timer.c:141 [inline] tcp_probe_timer net/ipv4/tcp_timer.c:374 [inline] tcp_write_timer_handler+0x92a/0x960 net/ipv4/tcp_timer.c:604 tcp_write_timer+0x10e/0x1d0 net/ipv4/tcp_timer.c:620 call_timer_fn+0x254/0x900 kernel/time/timer.c:1325 expire_timers kernel/time/timer.c:1362 [inline] __run_timers+0x6fc/0xd50 kernel/time/timer.c:1681 run_timer_softirq+0x52/0xb0 kernel/time/timer.c:1694 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1b7/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0033:0x6f931a Code: 00 00 00 48 8d 48 08 48 89 4c 24 48 48 8b 50 10 48 89 54 24 40 48 8b 40 08 31 db eb 61 48 89 5c 24 38 48 89 44 24 50 48 8b 10 <48> 8b 58 08 48 89 14 24 48 89 5c 24 08 48 89 4c 24 10 48 c7 44 24 RSP: 002b:000000c42756fc48 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: 000000c426714460 RBX: 0000000000000000 RCX: 000000c4274f29c8 RDX: 0000000000b9f0c0 RSI: 000000c42756fe18 RDI: 000000c42756fdd0 RBP: 000000c42756fca0 R08: 000000c4200611e0 R09: 0000000000000008 R10: 000000c4287f3180 R11: 0000000000000004 R12: 0000000000000000 R13: 0000000000000020 R14: 0000000000000013 R15: 00000000000004bf Allocated by task 7945: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3554 kmem_cache_zalloc include/linux/slab.h:731 [inline] net_alloc net/core/net_namespace.c:384 [inline] copy_net_ns+0x155/0x4b0 net/core/net_namespace.c:424 create_new_namespaces+0x4ce/0x930 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:206 ksys_unshare+0x6d7/0xfb0 kernel/fork.c:2544 __do_sys_unshare kernel/fork.c:2612 [inline] __se_sys_unshare kernel/fork.c:2610 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:2610 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2396: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3760 net_free net/core/net_namespace.c:400 [inline] net_drop_ns.part.0+0x129/0x150 net/core/net_namespace.c:407 net_drop_ns net/core/net_namespace.c:406 [inline] cleanup_net+0x819/0xb10 net/core/net_namespace.c:569 process_one_work+0xd0c/0x1ce0 kernel/workqueue.c:2153 worker_thread+0x143/0x14a0 kernel/workqueue.c:2296 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8880a04080c0 which belongs to the cache net_namespace of size 8576 The buggy address is located 1896 bytes inside of 8576-byte region [ffff8880a04080c0, ffff8880a040a240) The buggy address belongs to the page: page:ffffea0002810200 count:1 mapcount:0 mapping:ffff88821b67bb00 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffff8880a9f82548 ffffea0002316c08 ffff88821b67bb00 raw: 0000000000000000 ffff8880a04080c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a0408700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0408780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a0408800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a0408880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a0408900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================