Date
July 10, 2025, 6:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.383717] ================================================================== [ 17.383855] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 17.383929] Read of size 4 at addr fff00000c5a2db80 by task swapper/1/0 [ 17.383978] [ 17.384565] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.385413] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.385462] Hardware name: linux,dummy-virt (DT) [ 17.385495] Call trace: [ 17.385605] show_stack+0x20/0x38 (C) [ 17.386009] dump_stack_lvl+0x8c/0xd0 [ 17.386073] print_report+0x118/0x608 [ 17.386140] kasan_report+0xdc/0x128 [ 17.386222] __asan_report_load4_noabort+0x20/0x30 [ 17.386491] rcu_uaf_reclaim+0x64/0x70 [ 17.386748] rcu_core+0x9f4/0x1e20 [ 17.386813] rcu_core_si+0x18/0x30 [ 17.387123] handle_softirqs+0x374/0xb28 [ 17.387303] __do_softirq+0x1c/0x28 [ 17.387368] ____do_softirq+0x18/0x30 [ 17.387419] call_on_irq_stack+0x24/0x30 [ 17.387932] do_softirq_own_stack+0x24/0x38 [ 17.388035] __irq_exit_rcu+0x1fc/0x318 [ 17.388187] irq_exit_rcu+0x1c/0x80 [ 17.388233] el1_interrupt+0x38/0x58 [ 17.388567] el1h_64_irq_handler+0x18/0x28 [ 17.388947] el1h_64_irq+0x6c/0x70 [ 17.389469] arch_local_irq_enable+0x4/0x8 (P) [ 17.389539] do_idle+0x384/0x4e8 [ 17.389766] cpu_startup_entry+0x68/0x80 [ 17.389816] secondary_start_kernel+0x288/0x340 [ 17.390100] __secondary_switched+0xc0/0xc8 [ 17.390187] [ 17.390411] Allocated by task 198: [ 17.390679] kasan_save_stack+0x3c/0x68 [ 17.391060] kasan_save_track+0x20/0x40 [ 17.391236] kasan_save_alloc_info+0x40/0x58 [ 17.391301] __kasan_kmalloc+0xd4/0xd8 [ 17.391628] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.391675] rcu_uaf+0xb0/0x2d8 [ 17.391710] kunit_try_run_case+0x170/0x3f0 [ 17.391753] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.391798] kthread+0x328/0x630 [ 17.391831] ret_from_fork+0x10/0x20 [ 17.391868] [ 17.391887] Freed by task 0: [ 17.391915] kasan_save_stack+0x3c/0x68 [ 17.392395] kasan_save_track+0x20/0x40 [ 17.392444] kasan_save_free_info+0x4c/0x78 [ 17.392493] __kasan_slab_free+0x6c/0x98 [ 17.392597] kfree+0x214/0x3c8 [ 17.392633] rcu_uaf_reclaim+0x28/0x70 [ 17.392670] rcu_core+0x9f4/0x1e20 [ 17.392853] rcu_core_si+0x18/0x30 [ 17.393122] handle_softirqs+0x374/0xb28 [ 17.393165] __do_softirq+0x1c/0x28 [ 17.393442] [ 17.393585] Last potentially related work creation: [ 17.393824] kasan_save_stack+0x3c/0x68 [ 17.394104] kasan_record_aux_stack+0xb4/0xc8 [ 17.394160] __call_rcu_common.constprop.0+0x74/0x8c8 [ 17.394414] call_rcu+0x18/0x30 [ 17.394609] rcu_uaf+0x14c/0x2d8 [ 17.394650] kunit_try_run_case+0x170/0x3f0 [ 17.394703] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.394772] kthread+0x328/0x630 [ 17.394961] ret_from_fork+0x10/0x20 [ 17.395295] [ 17.395580] The buggy address belongs to the object at fff00000c5a2db80 [ 17.395580] which belongs to the cache kmalloc-32 of size 32 [ 17.395904] The buggy address is located 0 bytes inside of [ 17.395904] freed 32-byte region [fff00000c5a2db80, fff00000c5a2dba0) [ 17.395973] [ 17.396080] The buggy address belongs to the physical page: [ 17.396115] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a2d [ 17.396435] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.396489] page_type: f5(slab) [ 17.396530] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.397026] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.397127] page dumped because: kasan: bad access detected [ 17.397277] [ 17.397570] Memory state around the buggy address: [ 17.397932] fff00000c5a2da80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 17.397990] fff00000c5a2db00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.398032] >fff00000c5a2db80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 17.398072] ^ [ 17.398312] fff00000c5a2dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.398661] fff00000c5a2dc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.398704] ==================================================================
[ 13.042919] ================================================================== [ 13.043406] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.043730] Read of size 4 at addr ffff88810279cf40 by task swapper/1/0 [ 13.044057] [ 13.044159] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.044309] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.044327] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.044347] Call Trace: [ 13.044377] <IRQ> [ 13.044392] dump_stack_lvl+0x73/0xb0 [ 13.044424] print_report+0xd1/0x650 [ 13.044446] ? __virt_addr_valid+0x1db/0x2d0 [ 13.044469] ? rcu_uaf_reclaim+0x50/0x60 [ 13.044489] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.044536] ? rcu_uaf_reclaim+0x50/0x60 [ 13.044558] kasan_report+0x141/0x180 [ 13.044579] ? rcu_uaf_reclaim+0x50/0x60 [ 13.044603] __asan_report_load4_noabort+0x18/0x20 [ 13.044627] rcu_uaf_reclaim+0x50/0x60 [ 13.044647] rcu_core+0x66f/0x1c40 [ 13.044674] ? __pfx_rcu_core+0x10/0x10 [ 13.044695] ? ktime_get+0x6b/0x150 [ 13.044735] ? handle_softirqs+0x18e/0x730 [ 13.044760] rcu_core_si+0x12/0x20 [ 13.044780] handle_softirqs+0x209/0x730 [ 13.044799] ? hrtimer_interrupt+0x2fe/0x780 [ 13.044879] ? __pfx_handle_softirqs+0x10/0x10 [ 13.044926] __irq_exit_rcu+0xc9/0x110 [ 13.044948] irq_exit_rcu+0x12/0x20 [ 13.044968] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.044994] </IRQ> [ 13.045023] <TASK> [ 13.045046] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.045136] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.045356] 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 81 21 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 [ 13.045436] RSP: 0000:ffff888100877dc8 EFLAGS: 00010216 [ 13.045519] RAX: ffff8881a6f72000 RBX: ffff888100853000 RCX: ffffffffb1c74105 [ 13.045563] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000001271c [ 13.045606] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 13.045646] R10: ffff88815b130c53 R11: 00000000000e2800 R12: 0000000000000001 [ 13.045687] R13: ffffed102010a600 R14: ffffffffb39b1490 R15: 0000000000000000 [ 13.045741] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.045905] ? default_idle+0xd/0x20 [ 13.045930] arch_cpu_idle+0xd/0x20 [ 13.045951] default_idle_call+0x48/0x80 [ 13.045970] do_idle+0x379/0x4f0 [ 13.045992] ? complete+0x15b/0x1d0 [ 13.046009] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.046045] ? __pfx_do_idle+0x10/0x10 [ 13.046066] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 13.046089] ? complete+0x15b/0x1d0 [ 13.046110] cpu_startup_entry+0x5c/0x70 [ 13.046129] start_secondary+0x211/0x290 [ 13.046151] ? __pfx_start_secondary+0x10/0x10 [ 13.046176] common_startup_64+0x13e/0x148 [ 13.046208] </TASK> [ 13.046218] [ 13.062216] Allocated by task 215: [ 13.062393] kasan_save_stack+0x45/0x70 [ 13.062672] kasan_save_track+0x18/0x40 [ 13.062994] kasan_save_alloc_info+0x3b/0x50 [ 13.063230] __kasan_kmalloc+0xb7/0xc0 [ 13.063666] __kmalloc_cache_noprof+0x189/0x420 [ 13.064344] rcu_uaf+0xb0/0x330 [ 13.064756] kunit_try_run_case+0x1a5/0x480 [ 13.065322] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.065511] kthread+0x337/0x6f0 [ 13.065634] ret_from_fork+0x116/0x1d0 [ 13.065766] ret_from_fork_asm+0x1a/0x30 [ 13.066229] [ 13.066563] Freed by task 0: [ 13.066702] kasan_save_stack+0x45/0x70 [ 13.066855] kasan_save_track+0x18/0x40 [ 13.067185] kasan_save_free_info+0x3f/0x60 [ 13.067457] __kasan_slab_free+0x56/0x70 [ 13.067663] kfree+0x222/0x3f0 [ 13.067827] rcu_uaf_reclaim+0x1f/0x60 [ 13.068108] rcu_core+0x66f/0x1c40 [ 13.068240] rcu_core_si+0x12/0x20 [ 13.068416] handle_softirqs+0x209/0x730 [ 13.068609] __irq_exit_rcu+0xc9/0x110 [ 13.068806] irq_exit_rcu+0x12/0x20 [ 13.069249] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.069463] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.069686] [ 13.069801] Last potentially related work creation: [ 13.070653] kasan_save_stack+0x45/0x70 [ 13.070875] kasan_record_aux_stack+0xb2/0xc0 [ 13.071203] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.071660] call_rcu+0x12/0x20 [ 13.071953] rcu_uaf+0x168/0x330 [ 13.072103] kunit_try_run_case+0x1a5/0x480 [ 13.072334] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.072795] kthread+0x337/0x6f0 [ 13.073186] ret_from_fork+0x116/0x1d0 [ 13.073401] ret_from_fork_asm+0x1a/0x30 [ 13.073567] [ 13.073668] The buggy address belongs to the object at ffff88810279cf40 [ 13.073668] which belongs to the cache kmalloc-32 of size 32 [ 13.074567] The buggy address is located 0 bytes inside of [ 13.074567] freed 32-byte region [ffff88810279cf40, ffff88810279cf60) [ 13.075488] [ 13.075760] The buggy address belongs to the physical page: [ 13.076301] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10279c [ 13.076655] flags: 0x200000000000000(node=0|zone=2) [ 13.076910] page_type: f5(slab) [ 13.077370] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.077780] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.078377] page dumped because: kasan: bad access detected [ 13.078839] [ 13.078985] Memory state around the buggy address: [ 13.079395] ffff88810279ce00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.079806] ffff88810279ce80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.080505] >ffff88810279cf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.080860] ^ [ 13.081178] ffff88810279cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.081493] ffff88810279d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 13.081998] ==================================================================