Date
July 20, 2025, 8:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.574430] ================================================================== [ 15.574811] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 15.574914] Read of size 4 at addr fff00000c770e340 by task ksoftirqd/1/23 [ 15.574967] [ 15.575225] CPU: 1 UID: 0 PID: 23 Comm: ksoftirqd/1 Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.575328] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.575468] Hardware name: linux,dummy-virt (DT) [ 15.575609] Call trace: [ 15.575640] show_stack+0x20/0x38 (C) [ 15.575712] dump_stack_lvl+0x8c/0xd0 [ 15.575764] print_report+0x118/0x5d0 [ 15.575810] kasan_report+0xdc/0x128 [ 15.575913] __asan_report_load4_noabort+0x20/0x30 [ 15.575966] rcu_uaf_reclaim+0x64/0x70 [ 15.576030] rcu_core+0x9f4/0x1e20 [ 15.576170] rcu_core_si+0x18/0x30 [ 15.576363] handle_softirqs+0x374/0xb28 [ 15.576508] run_ksoftirqd+0x80/0xb0 [ 15.576582] smpboot_thread_fn+0x2e8/0x760 [ 15.576633] kthread+0x328/0x630 [ 15.576781] ret_from_fork+0x10/0x20 [ 15.576966] [ 15.577081] Allocated by task 199: [ 15.577141] kasan_save_stack+0x3c/0x68 [ 15.577326] kasan_save_track+0x20/0x40 [ 15.577366] kasan_save_alloc_info+0x40/0x58 [ 15.577407] __kasan_kmalloc+0xd4/0xd8 [ 15.577655] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.577761] rcu_uaf+0xb0/0x2d8 [ 15.577892] kunit_try_run_case+0x170/0x3f0 [ 15.578006] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.578161] kthread+0x328/0x630 [ 15.578207] ret_from_fork+0x10/0x20 [ 15.578484] [ 15.578574] Freed by task 23: [ 15.578671] kasan_save_stack+0x3c/0x68 [ 15.578770] kasan_save_track+0x20/0x40 [ 15.578908] kasan_save_free_info+0x4c/0x78 [ 15.578967] __kasan_slab_free+0x6c/0x98 [ 15.579003] kfree+0x214/0x3c8 [ 15.579334] rcu_uaf_reclaim+0x28/0x70 [ 15.579416] rcu_core+0x9f4/0x1e20 [ 15.579484] rcu_core_si+0x18/0x30 [ 15.579577] handle_softirqs+0x374/0xb28 [ 15.579697] run_ksoftirqd+0x80/0xb0 [ 15.579745] smpboot_thread_fn+0x2e8/0x760 [ 15.579784] kthread+0x328/0x630 [ 15.579973] ret_from_fork+0x10/0x20 [ 15.580168] [ 15.580253] Last potentially related work creation: [ 15.580326] kasan_save_stack+0x3c/0x68 [ 15.580406] kasan_record_aux_stack+0xb4/0xc8 [ 15.580480] __call_rcu_common.constprop.0+0x74/0x8c8 [ 15.580523] call_rcu+0x18/0x30 [ 15.580844] rcu_uaf+0x14c/0x2d8 [ 15.581012] kunit_try_run_case+0x170/0x3f0 [ 15.581120] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.581181] kthread+0x328/0x630 [ 15.581230] ret_from_fork+0x10/0x20 [ 15.581279] [ 15.581335] The buggy address belongs to the object at fff00000c770e340 [ 15.581335] which belongs to the cache kmalloc-32 of size 32 [ 15.581397] The buggy address is located 0 bytes inside of [ 15.581397] freed 32-byte region [fff00000c770e340, fff00000c770e360) [ 15.581591] [ 15.581662] The buggy address belongs to the physical page: [ 15.581758] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10770e [ 15.581840] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.581932] page_type: f5(slab) [ 15.581985] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 15.582034] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.582082] page dumped because: kasan: bad access detected [ 15.582115] [ 15.582133] Memory state around the buggy address: [ 15.582168] fff00000c770e200: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.582369] fff00000c770e280: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 15.582482] >fff00000c770e300: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 15.582614] ^ [ 15.582652] fff00000c770e380: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.582733] fff00000c770e400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.582960] ==================================================================
[ 13.515389] ================================================================== [ 13.515884] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.516261] Read of size 4 at addr ffff88810389fa80 by task swapper/1/0 [ 13.516566] [ 13.516696] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.516742] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.516754] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.516776] Call Trace: [ 13.516802] <IRQ> [ 13.516821] dump_stack_lvl+0x73/0xb0 [ 13.516856] print_report+0xd1/0x610 [ 13.516880] ? __virt_addr_valid+0x1db/0x2d0 [ 13.516905] ? rcu_uaf_reclaim+0x50/0x60 [ 13.516925] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.516947] ? rcu_uaf_reclaim+0x50/0x60 [ 13.516968] kasan_report+0x141/0x180 [ 13.516990] ? rcu_uaf_reclaim+0x50/0x60 [ 13.517015] __asan_report_load4_noabort+0x18/0x20 [ 13.517040] rcu_uaf_reclaim+0x50/0x60 [ 13.517060] rcu_core+0x66f/0x1c40 [ 13.517090] ? __pfx_rcu_core+0x10/0x10 [ 13.517112] ? ktime_get+0x6b/0x150 [ 13.517139] rcu_core_si+0x12/0x20 [ 13.517159] handle_softirqs+0x209/0x730 [ 13.517181] ? hrtimer_interrupt+0x2fe/0x780 [ 13.517203] ? __pfx_handle_softirqs+0x10/0x10 [ 13.517286] __irq_exit_rcu+0xc9/0x110 [ 13.517308] irq_exit_rcu+0x12/0x20 [ 13.517329] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.517355] </IRQ> [ 13.517383] <TASK> [ 13.517393] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.517498] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.517719] 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 23 52 21 00 fb f4 <e9> 3c 1d 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 13.517805] RSP: 0000:ffff888100877dc8 EFLAGS: 00010202 [ 13.517898] RAX: ffff8881ad972000 RBX: ffff888100853000 RCX: ffffffffab277125 [ 13.517944] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000001e4d4 [ 13.517989] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 13.518189] R10: ffff88815b130c53 R11: 0000000000021c00 R12: 0000000000000001 [ 13.518261] R13: ffffed102010a600 R14: ffffffffacfb1a90 R15: 0000000000000000 [ 13.518326] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.518386] ? default_idle+0xd/0x20 [ 13.518406] arch_cpu_idle+0xd/0x20 [ 13.518424] default_idle_call+0x48/0x80 [ 13.518443] do_idle+0x379/0x4f0 [ 13.518481] ? complete+0x15b/0x1d0 [ 13.518500] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.518526] ? __pfx_do_idle+0x10/0x10 [ 13.518548] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 13.518572] ? complete+0x15b/0x1d0 [ 13.518594] cpu_startup_entry+0x5c/0x70 [ 13.518613] start_secondary+0x211/0x290 [ 13.518635] ? __pfx_start_secondary+0x10/0x10 [ 13.518661] common_startup_64+0x13e/0x148 [ 13.518694] </TASK> [ 13.518704] [ 13.530675] Allocated by task 216: [ 13.531508] kasan_save_stack+0x45/0x70 [ 13.532121] kasan_save_track+0x18/0x40 [ 13.532343] kasan_save_alloc_info+0x3b/0x50 [ 13.532570] __kasan_kmalloc+0xb7/0xc0 [ 13.532854] __kmalloc_cache_noprof+0x189/0x420 [ 13.533518] rcu_uaf+0xb0/0x330 [ 13.533665] kunit_try_run_case+0x1a5/0x480 [ 13.533997] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.534505] kthread+0x337/0x6f0 [ 13.534834] ret_from_fork+0x116/0x1d0 [ 13.535300] ret_from_fork_asm+0x1a/0x30 [ 13.535464] [ 13.535650] Freed by task 0: [ 13.535821] kasan_save_stack+0x45/0x70 [ 13.536021] kasan_save_track+0x18/0x40 [ 13.536281] kasan_save_free_info+0x3f/0x60 [ 13.536542] __kasan_slab_free+0x56/0x70 [ 13.536699] kfree+0x222/0x3f0 [ 13.536887] rcu_uaf_reclaim+0x1f/0x60 [ 13.537046] rcu_core+0x66f/0x1c40 [ 13.537265] rcu_core_si+0x12/0x20 [ 13.537414] handle_softirqs+0x209/0x730 [ 13.537692] __irq_exit_rcu+0xc9/0x110 [ 13.537885] irq_exit_rcu+0x12/0x20 [ 13.538177] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.538449] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.538697] [ 13.538836] Last potentially related work creation: [ 13.539014] kasan_save_stack+0x45/0x70 [ 13.539307] kasan_record_aux_stack+0xb2/0xc0 [ 13.539546] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.539805] call_rcu+0x12/0x20 [ 13.540247] rcu_uaf+0x168/0x330 [ 13.540445] kunit_try_run_case+0x1a5/0x480 [ 13.540674] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.541203] kthread+0x337/0x6f0 [ 13.541349] ret_from_fork+0x116/0x1d0 [ 13.541506] ret_from_fork_asm+0x1a/0x30 [ 13.541729] [ 13.541837] The buggy address belongs to the object at ffff88810389fa80 [ 13.541837] which belongs to the cache kmalloc-32 of size 32 [ 13.542671] The buggy address is located 0 bytes inside of [ 13.542671] freed 32-byte region [ffff88810389fa80, ffff88810389faa0) [ 13.543500] [ 13.543609] The buggy address belongs to the physical page: [ 13.543813] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10389f [ 13.544633] flags: 0x200000000000000(node=0|zone=2) [ 13.544858] page_type: f5(slab) [ 13.545146] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.545493] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.545823] page dumped because: kasan: bad access detected [ 13.546184] [ 13.546341] Memory state around the buggy address: [ 13.546558] ffff88810389f980: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 13.546945] ffff88810389fa00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.547343] >ffff88810389fa80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 13.547689] ^ [ 13.547870] ffff88810389fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.548189] ffff88810389fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.548685] ==================================================================