Date
July 16, 2025, 12:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.982008] ================================================================== [ 30.982662] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 30.982757] Read of size 4 at addr fff00000c9b16e80 by task ksoftirqd/0/15 [ 30.982807] [ 30.982846] CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Tainted: G B N 6.16.0-rc6-next-20250716 #1 PREEMPT [ 30.982934] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.983322] Hardware name: linux,dummy-virt (DT) [ 30.983371] Call trace: [ 30.983409] show_stack+0x20/0x38 (C) [ 30.983831] dump_stack_lvl+0x8c/0xd0 [ 30.984038] print_report+0x118/0x5d0 [ 30.984095] kasan_report+0xdc/0x128 [ 30.984171] __asan_report_load4_noabort+0x20/0x30 [ 30.984300] rcu_uaf_reclaim+0x64/0x70 [ 30.984346] rcu_core+0x9f4/0x1e20 [ 30.984871] rcu_core_si+0x18/0x30 [ 30.984980] handle_softirqs+0x374/0xb28 [ 30.985029] run_ksoftirqd+0x80/0xb0 [ 30.985074] smpboot_thread_fn+0x2e8/0x760 [ 30.985550] kthread+0x328/0x630 [ 30.985615] ret_from_fork+0x10/0x20 [ 30.985663] [ 30.985855] Allocated by task 229: [ 30.986138] kasan_save_stack+0x3c/0x68 [ 30.986200] kasan_save_track+0x20/0x40 [ 30.986469] kasan_save_alloc_info+0x40/0x58 [ 30.986714] __kasan_kmalloc+0xd4/0xd8 [ 30.986756] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.986799] rcu_uaf+0xb0/0x2d8 [ 30.986835] kunit_try_run_case+0x170/0x3f0 [ 30.986875] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.986919] kthread+0x328/0x630 [ 30.987134] ret_from_fork+0x10/0x20 [ 30.987181] [ 30.987214] Freed by task 15: [ 30.987242] kasan_save_stack+0x3c/0x68 [ 30.987802] kasan_save_track+0x20/0x40 [ 30.988054] kasan_save_free_info+0x4c/0x78 [ 30.988097] __kasan_slab_free+0x6c/0x98 [ 30.988611] kfree+0x214/0x3c8 [ 30.988650] rcu_uaf_reclaim+0x28/0x70 [ 30.988953] rcu_core+0x9f4/0x1e20 [ 30.989007] rcu_core_si+0x18/0x30 [ 30.989043] handle_softirqs+0x374/0xb28 [ 30.989083] run_ksoftirqd+0x80/0xb0 [ 30.989120] smpboot_thread_fn+0x2e8/0x760 [ 30.989161] kthread+0x328/0x630 [ 30.989196] ret_from_fork+0x10/0x20 [ 30.989244] [ 30.989291] Last potentially related work creation: [ 30.989328] kasan_save_stack+0x3c/0x68 [ 30.989367] kasan_record_aux_stack+0xb4/0xc8 [ 30.989407] __call_rcu_common.constprop.0+0x74/0x8c8 [ 30.989450] call_rcu+0x18/0x30 [ 30.989486] rcu_uaf+0x14c/0x2d8 [ 30.989535] kunit_try_run_case+0x170/0x3f0 [ 30.989626] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.989736] kthread+0x328/0x630 [ 30.989784] ret_from_fork+0x10/0x20 [ 30.990195] [ 30.990730] The buggy address belongs to the object at fff00000c9b16e80 [ 30.990730] which belongs to the cache kmalloc-32 of size 32 [ 30.991294] The buggy address is located 0 bytes inside of [ 30.991294] freed 32-byte region [fff00000c9b16e80, fff00000c9b16ea0) [ 30.991959] [ 30.992132] The buggy address belongs to the physical page: [ 30.992168] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b16 [ 30.992226] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.992711] page_type: f5(slab) [ 30.992782] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 30.993539] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 30.993901] page dumped because: kasan: bad access detected [ 30.994189] [ 30.994213] Memory state around the buggy address: [ 30.994686] fff00000c9b16d80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 30.995022] fff00000c9b16e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 30.995410] >fff00000c9b16e80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 30.995896] ^ [ 30.996054] fff00000c9b16f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.996194] fff00000c9b16f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.996946] ==================================================================
[ 23.860005] ================================================================== [ 23.860599] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 23.861180] Read of size 4 at addr ffff888106025e00 by task swapper/1/0 [ 23.861425] [ 23.861541] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) [ 23.861614] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.861627] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.861648] Call Trace: [ 23.861675] <IRQ> [ 23.861696] dump_stack_lvl+0x73/0xb0 [ 23.861731] print_report+0xd1/0x610 [ 23.861756] ? __virt_addr_valid+0x1db/0x2d0 [ 23.861779] ? rcu_uaf_reclaim+0x50/0x60 [ 23.861799] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.861824] ? rcu_uaf_reclaim+0x50/0x60 [ 23.861843] kasan_report+0x141/0x180 [ 23.861864] ? rcu_uaf_reclaim+0x50/0x60 [ 23.862003] __asan_report_load4_noabort+0x18/0x20 [ 23.862028] rcu_uaf_reclaim+0x50/0x60 [ 23.862048] rcu_core+0x66f/0x1c40 [ 23.862078] ? __pfx_rcu_core+0x10/0x10 [ 23.862099] ? ktime_get+0x6b/0x150 [ 23.862126] rcu_core_si+0x12/0x20 [ 23.862145] handle_softirqs+0x209/0x730 [ 23.862166] ? hrtimer_interrupt+0x2fe/0x780 [ 23.862194] ? __pfx_handle_softirqs+0x10/0x10 [ 23.862218] __irq_exit_rcu+0xc9/0x110 [ 23.862237] irq_exit_rcu+0x12/0x20 [ 23.862256] sysvec_apic_timer_interrupt+0x81/0x90 [ 23.862295] </IRQ> [ 23.862327] <TASK> [ 23.862338] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 23.862433] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 23.862656] Code: 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d e3 e2 16 00 fb f4 <e9> 7c 1d 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 23.862742] RSP: 0000:ffff88810087fdc8 EFLAGS: 00010212 [ 23.862830] RAX: ffff8881a3913000 RBX: ffff88810085b000 RCX: ffffffffb531da25 [ 23.862898] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 000000000001d74c [ 23.862943] RBP: ffff88810087fdd0 R08: 0000000000000001 R09: ffffed102b626192 [ 23.862986] R10: ffff88815b130c93 R11: ffff88815b1363c8 R12: 0000000000000001 [ 23.863029] R13: ffffed102010b600 R14: ffffffffb6ffabd0 R15: 0000000000000000 [ 23.863086] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 23.863137] ? default_idle+0xd/0x20 [ 23.863159] arch_cpu_idle+0xd/0x20 [ 23.863180] default_idle_call+0x48/0x80 [ 23.863202] do_idle+0x379/0x4f0 [ 23.863227] ? __pfx_do_idle+0x10/0x10 [ 23.863247] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 23.863270] ? complete+0x15b/0x1d0 [ 23.863311] cpu_startup_entry+0x5c/0x70 [ 23.863334] start_secondary+0x211/0x290 [ 23.863357] ? __pfx_start_secondary+0x10/0x10 [ 23.863382] common_startup_64+0x13e/0x148 [ 23.863414] </TASK> [ 23.863425] [ 23.873222] Allocated by task 247: [ 23.873400] kasan_save_stack+0x45/0x70 [ 23.873596] kasan_save_track+0x18/0x40 [ 23.873783] kasan_save_alloc_info+0x3b/0x50 [ 23.874946] __kasan_kmalloc+0xb7/0xc0 [ 23.875103] __kmalloc_cache_noprof+0x189/0x420 [ 23.875317] rcu_uaf+0xb0/0x330 [ 23.875436] kunit_try_run_case+0x1a5/0x480 [ 23.875659] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.875910] kthread+0x337/0x6f0 [ 23.876082] ret_from_fork+0x116/0x1d0 [ 23.876217] ret_from_fork_asm+0x1a/0x30 [ 23.877220] [ 23.877318] Freed by task 0: [ 23.877424] kasan_save_stack+0x45/0x70 [ 23.877628] kasan_save_track+0x18/0x40 [ 23.877791] kasan_save_free_info+0x3f/0x60 [ 23.878038] __kasan_slab_free+0x56/0x70 [ 23.878173] kfree+0x222/0x3f0 [ 23.878321] rcu_uaf_reclaim+0x1f/0x60 [ 23.878633] rcu_core+0x66f/0x1c40 [ 23.878916] rcu_core_si+0x12/0x20 [ 23.879039] handle_softirqs+0x209/0x730 [ 23.879301] __irq_exit_rcu+0xc9/0x110 [ 23.879491] irq_exit_rcu+0x12/0x20 [ 23.879651] sysvec_apic_timer_interrupt+0x81/0x90 [ 23.880028] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 23.880193] [ 23.880296] Last potentially related work creation: [ 23.880514] kasan_save_stack+0x45/0x70 [ 23.880735] kasan_record_aux_stack+0xb2/0xc0 [ 23.881079] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 23.881405] call_rcu+0x12/0x20 [ 23.881602] rcu_uaf+0x168/0x330 [ 23.881733] kunit_try_run_case+0x1a5/0x480 [ 23.881988] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.882189] kthread+0x337/0x6f0 [ 23.882393] ret_from_fork+0x116/0x1d0 [ 23.882599] ret_from_fork_asm+0x1a/0x30 [ 23.882768] [ 23.882845] The buggy address belongs to the object at ffff888106025e00 [ 23.882845] which belongs to the cache kmalloc-32 of size 32 [ 23.883382] The buggy address is located 0 bytes inside of [ 23.883382] freed 32-byte region [ffff888106025e00, ffff888106025e20) [ 23.884115] [ 23.884190] The buggy address belongs to the physical page: [ 23.884431] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106025 [ 23.884948] flags: 0x200000000000000(node=0|zone=2) [ 23.885195] page_type: f5(slab) [ 23.885378] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.885827] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.886128] page dumped because: kasan: bad access detected [ 23.886432] [ 23.886523] Memory state around the buggy address: [ 23.886743] ffff888106025d00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 23.886948] ffff888106025d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.887238] >ffff888106025e00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 23.887567] ^ [ 23.887743] ffff888106025e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.888031] ffff888106025f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.888231] ==================================================================