Date
July 16, 2025, 3:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.876191] ================================================================== [ 16.876704] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 16.876826] Read of size 4 at addr fff00000c5968200 by task swapper/1/0 [ 16.876991] [ 16.877035] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 16.877129] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.877343] Hardware name: linux,dummy-virt (DT) [ 16.877392] Call trace: [ 16.877597] show_stack+0x20/0x38 (C) [ 16.877683] dump_stack_lvl+0x8c/0xd0 [ 16.877993] print_report+0x118/0x5d0 [ 16.878043] kasan_report+0xdc/0x128 [ 16.878091] __asan_report_load4_noabort+0x20/0x30 [ 16.878141] rcu_uaf_reclaim+0x64/0x70 [ 16.878187] rcu_core+0x9f4/0x1e20 [ 16.878234] rcu_core_si+0x18/0x30 [ 16.878278] handle_softirqs+0x374/0xb28 [ 16.878327] __do_softirq+0x1c/0x28 [ 16.878368] ____do_softirq+0x18/0x30 [ 16.878413] call_on_irq_stack+0x24/0x30 [ 16.878457] do_softirq_own_stack+0x24/0x38 [ 16.878525] __irq_exit_rcu+0x1fc/0x318 [ 16.878569] irq_exit_rcu+0x1c/0x80 [ 16.878620] el1_interrupt+0x38/0x58 [ 16.878668] el1h_64_irq_handler+0x18/0x28 [ 16.878726] el1h_64_irq+0x6c/0x70 [ 16.879012] arch_local_irq_enable+0x4/0x8 (P) [ 16.879081] do_idle+0x384/0x4e8 [ 16.879126] cpu_startup_entry+0x68/0x80 [ 16.879180] secondary_start_kernel+0x288/0x340 [ 16.879473] __secondary_switched+0xc0/0xc8 [ 16.879612] [ 16.879726] Allocated by task 198: [ 16.879758] kasan_save_stack+0x3c/0x68 [ 16.879803] kasan_save_track+0x20/0x40 [ 16.879842] kasan_save_alloc_info+0x40/0x58 [ 16.880112] __kasan_kmalloc+0xd4/0xd8 [ 16.880273] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.880436] rcu_uaf+0xb0/0x2d8 [ 16.880554] kunit_try_run_case+0x170/0x3f0 [ 16.880632] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.880804] kthread+0x328/0x630 [ 16.880869] ret_from_fork+0x10/0x20 [ 16.881058] [ 16.881252] Freed by task 0: [ 16.881319] kasan_save_stack+0x3c/0x68 [ 16.881457] kasan_save_track+0x20/0x40 [ 16.881574] kasan_save_free_info+0x4c/0x78 [ 16.881689] __kasan_slab_free+0x6c/0x98 [ 16.881801] kfree+0x214/0x3c8 [ 16.881839] rcu_uaf_reclaim+0x28/0x70 [ 16.881875] rcu_core+0x9f4/0x1e20 [ 16.881911] rcu_core_si+0x18/0x30 [ 16.881945] handle_softirqs+0x374/0xb28 [ 16.882026] __do_softirq+0x1c/0x28 [ 16.882063] [ 16.882105] Last potentially related work creation: [ 16.882153] kasan_save_stack+0x3c/0x68 [ 16.882194] kasan_record_aux_stack+0xb4/0xc8 [ 16.882235] __call_rcu_common.constprop.0+0x74/0x8c8 [ 16.882287] call_rcu+0x18/0x30 [ 16.882321] rcu_uaf+0x14c/0x2d8 [ 16.882361] kunit_try_run_case+0x170/0x3f0 [ 16.882409] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.882461] kthread+0x328/0x630 [ 16.882494] ret_from_fork+0x10/0x20 [ 16.882545] [ 16.882577] The buggy address belongs to the object at fff00000c5968200 [ 16.882577] which belongs to the cache kmalloc-32 of size 32 [ 16.882641] The buggy address is located 0 bytes inside of [ 16.882641] freed 32-byte region [fff00000c5968200, fff00000c5968220) [ 16.882702] [ 16.883141] The buggy address belongs to the physical page: [ 16.883219] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105968 [ 16.883301] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.883663] page_type: f5(slab) [ 16.883807] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 16.883860] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.883922] page dumped because: kasan: bad access detected [ 16.884260] [ 16.884308] Memory state around the buggy address: [ 16.884413] fff00000c5968100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.884583] fff00000c5968180: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 16.884765] >fff00000c5968200: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.884862] ^ [ 16.884891] fff00000c5968280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.885249] fff00000c5968300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.885355] ==================================================================
[ 13.143106] ================================================================== [ 13.143581] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.143925] Read of size 4 at addr ffff888103067c40 by task swapper/0/0 [ 13.144210] [ 13.144324] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.144368] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.144379] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.144399] Call Trace: [ 13.144429] <IRQ> [ 13.144457] dump_stack_lvl+0x73/0xb0 [ 13.144489] print_report+0xd1/0x610 [ 13.144512] ? __virt_addr_valid+0x1db/0x2d0 [ 13.144535] ? rcu_uaf_reclaim+0x50/0x60 [ 13.144556] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.144579] ? rcu_uaf_reclaim+0x50/0x60 [ 13.144600] kasan_report+0x141/0x180 [ 13.144622] ? rcu_uaf_reclaim+0x50/0x60 [ 13.144734] __asan_report_load4_noabort+0x18/0x20 [ 13.144773] rcu_uaf_reclaim+0x50/0x60 [ 13.144794] rcu_core+0x66f/0x1c40 [ 13.144823] ? __pfx_rcu_core+0x10/0x10 [ 13.144846] ? ktime_get+0x6b/0x150 [ 13.144868] ? handle_softirqs+0x18e/0x730 [ 13.144893] rcu_core_si+0x12/0x20 [ 13.144913] handle_softirqs+0x209/0x730 [ 13.144932] ? hrtimer_interrupt+0x2fe/0x780 [ 13.144955] ? __pfx_handle_softirqs+0x10/0x10 [ 13.144992] __irq_exit_rcu+0xc9/0x110 [ 13.145012] irq_exit_rcu+0x12/0x20 [ 13.145032] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.145057] </IRQ> [ 13.145084] <TASK> [ 13.145094] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.145187] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.145401] 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 72 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.145544] RSP: 0000:ffffffff99407dd8 EFLAGS: 00010212 [ 13.145633] RAX: ffff8881c0872000 RBX: ffffffff9941cac0 RCX: ffffffff98275125 [ 13.145679] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000013b5c [ 13.145722] RBP: ffffffff99407de0 R08: 0000000000000001 R09: ffffed102b60618a [ 13.145792] R10: ffff88815b030c53 R11: 0000000000015800 R12: 0000000000000000 [ 13.145843] R13: fffffbfff3283958 R14: ffffffff99fb1490 R15: 0000000000000000 [ 13.145904] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.145961] ? default_idle+0xd/0x20 [ 13.146126] arch_cpu_idle+0xd/0x20 [ 13.146149] default_idle_call+0x48/0x80 [ 13.146168] do_idle+0x379/0x4f0 [ 13.146194] ? __pfx_do_idle+0x10/0x10 [ 13.146223] cpu_startup_entry+0x5c/0x70 [ 13.146242] rest_init+0x11a/0x140 [ 13.146260] ? acpi_subsystem_init+0x5d/0x150 [ 13.146286] start_kernel+0x330/0x410 [ 13.146311] x86_64_start_reservations+0x1c/0x30 [ 13.146336] x86_64_start_kernel+0x10d/0x120 [ 13.146361] common_startup_64+0x13e/0x148 [ 13.146393] </TASK> [ 13.146404] [ 13.158776] Allocated by task 215: [ 13.158952] kasan_save_stack+0x45/0x70 [ 13.159159] kasan_save_track+0x18/0x40 [ 13.159350] kasan_save_alloc_info+0x3b/0x50 [ 13.160227] __kasan_kmalloc+0xb7/0xc0 [ 13.160724] __kmalloc_cache_noprof+0x189/0x420 [ 13.161037] rcu_uaf+0xb0/0x330 [ 13.161210] kunit_try_run_case+0x1a5/0x480 [ 13.161411] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.161914] kthread+0x337/0x6f0 [ 13.162361] ret_from_fork+0x116/0x1d0 [ 13.162782] ret_from_fork_asm+0x1a/0x30 [ 13.163311] [ 13.163423] Freed by task 0: [ 13.163571] kasan_save_stack+0x45/0x70 [ 13.163765] kasan_save_track+0x18/0x40 [ 13.163904] kasan_save_free_info+0x3f/0x60 [ 13.164148] __kasan_slab_free+0x56/0x70 [ 13.164360] kfree+0x222/0x3f0 [ 13.164545] rcu_uaf_reclaim+0x1f/0x60 [ 13.164722] rcu_core+0x66f/0x1c40 [ 13.164913] rcu_core_si+0x12/0x20 [ 13.165074] handle_softirqs+0x209/0x730 [ 13.165286] __irq_exit_rcu+0xc9/0x110 [ 13.165430] irq_exit_rcu+0x12/0x20 [ 13.165607] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.165868] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.166209] [ 13.166309] Last potentially related work creation: [ 13.166610] kasan_save_stack+0x45/0x70 [ 13.166807] kasan_record_aux_stack+0xb2/0xc0 [ 13.167221] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.167454] call_rcu+0x12/0x20 [ 13.167602] rcu_uaf+0x168/0x330 [ 13.167726] kunit_try_run_case+0x1a5/0x480 [ 13.167942] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.168201] kthread+0x337/0x6f0 [ 13.168416] ret_from_fork+0x116/0x1d0 [ 13.168629] ret_from_fork_asm+0x1a/0x30 [ 13.168854] [ 13.168965] The buggy address belongs to the object at ffff888103067c40 [ 13.168965] which belongs to the cache kmalloc-32 of size 32 [ 13.169506] The buggy address is located 0 bytes inside of [ 13.169506] freed 32-byte region [ffff888103067c40, ffff888103067c60) [ 13.170013] [ 13.170146] The buggy address belongs to the physical page: [ 13.170369] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103067 [ 13.170709] flags: 0x200000000000000(node=0|zone=2) [ 13.170882] page_type: f5(slab) [ 13.171012] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.171693] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.172159] page dumped because: kasan: bad access detected [ 13.172446] [ 13.172569] Memory state around the buggy address: [ 13.172766] ffff888103067b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.173570] ffff888103067b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.173813] >ffff888103067c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.174234] ^ [ 13.174631] ffff888103067c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.175288] ffff888103067d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.175908] ==================================================================