================================================================== BUG: KASAN: use-after-free in rcu_segcblist_entrain+0x1d0/0x320 kernel/rcu/rcu_segcblist.c:374 Write of size 8 at addr ffff888129111d90 by task syz.8.3952/15633 CPU: 1 PID: 15633 Comm: syz.8.3952 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report_generic.c:356 rcu_segcblist_entrain+0x1d0/0x320 kernel/rcu/rcu_segcblist.c:374 rcu_barrier_entrain+0x188/0x2c0 kernel/rcu/tree.c:4027 rcu_barrier_handler+0x89/0xe0 kernel/rcu/tree.c:4051 __flush_smp_call_function_queue+0x22e/0x6e0 kernel/smp.c:641 generic_smp_call_function_single_interrupt+0x13/0x20 kernel/smp.c:557 __sysvec_call_function_single+0x75/0x1c0 arch/x86/kernel/smp.c:267 instr_sysvec_call_function_single arch/x86/kernel/smp.c:262 [inline] sysvec_call_function_single+0xa1/0xc0 arch/x86/kernel/smp.c:262 asm_sysvec_call_function_single+0x1b/0x20 arch/x86/include/asm/idtentry.h:699 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x48/0x70 kernel/locking/spinlock.c:202 Code: 74 12 48 89 fb 48 c7 c7 c0 db 0d 87 e8 01 fb b4 fc 48 89 df 48 83 3d 26 c8 0b 02 00 74 26 e8 13 0d 00 00 90 fb bf 01 00 00 00 83 83 4a fc 65 8b 05 14 5a 00 7b 85 c0 74 03 5b 5d c3 e8 e4 68 RSP: 0018:ffffc900019afb28 EFLAGS: 00000246 RAX: 0000000000000001 RBX: ffff8881404ef3e0 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc900019afb30 R08: ffffc900019afdff R09: 1ffff92000335fbf R10: dffffc0000000000 R11: fffff52000335fc0 R12: 0000000000000011 R13: dffffc0000000000 R14: 0000000004000000 R15: 0000000000000000 spin_unlock_irq include/linux/spinlock.h:401 [inline] get_signal+0x12a5/0x1700 kernel/signal.c:2907 arch_do_signal_or_restart+0xd1/0x11c0 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f22fde73ae7 Code: 03 14 ef 80 3d e1 42 3b 00 00 49 89 d6 48 89 d3 74 28 25 ff 0f 00 00 83 f0 3d 8d 04 c0 89 c3 c1 eb 04 31 c3 69 db 2d eb d4 27 <89> d8 c1 e8 0f 31 c3 81 e3 ff 0f 00 00 48 31 d3 80 3d 4a e5 3a 00 RSP: 002b:00007ffd3ebf0d90 EFLAGS: 00000a07 RAX: 0000000000003888 RBX: 0000000012335f00 RCX: ffffffff8173e1cd RDX: ffffffff81731465 RSI: ffffffff8173e1cd RDI: 00007f22fd9ff008 RBP: 0000000000000000 R08: 00007f22fe210000 R09: 00007f22fe212000 R10: 000000008173e1d1 R11: 0000000000000009 R12: 00007f22fe226038 R13: 0000000000007134 R14: ffffffff81731465 R15: 00007f22fed55720 Allocated by task 15661: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505 ____kasan_kmalloc mm/kasan/common.c:380 [inline] __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:938 [inline] __kmalloc+0xb4/0x1e0 mm/slab_common.c:951 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] l2tp_session_create+0x38/0xbd0 net/l2tp/l2tp_core.c:1614 pppol2tp_connect+0xbf5/0x1640 net/l2tp/l2tp_ppp.c:771 __sys_connect_file net/socket.c:2001 [inline] __sys_connect+0x3da/0x460 net/socket.c:2018 __do_sys_connect net/socket.c:2028 [inline] __se_sys_connect net/socket.c:2025 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:2025 x64_sys_call+0x88d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:43 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Freed by task 1521: kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:53 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:250 kasan_slab_free include/linux/kasan.h:178 [inline] slab_free_hook mm/slub.c:1750 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776 slab_free mm/slub.c:3712 [inline] __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728 kfree+0x6f/0xf0 mm/slab_common.c:990 l2tp_session_free net/l2tp/l2tp_core.c:168 [inline] l2tp_session_put+0xaf/0x1a0 net/l2tp/l2tp_core.c:193 l2tp_session_delete+0x3df/0x4d0 net/l2tp/l2tp_core.c:1587 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1233 [inline] l2tp_tunnel_del_work+0x199/0x410 net/l2tp/l2tp_core.c:1271 process_one_work+0x717/0xc30 kernel/workqueue.c:2302 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 __call_rcu_common kernel/rcu/tree.c:2807 [inline] call_rcu+0xcf/0xf50 kernel/rcu/tree.c:2926 pppol2tp_release+0x1e3/0x2b0 net/l2tp/l2tp_ppp.c:446 __sock_release net/socket.c:652 [inline] sock_close+0xc9/0x220 net/socket.c:1390 __fput+0x1fd/0x8f0 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x1e1/0x250 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0xb0d/0x29f0 kernel/exit.c:896 __do_sys_exit kernel/exit.c:1006 [inline] __se_sys_exit kernel/exit.c:1004 [inline] __cfi___ia32_sys_exit+0x0/0x10 kernel/exit.c:1004 x64_sys_call+0x67/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:61 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Second to last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496 kvfree_call_rcu+0x8b/0x7a0 kernel/rcu/tree.c:3445 drop_sysctl_table+0x2f5/0x430 fs/proc/proc_sysctl.c:1731 drop_sysctl_table+0x2e4/0x430 fs/proc/proc_sysctl.c:1734 unregister_sysctl_table+0x75/0x120 fs/proc/proc_sysctl.c:1769 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175 neigh_sysctl_unregister+0x78/0x90 net/core/neighbour.c:3879 addrconf_sysctl_unregister net/ipv6/addrconf.c:7251 [inline] addrconf_ifdown+0x168b/0x1950 net/ipv6/addrconf.c:3977 addrconf_notify+0x39f/0xe30 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:2022 [inline] call_netdevice_notifiers_extack net/core/dev.c:2060 [inline] call_netdevice_notifiers net/core/dev.c:2074 [inline] unregister_netdevice_many+0x104a/0x1910 net/core/dev.c:11006 default_device_exit_batch+0x951/0x9f0 net/core/dev.c:11519 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x630/0xb10 net/core/net_namespace.c:604 process_one_work+0x717/0xc30 kernel/workqueue.c:2302 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449 kthread+0x281/0x320 kernel/kthread.c:386 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888129111c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 400 bytes inside of 512-byte region [ffff888129111c00, ffff888129111e00) The buggy address belongs to the physical page: page:ffffea0004a44400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x129110 head:ffffea0004a44400 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042f00 raw: 0000000000000000 0000000000100010 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 3572, tgid 3572 (syz-executor), ts 169876652838, free_ts 169327766704 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1 allocate_slab mm/slub.c:1967 [inline] new_slab+0x98/0x3e0 mm/slub.c:2020 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177 __slab_alloc+0x5e/0xa0 mm/slub.c:3263 slab_alloc_node mm/slub.c:3348 [inline] __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423 __do_kmalloc_node mm/slab_common.c:937 [inline] __kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958 kmalloc_reserve net/core/skbuff.c:449 [inline] __alloc_skb+0x226/0x4a0 net/core/skbuff.c:518 alloc_skb include/linux/skbuff.h:1322 [inline] nlmsg_new include/net/netlink.h:987 [inline] netlink_ack+0x373/0x1160 net/netlink/af_netlink.c:2463 netlink_rcv_skb+0x27e/0x450 net/netlink/af_netlink.c:2532 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6180 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1878 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1581 [inline] free_pcp_prepare mm/page_alloc.c:1655 [inline] free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622 free_unref_page+0x93/0x530 mm/page_alloc.c:3720 free_the_page mm/page_alloc.c:863 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:6021 free_large_kmalloc+0xae/0xf0 mm/slab_common.c:915 kfree+0x8b/0xf0 mm/slab_common.c:984 kvfree+0x35/0x40 mm/util.c:639 netdev_freemem+0x3f/0x60 net/core/dev.c:10701 netdev_release+0x7f/0xb0 net/core/net-sysfs.c:1904 device_release+0xa4/0x1d0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x19d/0x280 lib/kobject.c:729 netdev_run_todo+0xb48/0xc30 net/core/dev.c:10521 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:147 tun_detach drivers/net/tun.c:704 [inline] tun_chr_close+0xc4/0x140 drivers/net/tun.c:3495 __fput+0x1fd/0x8f0 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x1e1/0x250 kernel/task_work.c:203 Memory state around the buggy address: ffff888129111c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888129111d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888129111d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888129111e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888129111e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 74 12 je 0x14 2: 48 89 fb mov %rdi,%rbx 5: 48 c7 c7 c0 db 0d 87 mov $0xffffffff870ddbc0,%rdi c: e8 01 fb b4 fc call 0xfcb4fb12 11: 48 89 df mov %rbx,%rdi 14: 48 83 3d 26 c8 0b 02 cmpq $0x0,0x20bc826(%rip) # 0x20bc842 1b: 00 1c: 74 26 je 0x44 1e: e8 13 0d 00 00 call 0xd36 23: 90 nop 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 83 83 4a fc call 0xfc4a83b2 <-- trapping instruction 2f: 65 8b 05 14 5a 00 7b mov %gs:0x7b005a14(%rip),%eax # 0x7b005a4a 36: 85 c0 test %eax,%eax 38: 74 03 je 0x3d 3a: 5b pop %rbx 3b: 5d pop %rbp 3c: c3 ret 3d: e8 .byte 0xe8 3e: e4 68 in $0x68,%al