Date
July 1, 2025, 11:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.812417] ================================================================== [ 18.812579] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 18.812661] Read of size 4 at addr fff00000c7747d00 by task swapper/1/0 [ 18.812715] [ 18.812762] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.812854] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.812883] Hardware name: linux,dummy-virt (DT) [ 18.812922] Call trace: [ 18.812947] show_stack+0x20/0x38 (C) [ 18.813004] dump_stack_lvl+0x8c/0xd0 [ 18.813055] print_report+0x118/0x608 [ 18.813106] kasan_report+0xdc/0x128 [ 18.813262] __asan_report_load4_noabort+0x20/0x30 [ 18.813325] rcu_uaf_reclaim+0x64/0x70 [ 18.813396] rcu_core+0x9f4/0x1e20 [ 18.813468] rcu_core_si+0x18/0x30 [ 18.813516] handle_softirqs+0x374/0xb28 [ 18.813577] __do_softirq+0x1c/0x28 [ 18.813622] ____do_softirq+0x18/0x30 [ 18.813670] call_on_irq_stack+0x24/0x30 [ 18.813717] do_softirq_own_stack+0x24/0x38 [ 18.813767] __irq_exit_rcu+0x1fc/0x318 [ 18.813944] irq_exit_rcu+0x1c/0x80 [ 18.814207] el1_interrupt+0x38/0x58 [ 18.814283] el1h_64_irq_handler+0x18/0x28 [ 18.814351] el1h_64_irq+0x6c/0x70 [ 18.814464] arch_local_irq_enable+0x4/0x8 (P) [ 18.814655] do_idle+0x384/0x4e8 [ 18.814835] cpu_startup_entry+0x68/0x80 [ 18.814887] secondary_start_kernel+0x288/0x340 [ 18.814938] __secondary_switched+0xc0/0xc8 [ 18.814999] [ 18.815021] Allocated by task 199: [ 18.815055] kasan_save_stack+0x3c/0x68 [ 18.815101] kasan_save_track+0x20/0x40 [ 18.815156] kasan_save_alloc_info+0x40/0x58 [ 18.815200] __kasan_kmalloc+0xd4/0xd8 [ 18.815288] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.815748] rcu_uaf+0xb0/0x2d8 [ 18.815851] kunit_try_run_case+0x170/0x3f0 [ 18.815975] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.816064] kthread+0x328/0x630 [ 18.816103] ret_from_fork+0x10/0x20 [ 18.816155] [ 18.816176] Freed by task 0: [ 18.816219] kasan_save_stack+0x3c/0x68 [ 18.816262] kasan_save_track+0x20/0x40 [ 18.816303] kasan_save_free_info+0x4c/0x78 [ 18.816735] __kasan_slab_free+0x6c/0x98 [ 18.816841] kfree+0x214/0x3c8 [ 18.816973] rcu_uaf_reclaim+0x28/0x70 [ 18.817012] rcu_core+0x9f4/0x1e20 [ 18.817101] rcu_core_si+0x18/0x30 [ 18.817473] handle_softirqs+0x374/0xb28 [ 18.817619] __do_softirq+0x1c/0x28 [ 18.817714] [ 18.817758] Last potentially related work creation: [ 18.817805] kasan_save_stack+0x3c/0x68 [ 18.818123] kasan_record_aux_stack+0xb4/0xc8 [ 18.818233] __call_rcu_common.constprop.0+0x74/0x8c8 [ 18.818309] call_rcu+0x18/0x30 [ 18.818367] rcu_uaf+0x14c/0x2d8 [ 18.818405] kunit_try_run_case+0x170/0x3f0 [ 18.818448] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.818514] kthread+0x328/0x630 [ 18.818549] ret_from_fork+0x10/0x20 [ 18.818616] [ 18.818662] The buggy address belongs to the object at fff00000c7747d00 [ 18.818662] which belongs to the cache kmalloc-32 of size 32 [ 18.818758] The buggy address is located 0 bytes inside of [ 18.818758] freed 32-byte region [fff00000c7747d00, fff00000c7747d20) [ 18.818827] [ 18.818852] The buggy address belongs to the physical page: [ 18.818901] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107747 [ 18.818965] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.819024] page_type: f5(slab) [ 18.819083] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.819150] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.819197] page dumped because: kasan: bad access detected [ 18.819235] [ 18.819256] Memory state around the buggy address: [ 18.819293] fff00000c7747c00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 18.819587] fff00000c7747c80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.819797] >fff00000c7747d00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 18.819954] ^ [ 18.820299] fff00000c7747d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.820354] fff00000c7747e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.820492] ==================================================================
[ 12.055088] ================================================================== [ 12.055670] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 12.056237] Read of size 4 at addr ffff8881025931c0 by task swapper/0/0 [ 12.056560] [ 12.056780] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.056840] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.056853] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.056876] Call Trace: [ 12.056908] <IRQ> [ 12.056971] dump_stack_lvl+0x73/0xb0 [ 12.057007] print_report+0xd1/0x650 [ 12.057030] ? __virt_addr_valid+0x1db/0x2d0 [ 12.057054] ? rcu_uaf_reclaim+0x50/0x60 [ 12.057073] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.057093] ? rcu_uaf_reclaim+0x50/0x60 [ 12.057112] kasan_report+0x141/0x180 [ 12.057133] ? rcu_uaf_reclaim+0x50/0x60 [ 12.057157] __asan_report_load4_noabort+0x18/0x20 [ 12.057179] rcu_uaf_reclaim+0x50/0x60 [ 12.057234] rcu_core+0x66f/0x1c40 [ 12.057264] ? __pfx_rcu_core+0x10/0x10 [ 12.057315] ? ktime_get+0x6b/0x150 [ 12.057336] ? handle_softirqs+0x18e/0x730 [ 12.057361] rcu_core_si+0x12/0x20 [ 12.057413] handle_softirqs+0x209/0x730 [ 12.057431] ? hrtimer_interrupt+0x2fe/0x780 [ 12.057452] ? __pfx_handle_softirqs+0x10/0x10 [ 12.057486] __irq_exit_rcu+0xc9/0x110 [ 12.057505] irq_exit_rcu+0x12/0x20 [ 12.057524] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.057548] </IRQ> [ 12.057586] <TASK> [ 12.057612] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.057706] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 12.057920] 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 03 8a 21 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 [ 12.058054] RSP: 0000:ffffffff8c607dd8 EFLAGS: 00010212 [ 12.058142] RAX: ffff8881cd674000 RBX: ffffffff8c61cac0 RCX: ffffffff8b4730e5 [ 12.058185] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 00000000000059ec [ 12.058226] RBP: ffffffff8c607de0 R08: 0000000000000001 R09: ffffed102b60618a [ 12.058266] R10: ffff88815b030c53 R11: 0000000000069800 R12: 0000000000000000 [ 12.058306] R13: fffffbfff18c3958 R14: ffffffff8d1b0690 R15: 0000000000000000 [ 12.058362] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 12.058430] ? default_idle+0xd/0x20 [ 12.058451] arch_cpu_idle+0xd/0x20 [ 12.058472] default_idle_call+0x48/0x80 [ 12.058493] do_idle+0x379/0x4f0 [ 12.058519] ? __pfx_do_idle+0x10/0x10 [ 12.058539] ? trace_preempt_on+0x20/0xc0 [ 12.058562] ? schedule+0x86/0x2e0 [ 12.058580] ? preempt_count_sub+0x50/0x80 [ 12.058603] cpu_startup_entry+0x5c/0x70 [ 12.058625] rest_init+0x11a/0x140 [ 12.058641] ? acpi_subsystem_init+0x5d/0x150 [ 12.058665] start_kernel+0x330/0x410 [ 12.058688] x86_64_start_reservations+0x1c/0x30 [ 12.058710] x86_64_start_kernel+0x10d/0x120 [ 12.058732] common_startup_64+0x13e/0x148 [ 12.058765] </TASK> [ 12.058778] [ 12.074458] Allocated by task 215: [ 12.074635] kasan_save_stack+0x45/0x70 [ 12.074801] kasan_save_track+0x18/0x40 [ 12.075106] kasan_save_alloc_info+0x3b/0x50 [ 12.075326] __kasan_kmalloc+0xb7/0xc0 [ 12.075479] __kmalloc_cache_noprof+0x189/0x420 [ 12.075843] rcu_uaf+0xb0/0x330 [ 12.076132] kunit_try_run_case+0x1a5/0x480 [ 12.076505] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.076856] kthread+0x337/0x6f0 [ 12.077192] ret_from_fork+0x116/0x1d0 [ 12.077475] ret_from_fork_asm+0x1a/0x30 [ 12.077617] [ 12.077687] Freed by task 0: [ 12.077945] kasan_save_stack+0x45/0x70 [ 12.078260] kasan_save_track+0x18/0x40 [ 12.078459] kasan_save_free_info+0x3f/0x60 [ 12.078718] __kasan_slab_free+0x56/0x70 [ 12.078962] kfree+0x222/0x3f0 [ 12.079154] rcu_uaf_reclaim+0x1f/0x60 [ 12.079286] rcu_core+0x66f/0x1c40 [ 12.079515] rcu_core_si+0x12/0x20 [ 12.079740] handle_softirqs+0x209/0x730 [ 12.079964] __irq_exit_rcu+0xc9/0x110 [ 12.080201] irq_exit_rcu+0x12/0x20 [ 12.080410] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.080658] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.080935] [ 12.081210] Last potentially related work creation: [ 12.081434] kasan_save_stack+0x45/0x70 [ 12.081702] kasan_record_aux_stack+0xb2/0xc0 [ 12.082033] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 12.082255] call_rcu+0x12/0x20 [ 12.082443] rcu_uaf+0x168/0x330 [ 12.082698] kunit_try_run_case+0x1a5/0x480 [ 12.082913] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.083222] kthread+0x337/0x6f0 [ 12.083339] ret_from_fork+0x116/0x1d0 [ 12.083692] ret_from_fork_asm+0x1a/0x30 [ 12.084038] [ 12.084299] The buggy address belongs to the object at ffff8881025931c0 [ 12.084299] which belongs to the cache kmalloc-32 of size 32 [ 12.084895] The buggy address is located 0 bytes inside of [ 12.084895] freed 32-byte region [ffff8881025931c0, ffff8881025931e0) [ 12.085477] [ 12.085597] The buggy address belongs to the physical page: [ 12.085806] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102593 [ 12.086284] flags: 0x200000000000000(node=0|zone=2) [ 12.086545] page_type: f5(slab) [ 12.086800] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.087194] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.087560] page dumped because: kasan: bad access detected [ 12.087829] [ 12.087981] Memory state around the buggy address: [ 12.088243] ffff888102593080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.088553] ffff888102593100: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 12.088972] >ffff888102593180: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.089363] ^ [ 12.089679] ffff888102593200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.090039] ffff888102593280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.090339] ==================================================================