==================================================================
BUG: KASAN: use-after-free in rcu_cblist_dequeue+0x6c/0xb0 kernel/rcu/rcu_segcblist.c:75
Read of size 8 at addr ffff888132647590 by task syz.0.21/370
CPU: 0 PID: 370 Comm: syz.0.21 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
rcu_cblist_dequeue+0x6c/0xb0 kernel/rcu/rcu_segcblist.c:75
rcu_do_batch+0x4bc/0xc30 kernel/rcu/tree.c:2285
rcu_core+0x486/0xf00 kernel/rcu/tree.c:2557
rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2574
handle_softirqs+0x1d7/0x600 kernel/softirq.c:642
__do_softirq kernel/softirq.c:680 [inline]
invoke_softirq kernel/softirq.c:497 [inline]
__irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729
irq_exit_rcu+0x9/0x10 kernel/softirq.c:741
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x55/0x80 kernel/locking/spinlock.c:194
Code: 80 db 0d 87 e8 7c f1 b5 fc 4c 89 f7 48 83 3d 01 dc 0c 02 00 74 30 e8 9e 0d 00 00 90 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 d6 96 4b fc 65 8b 05 27 6e 01 7b 85 c0 74 05 5b 41 5e 5d c3 e8
RSP: 0018:ffffc9000dd1f4a0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000a02 RCX: dffffc0000000000
RDX: 0000000000000cfc RSI: 0000000000000a02 RDI: 0000000000000001
RBP: ffffc9000dd1f4b0 R08: ffff888115231440 R09: 0000000000000003
R10: 0000000000000004 R11: 0000000000000002 R12: 0000000000000028
R13: 0000000000002800 R14: 0000000000000cfc R15: 0000000000000002
pci_conf1_write+0x128/0x140 arch/x86/pci/direct.c:76
raw_pci_write arch/x86/pci/common.c:-1 [inline]
pci_write+0x123/0x180 arch/x86/pci/common.c:68
pci_bus_write_config_word+0xb7/0xe0 drivers/pci/access.c:70
pci_write_config_word+0xa0/0xf0 drivers/pci/access.c:571
__pci_read_base+0x1fa/0xa20 drivers/pci/probe.c:192
pci_read_bases drivers/pci/probe.c:342 [inline]
pci_setup_device+0x155f/0x2840 drivers/pci/probe.c:1930
pci_scan_device drivers/pci/probe.c:2483 [inline]
pci_scan_single_device+0x306/0x440 drivers/pci/probe.c:2637
pci_scan_slot+0x1e2/0x680 drivers/pci/probe.c:2724
pci_scan_child_bus_extend+0x95/0x880 drivers/pci/probe.c:2943
pci_scan_child_bus drivers/pci/probe.c:3057 [inline]
pci_rescan_bus+0x19/0x40 drivers/pci/probe.c:3335
rescan_store+0xc9/0x150 drivers/pci/pci-sysfs.c:465
bus_attr_store+0x88/0xb0 drivers/base/bus.c:124
sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2282 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x5ef/0xd00 fs/read_write.c:584
ksys_write+0x14a/0x260 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x7b/0x90 fs/read_write.c:646
x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
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
RIP: 0033:0x7fc50e99e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc50f83b028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc50ec25fa0 RCX: 00007fc50e99e0d9
RDX: 0000000000000001 RSI: 0000200000000300 RDI: 0000000000000004
RBP: 00007fc50ea35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc50ec26038 R14: 00007fc50ec25fa0 R15: 00007ffe6a0be438
Allocated by task 365:
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:1609
pppol2tp_connect+0xbf5/0x1640 net/l2tp/l2tp_ppp.c:771
__sys_connect_file net/socket.c:2000 [inline]
__sys_connect+0x3da/0x460 net/socket.c:2017
__do_sys_connect net/socket.c:2027 [inline]
__se_sys_connect net/socket.c:2024 [inline]
__x64_sys_connect+0x7a/0x90 net/socket.c:2024
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 43:
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:1582
l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1228 [inline]
l2tp_tunnel_del_work+0x199/0x410 net/l2tp/l2tp_core.c:1266
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:1389
__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+0xaf2/0x2850 kernel/exit.c:887
__do_sys_exit kernel/exit.c:996 [inline]
__se_sys_exit kernel/exit.c:994 [inline]
__cfi___ia32_sys_exit+0x0/0x10 kernel/exit.c:994
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
The buggy address belongs to the object at ffff888132647400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 400 bytes inside of
512-byte region [ffff888132647400, ffff888132647600)
The buggy address belongs to the physical page:
page:ffffea0004c99100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x132644
head:ffffea0004c99100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 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 365, tgid 364 (syz.3.19), ts 26255734818, free_ts 25972583057
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672
prep_new_page+0x1c/0x110 mm/page_alloc.c:2679
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930
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+0xa4/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:1609
pppol2tp_connect+0xbf5/0x1640 net/l2tp/l2tp_ppp.c:771
__sys_connect_file net/socket.c:2000 [inline]
__sys_connect+0x3da/0x460 net/socket.c:2017
__do_sys_connect net/socket.c:2027 [inline]
__se_sys_connect net/socket.c:2024 [inline]
__x64_sys_connect+0x7a/0x90 net/socket.c:2024
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
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1580 [inline]
free_pcp_prepare mm/page_alloc.c:1654 [inline]
free_unref_page_prepare+0x80c/0x820 mm/page_alloc.c:3621
free_unref_page_list+0x117/0x8d0 mm/page_alloc.c:3772
release_pages+0xc7e/0xce0 mm/swap.c:1053
__pagevec_release+0x71/0xe0 mm/swap.c:1073
pagevec_release include/linux/pagevec.h:71 [inline]
folio_batch_release include/linux/pagevec.h:135 [inline]
truncate_inode_pages_range+0x362/0xd20 mm/truncate.c:402
truncate_inode_pages+0x24/0x30 mm/truncate.c:484
kill_bdev block/bdev.c:77 [inline]
blkdev_flush_mapping+0x155/0x2c0 block/bdev.c:686
blkdev_put_whole block/bdev.c:717 [inline]
blkdev_put+0x4ae/0x780 block/bdev.c:977
kill_block_super+0xb8/0xf0 fs/super.c:1478
kill_f2fs_super+0x310/0x3d0 fs/f2fs/super.c:4893
deactivate_locked_super+0xb5/0x120 fs/super.c:336
deactivate_super+0xaf/0xe0 fs/super.c:367
cleanup_mnt+0x45e/0x4e0 fs/namespace.c:1192
__cleanup_mnt+0x19/0x20 fs/namespace.c:1199
task_work_run+0x1e1/0x250 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177
Memory state around the buggy address:
ffff888132647480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888132647500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888132647580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888132647600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888132647680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 80 db 0d sbb $0xd,%bl
3: 87 e8 xchg %ebp,%eax
5: 7c f1 jl 0xfffffff8
7: b5 fc mov $0xfc,%ch
9: 4c 89 f7 mov %r14,%rdi
c: 48 83 3d 01 dc 0c 02 cmpq $0x0,0x20cdc01(%rip) # 0x20cdc15
13: 00
14: 74 30 je 0x46
16: e8 9e 0d 00 00 call 0xdb9
1b: 90 nop
1c: f7 c3 00 02 00 00 test $0x200,%ebx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 d6 96 4b fc call 0xfc4b9705 <-- trapping instruction
2f: 65 8b 05 27 6e 01 7b mov %gs:0x7b016e27(%rip),%eax # 0x7b016e5d
36: 85 c0 test %eax,%eax
38: 74 05 je 0x3f
3a: 5b pop %rbx
3b: 41 5e pop %r14
3d: 5d pop %rbp
3e: c3 ret
3f: e8 .byte 0xe8