================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in test_and_set_bit include/asm-generic/bitops/instrumented-atomic.h:70 [inline] BUG: KASAN: use-after-free in l2tp_session_delete+0x23/0x4a0 net/l2tp/l2tp_core.c:1568 Write of size 8 at addr ffff888128d53808 by task kworker/u4:31/3271 CPU: 1 PID: 3271 Comm: kworker/u4:31 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Workqueue: l2tp l2tp_tunnel_del_work Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x10f/0x150 mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] test_and_set_bit include/asm-generic/bitops/instrumented-atomic.h:70 [inline] l2tp_session_delete+0x23/0x4a0 net/l2tp/l2tp_core.c:1568 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1223 [inline] l2tp_tunnel_del_work+0x180/0x3d0 net/l2tp/l2tp_core.c:1261 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 7890: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc+0x13d/0x2c0 mm/slub.c:4436 kmalloc include/linux/slab.h:624 [inline] kzalloc include/linux/slab.h:750 [inline] l2tp_session_create+0x39/0xb60 net/l2tp/l2tp_core.c:1604 pppol2tp_connect+0xbab/0x15c0 net/l2tp/l2tp_ppp.c:772 __sys_connect_file net/socket.c:1922 [inline] __sys_connect+0x3cb/0x450 net/socket.c:1939 __do_sys_connect net/socket.c:1949 [inline] __se_sys_connect net/socket.c:1946 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:1946 x64_sys_call+0x7c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:43 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 7918: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kfree+0xc4/0x270 mm/slub.c:4588 l2tp_session_free net/l2tp/l2tp_core.c:168 [inline] l2tp_session_dec_refcount+0xaf/0x1a0 net/l2tp/l2tp_core.c:205 pppol2tp_session_destruct+0xb1/0xf0 net/l2tp/l2tp_ppp.c:408 __sk_destruct+0x52/0x5c0 net/core/sock.c:1967 sk_destruct net/core/sock.c:2012 [inline] __sk_free+0x30a/0x400 net/core/sock.c:2023 sk_free+0x54/0x90 net/core/sock.c:2034 sock_put include/net/sock.h:1988 [inline] pppol2tp_put_sk+0x7a/0xb0 net/l2tp/l2tp_ppp.c:391 rcu_do_batch+0x4c1/0xbf0 kernel/rcu/tree.c:2523 rcu_core+0x4a3/0xef0 kernel/rcu/tree.c:2763 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2776 handle_softirqs+0x250/0x560 kernel/softirq.c:583 __do_softirq kernel/softirq.c:621 [inline] invoke_softirq kernel/softirq.c:443 [inline] __irq_exit_rcu+0x52/0xf0 kernel/softirq.c:670 irq_exit_rcu+0x9/0x10 kernel/softirq.c:682 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:676 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3011 [inline] call_rcu+0x10b/0xf60 kernel/rcu/tree.c:3129 pppol2tp_release+0x1e3/0x2b0 net/l2tp/l2tp_ppp.c:447 __sock_release net/socket.c:649 [inline] sock_close+0xb8/0x200 net/socket.c:1335 __fput+0x22b/0x900 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 __call_rcu_common kernel/rcu/tree.c:3011 [inline] call_rcu+0x10b/0xf60 kernel/rcu/tree.c:3129 fib6_info_release include/net/ip6_fib.h:349 [inline] __ip6_del_rt+0xf5/0x150 net/ipv6/route.c:3906 ip6_del_rt+0xbe/0x110 net/ipv6/route.c:3917 __ipv6_ifa_notify+0x872/0xe70 net/ipv6/addrconf.c:6235 addrconf_ifdown+0xdb1/0x1910 net/ipv6/addrconf.c:3923 addrconf_notify+0x3bd/0xe00 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2070 [inline] call_netdevice_notifiers_extack net/core/dev.c:2082 [inline] call_netdevice_notifiers net/core/dev.c:2096 [inline] dev_close_many+0x325/0x4d0 net/core/dev.c:1671 unregister_netdevice_many+0x477/0x1a00 net/core/dev.c:11152 ip_tunnel_delete_nets+0x343/0x390 net/ipv4/ip_tunnel.c:1123 ipip_exit_batch_net+0x22/0x30 net/ipv4/ipip.c:652 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x605/0xae0 net/core/net_namespace.c:599 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888128d53800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff888128d53800, ffff888128d53a00) The buggy address belongs to the page: page:ffffea0004a35400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888128d52000 pfn:0x128d50 head:ffffea0004a35400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea0004647508 ffffea00049fa608 ffff888100042f00 raw: ffff888128d52000 000000000010000d 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 286, ts 19493046802, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4485 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc_trace+0x146/0x270 mm/slub.c:3272 kmalloc include/linux/slab.h:619 [inline] kmalloc_array include/linux/slab.h:658 [inline] rtnl_newlink+0x17f/0x1900 net/core/rtnetlink.c:3571 rtnetlink_rcv_msg+0x9fd/0xcb0 net/core/rtnetlink.c:5653 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2511 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5671 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x86c/0xa30 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x879/0xb80 net/netlink/af_netlink.c:1922 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x46d/0x620 net/socket.c:2062 __do_sys_sendto net/socket.c:2074 [inline] __se_sys_sendto net/socket.c:2070 [inline] __x64_sys_sendto+0xe5/0x100 net/socket.c:2070 page_owner free stack trace missing Memory state around the buggy address: ffff888128d53700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888128d53780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888128d53800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888128d53880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888128d53900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 3271 at lib/refcount.c:28 refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28 Modules linked in: CPU: 1 PID: 3271 Comm: kworker/u4:31 Tainted: G B W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Workqueue: l2tp l2tp_tunnel_del_work RIP: 0010:refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28 Code: 04 01 48 c7 c7 80 44 63 85 e8 8c 03 5a 02 0f 0b eb c3 e8 f3 a0 19 ff c6 05 20 14 96 04 01 48 c7 c7 e0 44 63 85 e8 70 03 5a 02 <0f> 0b eb a7 e8 d7 a0 19 ff c6 05 01 14 96 04 01 48 c7 c7 20 44 63 RSP: 0018:ffffc90002b9fc40 EFLAGS: 00010246 RAX: eafdbc7eb90f0c00 RBX: 0000000000000003 RCX: ffff888119a88000 RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffffc90002b9fc50 R08: ffff8881f7132f3f R09: 1ffff1103ee265e7 R10: dffffc0000000000 R11: ffffed103ee265e8 R12: 0000000000000000 R13: dffffc0000000000 R14: 0000000000000003 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9822c772f8 CR3: 000000011040c000 CR4: 00000000003506a0 DR0: ffffffffffffffff DR1: 00000000000001f8 DR2: 0000000000000002 DR3: ffffffffefffff15 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] l2tp_session_dec_refcount+0xc8/0x1a0 net/l2tp/l2tp_core.c:204 l2tp_session_delete+0x3a9/0x4a0 net/l2tp/l2tp_core.c:1577 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1223 [inline] l2tp_tunnel_del_work+0x180/0x3d0 net/l2tp/l2tp_core.c:1261 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 ---[ end trace 2f877364339edb8c ]---