================================================================== 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 ffff888097704810 by task kworker/u4:2/28828 CPU: 0 PID: 28828 Comm: kworker/u4:2 Not tainted 5.2.0+ #97 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+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:828 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:767 [inline] RIP: 0010:lock_is_held_type+0x272/0x320 kernel/locking/lockdep.c:4453 Code: ff df c7 83 8c 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 88 00 00 00 48 83 3d b6 bd 7a 07 00 74 31 48 8b 7d c0 57 9d <0f> 1f 44 00 00 48 83 c4 20 44 89 e0 5b 41 5c 41 5d 41 5e 41 5f 5d RSP: 0018:ffff888076bd7af8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11a5e02 RBX: ffff8880a9234080 RCX: ffff8880a9234910 RDX: dffffc0000000000 RSI: ffffffff88dabf00 RDI: 0000000000000286 RBP: ffff888076bd7b40 R08: ffff8880a9234080 R09: ffff8880a9234908 R10: fffffbfff1349eef R11: ffffffff89a4f77f R12: 0000000000000000 R13: ffff8880a9234960 R14: ffffffff88dabf00 R15: 0000000000000003 lock_is_held include/linux/lockdep.h:365 [inline] ___might_sleep+0x1c4/0x280 kernel/sched/core.c:6570 inet_twsk_purge+0x96/0x5e8 net/ipv4/inet_timewait_sock.c:267 dccp_v6_exit_batch+0x1a/0x20 net/dccp/ipv6.c:1113 ops_exit_list.isra.0+0xfc/0x150 net/core/net_namespace.c:175 cleanup_net+0x4e2/0xa70 net/core/net_namespace.c:594 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 page: page:ffffea00025dc100 refcount:0 mapcount:-128 mapping:0000000000000000 index:0xffff888097704940 flags: 0x1fffc0000000000() raw: 01fffc0000000000 ffffea000198b808 ffffea00015cc988 0000000000000000 raw: ffff888097704940 0000000000000001 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097704700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888097704780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888097704800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888097704880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888097704900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================