================================================================== 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 ffff88808eaba6d0 by task syz-executor.4/371 CPU: 1 PID: 371 Comm: syz-executor.4 Not tainted 5.3.0-rc4 #107 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] RIP: 0010:console_unlock+0xbc7/0xf10 kernel/printk/printk.c:2471 Code: d2 88 48 c1 e8 03 42 80 3c 30 00 0f 85 e4 02 00 00 48 83 3d 8a 31 77 07 00 0f 84 91 01 00 00 e8 7f b0 16 00 48 8b 7d 98 57 9d <0f> 1f 44 00 00 e9 6d ff ff ff e8 6a b0 16 00 48 8b 7d 08 c7 05 0c RSP: 0018:ffff88804b9debb8 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13 RAX: ffff8880a7f5c640 RBX: 0000000000000200 RCX: 1ffffffff134b48e RDX: 0000000000000000 RSI: ffffffff815bc191 RDI: 0000000000000293 RBP: ffff88804b9dec40 R08: ffff8880a7f5c640 R09: fffffbfff134ae50 R10: fffffbfff134ae4f R11: ffffffff89a5727f R12: 0000000000000000 R13: ffffffff84334d70 R14: dffffc0000000000 R15: ffffffff893ca250 vprintk_emit+0x2a0/0x700 kernel/printk/printk.c:1986 vprintk_default+0x28/0x30 kernel/printk/printk.c:2013 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:386 printk+0xba/0xed kernel/printk/printk.c:2046 vlan_device_event.cold+0x1b/0x2f net/8021q/vlan.c:385 notifier_call_chain+0xc2/0x230 kernel/notifier.c:95 __raw_notifier_call_chain kernel/notifier.c:396 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:403 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1749 call_netdevice_notifiers_extack net/core/dev.c:1761 [inline] call_netdevice_notifiers net/core/dev.c:1775 [inline] __dev_notify_flags+0x121/0x2c0 net/core/dev.c:7611 dev_change_flags+0x10d/0x170 net/core/dev.c:7649 do_setlink+0x9fa/0x3520 net/core/rtnetlink.c:2497 __rtnl_newlink+0xbd8/0x16c0 net/core/rtnetlink.c:3129 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3254 rtnetlink_rcv_msg+0x463/0xb00 net/core/rtnetlink.c:5223 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5241 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x531/0x710 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x8a5/0xd60 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:637 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:657 __sys_sendto+0x262/0x380 net/socket.c:1952 __do_sys_sendto net/socket.c:1964 [inline] __se_sys_sendto net/socket.c:1960 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1960 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x413673 Code: ff 0f 83 b0 19 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 1d 2c 66 00 00 75 17 49 89 ca b8 2c 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 81 19 00 00 c3 48 83 ec 08 e8 87 fa ff ff RSP: 002b:00007ffcfa7f6818 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000413673 RDX: 0000000000000038 RSI: 0000000000a70070 RDI: 0000000000000003 RBP: 0000000000000000 R08: 00007ffcfa7f6820 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000006 R13: 0000000000000003 R14: 00007ffcfa7f68c8 R15: 0000000000000006 Allocated by task 10240: 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 14082: 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+0x77a/0xa70 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 ffff88808eaba100 which belongs to the cache net_namespace of size 6784 The buggy address is located 1488 bytes inside of 6784-byte region [ffff88808eaba100, ffff88808eabbb80) The buggy address belongs to the page: page:ffffea00023aae80 refcount:1 mapcount:0 mapping:ffff8880a9ddd000 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea0002a09d08 ffffea0001b14f88 ffff8880a9ddd000 raw: 0000000000000000 ffff88808eaba100 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808eaba580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808eaba600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808eaba680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88808eaba700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808eaba780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================