[moderation] [crypto?] KASAN: slab-use-after-free Read in rcu_cblist_dequeue

1 view
Skip to first unread message

syzbot

unread,
Dec 31, 2025, 7:07:22 PM (6 hours ago) 12/31/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d26143bb38e2 Merge tag 'spi-fix-v6.19-rc2' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11fe849a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=8bfa57a8c0ab3aa8
dashboard link: https://syzkaller.appspot.com/bug?extid=5137c7833aa4d1da5950
compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: i386
CC: [da...@davemloft.net her...@gondor.apana.org.au linux-...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-d26143bb.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/971a61da885e/vmlinux-d26143bb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/78919a065d0f/bzImage-d26143bb.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5137c7...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-use-after-free in rcu_cblist_dequeue+0xb0/0xe0 kernel/rcu/rcu_segcblist.c:75
Read of size 8 at addr ffff8880513d8dd8 by task syz.8.15707/7738

CPU: 2 UID: 0 PID: 7738 Comm: syz.8.15707 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
rcu_cblist_dequeue+0xb0/0xe0 kernel/rcu/rcu_segcblist.c:75
rcu_do_batch kernel/rcu/tree.c:2593 [inline]
rcu_core+0x6f6/0x15f0 kernel/rcu/tree.c:2857
handle_softirqs+0x219/0x950 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1056
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:lock_release+0x183/0x2d0 kernel/locking/lockdep.c:5893
Code: 0f c1 05 78 07 19 12 83 f8 01 0f 85 03 01 00 00 9c 58 f6 c4 02 0f 85 ee 00 00 00 41 f7 c5 00 02 00 00 74 01 fb 48 8b 44 24 10 <65> 48 2b 05 0d c0 18 12 0f 85 32 01 00 00 48 83 c4 18 5b 41 5c 41
RSP: 0018:ffffc90003dc7430 EFLAGS: 00000206
RAX: 6d3c59a4689cd100 RBX: ffffffff8e3c9520 RCX: ffffc90003dc743c
RDX: 0000000000000001 RSI: ffffffff8daa494a RDI: ffffffff8bf2b580
RBP: 0000000000000001 R08: ffffffff911ae744 R09: 0000000082608fbb
R10: 0000000000000002 R11: 000000000000001e R12: ffffffff816c79a4
R13: 0000000000000206 R14: ffff888024e224c0 R15: 0000000000000002
rcu_lock_release include/linux/rcupdate.h:341 [inline]
rcu_read_unlock include/linux/rcupdate.h:897 [inline]
class_rcu_destructor include/linux/rcupdate.h:1195 [inline]
unwind_next_frame+0x3f9/0x20b0 arch/x86/kernel/unwind_orc.c:495
arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:414
kasan_kmalloc include/linux/kasan.h:262 [inline]
__do_kmalloc_node mm/slub.c:5657 [inline]
__kmalloc_noprof+0x33d/0x910 mm/slub.c:5669
kmalloc_noprof include/linux/slab.h:961 [inline]
sock_kmalloc+0x111/0x170 net/core/sock.c:2880
hash_alloc_result+0xd7/0x150 crypto/algif_hash.c:41
hash_recvmsg+0x198/0x960 crypto/algif_hash.c:196
sock_recvmsg_nosec net/socket.c:1078 [inline]
____sys_recvmsg+0x5f9/0x6b0 net/socket.c:2810
___sys_recvmsg+0x114/0x1a0 net/socket.c:2854
do_recvmmsg+0x55d/0x750 net/socket.c:2941
__sys_recvmmsg+0x21c/0x280 net/socket.c:3023
__do_compat_sys_recvmmsg_time32 net/compat.c:418 [inline]
__se_compat_sys_recvmmsg_time32 net/compat.c:414 [inline]
__ia32_compat_sys_recvmmsg_time32+0xc4/0x160 net/compat.c:414
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7fc7579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f54b655c EFLAGS: 00000296 ORIG_RAX: 0000000000000151
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000080003700
RDX: 0000000000000600 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>

Allocated by task 7729:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
unpoison_slab_object mm/kasan/common.c:339 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:365
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x25e/0x770 mm/slub.c:5270
radix_tree_node_alloc.constprop.0+0x7c/0x350 lib/radix-tree.c:276
idr_get_free+0x528/0xa30 lib/radix-tree.c:1506
idr_alloc_u32+0x190/0x2f0 lib/idr.c:46
idr_alloc_cyclic+0x10b/0x230 lib/idr.c:125
afs_alloc_cell fs/afs/cell.c:209 [inline]
afs_lookup_cell+0x11d1/0x1900 fs/afs/cell.c:278
afs_parse_source fs/afs/super.c:292 [inline]
afs_parse_param+0x5c4/0x970 fs/afs/super.c:330
vfs_parse_fs_param+0x20b/0x3c0 fs/fs_context.c:146
vfs_fsconfig_locked fs/fsopen.c:303 [inline]
__do_sys_fsconfig+0x930/0xbe0 fs/fsopen.c:473
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Freed by task 33:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kmem_cache_free+0x2d8/0x770 mm/slub.c:6781
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x79c/0x15f0 kernel/rcu/tree.c:2857
handle_softirqs+0x219/0x950 kernel/softirq.c:622
run_ksoftirqd kernel/softirq.c:1063 [inline]
run_ksoftirqd+0x3a/0x60 kernel/softirq.c:1055
smpboot_thread_fn+0x3f7/0xae0 kernel/smpboot.c:160
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556
__call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3119
radix_tree_node_free lib/radix-tree.c:310 [inline]
delete_node+0x1fc/0x8d0 lib/radix-tree.c:573
__radix_tree_delete+0x193/0x3d0 lib/radix-tree.c:1379
radix_tree_delete_item+0xea/0x230 lib/radix-tree.c:1430
afs_cell_destroy+0x1db/0x310 fs/afs/cell.c:580
rcu_do_batch kernel/rcu/tree.c:2605 [inline]
rcu_core+0x79c/0x15f0 kernel/rcu/tree.c:2857
handle_softirqs+0x219/0x950 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

The buggy address belongs to the object at ffff8880513d8dc0
which belongs to the cache radix_tree_node of size 576
The buggy address is located 24 bytes inside of
freed 576-byte region [ffff8880513d8dc0, ffff8880513d9000)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x513d8
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888040f04501
anon flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000040 ffff88801b44cc80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080170017 00000000f5000000 ffff888040f04501
head: 04fff00000000040 ffff88801b44cc80 0000000000000000 dead000000000001
head: 0000000000000000 0000000080170017 00000000f5000000 ffff888040f04501
head: 04fff00000000002 ffffea000144f601 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Reclaimable, gfp_mask 0x52810(GFP_NOWAIT|__GFP_RECLAIMABLE|__GFP_NORETRY|__GFP_COMP), pid 5557, tgid 5556 (syz.4.14728), ts 645627099578, free_ts 633604523094
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe18/0x1c90 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
kmem_cache_alloc_lru_noprof+0x451/0x770 mm/slub.c:5282
xas_alloc+0x34f/0x460 lib/xarray.c:378
xas_create+0x72b/0x1460 lib/xarray.c:685
xas_store+0x90/0x1910 lib/xarray.c:795
shmem_add_to_page_cache+0x7b7/0xa70 mm/shmem.c:922
shmem_alloc_and_add_folio+0x662/0xc20 mm/shmem.c:1958
shmem_get_folio_gfp+0x67f/0x1610 mm/shmem.c:2556
shmem_fault+0x1fe/0xa00 mm/shmem.c:2757
__do_fault+0x10d/0x490 mm/memory.c:5320
page last free pid 27875 tgid 27875 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
discard_slab mm/slub.c:3346 [inline]
__put_partials+0x130/0x170 mm/slub.c:3886
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_noprof+0x25e/0x770 mm/slub.c:5270
getname_flags.part.0+0x4c/0x550 fs/namei.c:146
getname_flags+0x93/0xf0 include/linux/audit.h:345
getname include/linux/fs.h:2498 [inline]
__do_sys_unlinkat fs/namei.c:5468 [inline]
__se_sys_unlinkat fs/namei.c:5462 [inline]
__ia32_sys_unlinkat+0xe4/0x130 fs/namei.c:5462
do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline]
__do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307
do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332
entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Memory state around the buggy address:
ffff8880513d8c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880513d8d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
>ffff8880513d8d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
^
ffff8880513d8e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880513d8e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 0f c1 05 78 07 19 12 xadd %eax,0x12190778(%rip) # 0x1219077f
7: 83 f8 01 cmp $0x1,%eax
a: 0f 85 03 01 00 00 jne 0x113
10: 9c pushf
11: 58 pop %rax
12: f6 c4 02 test $0x2,%ah
15: 0f 85 ee 00 00 00 jne 0x109
1b: 41 f7 c5 00 02 00 00 test $0x200,%r13d
22: 74 01 je 0x25
24: fb sti
25: 48 8b 44 24 10 mov 0x10(%rsp),%rax
* 2a: 65 48 2b 05 0d c0 18 sub %gs:0x1218c00d(%rip),%rax # 0x1218c03f <-- trapping instruction
31: 12
32: 0f 85 32 01 00 00 jne 0x16a
38: 48 83 c4 18 add $0x18,%rsp
3c: 5b pop %rbx
3d: 41 5c pop %r12
3f: 41 rex.B


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages