Date
June 18, 2025, 6:43 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.658876] ================================================================== [ 21.659533] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 21.659630] Read of size 4 at addr fff00000c63e1f00 by task swapper/0/0 [ 21.659680] [ 21.659725] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B W N 6.16.0-rc2-next-20250618 #1 PREEMPT [ 21.659822] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 21.659852] Hardware name: linux,dummy-virt (DT) [ 21.659885] Call trace: [ 21.659921] show_stack+0x20/0x38 (C) [ 21.660264] dump_stack_lvl+0x8c/0xd0 [ 21.660347] print_report+0x118/0x608 [ 21.660994] kasan_report+0xdc/0x128 [ 21.661092] __asan_report_load4_noabort+0x20/0x30 [ 21.661149] rcu_uaf_reclaim+0x64/0x70 [ 21.661202] rcu_core+0x9f4/0x1e20 [ 21.661255] rcu_core_si+0x18/0x30 [ 21.661302] handle_softirqs+0x374/0xb28 [ 21.661353] __do_softirq+0x1c/0x28 [ 21.661403] ____do_softirq+0x18/0x30 [ 21.661463] call_on_irq_stack+0x24/0x30 [ 21.661513] do_softirq_own_stack+0x24/0x38 [ 21.661568] __irq_exit_rcu+0x1fc/0x318 [ 21.661620] irq_exit_rcu+0x1c/0x80 [ 21.661664] el1_interrupt+0x38/0x58 [ 21.661717] el1h_64_irq_handler+0x18/0x28 [ 21.661766] el1h_64_irq+0x6c/0x70 [ 21.661897] arch_local_irq_enable+0x4/0x8 (P) [ 21.661952] do_idle+0x384/0x4e8 [ 21.661996] cpu_startup_entry+0x68/0x80 [ 21.662680] rest_init+0x160/0x188 [ 21.662772] start_kernel+0x30c/0x3d0 [ 21.662836] __primary_switched+0x8c/0xa0 [ 21.662894] [ 21.662915] Allocated by task 208: [ 21.662948] kasan_save_stack+0x3c/0x68 [ 21.662996] kasan_save_track+0x20/0x40 [ 21.663058] kasan_save_alloc_info+0x40/0x58 [ 21.663103] __kasan_kmalloc+0xd4/0xd8 [ 21.663141] __kmalloc_cache_noprof+0x16c/0x3c0 [ 21.663184] rcu_uaf+0xb0/0x2d8 [ 21.663218] kunit_try_run_case+0x170/0x3f0 [ 21.663258] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.663300] kthread+0x328/0x630 [ 21.663336] ret_from_fork+0x10/0x20 [ 21.663372] [ 21.663394] Freed by task 0: [ 21.663435] kasan_save_stack+0x3c/0x68 [ 21.663497] kasan_save_track+0x20/0x40 [ 21.663538] kasan_save_free_info+0x4c/0x78 [ 21.663619] __kasan_slab_free+0x6c/0x98 [ 21.663693] kfree+0x214/0x3c8 [ 21.663737] rcu_uaf_reclaim+0x28/0x70 [ 21.663810] rcu_core+0x9f4/0x1e20 [ 21.663897] rcu_core_si+0x18/0x30 [ 21.663938] handle_softirqs+0x374/0xb28 [ 21.663976] __do_softirq+0x1c/0x28 [ 21.664012] [ 21.664054] Last potentially related work creation: [ 21.664084] kasan_save_stack+0x3c/0x68 [ 21.664126] kasan_record_aux_stack+0xb4/0xc8 [ 21.664168] __call_rcu_common.constprop.0+0x74/0x8c8 [ 21.664212] call_rcu+0x18/0x30 [ 21.664261] rcu_uaf+0x14c/0x2d8 [ 21.664304] kunit_try_run_case+0x170/0x3f0 [ 21.664346] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.664394] kthread+0x328/0x630 [ 21.664429] ret_from_fork+0x10/0x20 [ 21.664468] [ 21.664490] The buggy address belongs to the object at fff00000c63e1f00 [ 21.664490] which belongs to the cache kmalloc-32 of size 32 [ 21.664586] The buggy address is located 0 bytes inside of [ 21.664586] freed 32-byte region [fff00000c63e1f00, fff00000c63e1f20) [ 21.664669] [ 21.664695] The buggy address belongs to the physical page: [ 21.664815] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063e1 [ 21.665125] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.665411] page_type: f5(slab) [ 21.665579] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.665674] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.665839] page dumped because: kasan: bad access detected [ 21.665882] [ 21.665904] Memory state around the buggy address: [ 21.666125] fff00000c63e1e00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 21.666273] fff00000c63e1e80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 21.666345] >fff00000c63e1f00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 21.666384] ^ [ 21.666416] fff00000c63e1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.666461] fff00000c63e2000: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 21.666722] ==================================================================
[ 11.709547] ================================================================== [ 11.709962] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 11.710313] Read of size 4 at addr ffff88810387aa80 by task swapper/1/0 [ 11.710641] [ 11.710840] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) [ 11.710888] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.710900] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.710920] Call Trace: [ 11.710946] <IRQ> [ 11.710962] dump_stack_lvl+0x73/0xb0 [ 11.710992] print_report+0xd1/0x650 [ 11.711013] ? __virt_addr_valid+0x1db/0x2d0 [ 11.711034] ? rcu_uaf_reclaim+0x50/0x60 [ 11.711066] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.711092] ? rcu_uaf_reclaim+0x50/0x60 [ 11.711112] kasan_report+0x141/0x180 [ 11.711144] ? rcu_uaf_reclaim+0x50/0x60 [ 11.711168] __asan_report_load4_noabort+0x18/0x20 [ 11.711192] rcu_uaf_reclaim+0x50/0x60 [ 11.711220] rcu_core+0x66f/0x1c40 [ 11.711248] ? __pfx_rcu_core+0x10/0x10 [ 11.711268] ? ktime_get+0x6b/0x150 [ 11.711289] ? handle_softirqs+0x18e/0x730 [ 11.711322] rcu_core_si+0x12/0x20 [ 11.711341] handle_softirqs+0x209/0x730 [ 11.711360] ? hrtimer_interrupt+0x2fe/0x780 [ 11.711392] ? __pfx_handle_softirqs+0x10/0x10 [ 11.711416] __irq_exit_rcu+0xc9/0x110 [ 11.711472] irq_exit_rcu+0x12/0x20 [ 11.711505] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.711529] </IRQ> [ 11.711556] <TASK> [ 11.711566] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.711666] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 11.711878] 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 63 38 1f 00 fb f4 <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 11.711966] RSP: 0000:ffff888100877dc8 EFLAGS: 00010216 [ 11.712051] RAX: ffff8881cc367000 RBX: ffff888100853000 RCX: ffffffff85e98285 [ 11.712096] RDX: ffffed102a8e6193 RSI: 0000000000000004 RDI: 000000000001a57c [ 11.712137] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102a8e6192 [ 11.712183] R10: ffff888154730c93 R11: 0000000000010000 R12: 0000000000000001 [ 11.712236] R13: ffffed102010a600 R14: ffffffff87bb8990 R15: 0000000000000000 [ 11.712294] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 11.712345] ? default_idle+0xd/0x20 [ 11.712365] arch_cpu_idle+0xd/0x20 [ 11.712385] default_idle_call+0x48/0x80 [ 11.712406] do_idle+0x379/0x4f0 [ 11.712431] ? __pfx_do_idle+0x10/0x10 [ 11.712451] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 11.712472] ? complete+0x15b/0x1d0 [ 11.712493] cpu_startup_entry+0x5c/0x70 [ 11.712516] start_secondary+0x211/0x290 [ 11.712537] ? __pfx_start_secondary+0x10/0x10 [ 11.712561] common_startup_64+0x13e/0x148 [ 11.712591] </TASK> [ 11.712601] [ 11.726334] Allocated by task 224: [ 11.726801] kasan_save_stack+0x45/0x70 [ 11.727013] kasan_save_track+0x18/0x40 [ 11.727180] kasan_save_alloc_info+0x3b/0x50 [ 11.727380] __kasan_kmalloc+0xb7/0xc0 [ 11.727816] __kmalloc_cache_noprof+0x189/0x420 [ 11.727979] rcu_uaf+0xb0/0x330 [ 11.728415] kunit_try_run_case+0x1a5/0x480 [ 11.728776] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.728999] kthread+0x337/0x6f0 [ 11.729176] ret_from_fork+0x116/0x1d0 [ 11.729350] ret_from_fork_asm+0x1a/0x30 [ 11.729560] [ 11.729738] Freed by task 0: [ 11.729840] kasan_save_stack+0x45/0x70 [ 11.730019] kasan_save_track+0x18/0x40 [ 11.730199] kasan_save_free_info+0x3f/0x60 [ 11.730883] __kasan_slab_free+0x56/0x70 [ 11.731051] kfree+0x222/0x3f0 [ 11.731413] rcu_uaf_reclaim+0x1f/0x60 [ 11.731891] rcu_core+0x66f/0x1c40 [ 11.732064] rcu_core_si+0x12/0x20 [ 11.732261] handle_softirqs+0x209/0x730 [ 11.732481] __irq_exit_rcu+0xc9/0x110 [ 11.732671] irq_exit_rcu+0x12/0x20 [ 11.733202] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.733621] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.733808] [ 11.733917] Last potentially related work creation: [ 11.734153] kasan_save_stack+0x45/0x70 [ 11.734355] kasan_record_aux_stack+0xb2/0xc0 [ 11.734961] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 11.735151] call_rcu+0x12/0x20 [ 11.735487] rcu_uaf+0x168/0x330 [ 11.735903] kunit_try_run_case+0x1a5/0x480 [ 11.736080] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.736491] kthread+0x337/0x6f0 [ 11.736667] ret_from_fork+0x116/0x1d0 [ 11.737047] ret_from_fork_asm+0x1a/0x30 [ 11.737455] [ 11.737564] The buggy address belongs to the object at ffff88810387aa80 [ 11.737564] which belongs to the cache kmalloc-32 of size 32 [ 11.738415] The buggy address is located 0 bytes inside of [ 11.738415] freed 32-byte region [ffff88810387aa80, ffff88810387aaa0) [ 11.739066] [ 11.739163] The buggy address belongs to the physical page: [ 11.739723] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10387a [ 11.740184] flags: 0x200000000000000(node=0|zone=2) [ 11.740549] page_type: f5(slab) [ 11.740756] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.741399] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.742096] page dumped because: kasan: bad access detected [ 11.742377] [ 11.742706] Memory state around the buggy address: [ 11.743311] ffff88810387a980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 11.743633] ffff88810387aa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.744070] >ffff88810387aa80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 11.744780] ^ [ 11.744906] ffff88810387ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.745387] ffff88810387ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.745848] ==================================================================