Date
June 5, 2025, 7:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 25.837653] ================================================================== [ 25.837895] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 25.838034] Read of size 4 at addr fff00000c7739240 by task swapper/0/0 [ 25.838145] [ 25.840294] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT [ 25.840460] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.840497] Hardware name: linux,dummy-virt (DT) [ 25.840586] Call trace: [ 25.840625] show_stack+0x20/0x38 (C) [ 25.840692] dump_stack_lvl+0x8c/0xd0 [ 25.840752] print_report+0x118/0x608 [ 25.840812] kasan_report+0xdc/0x128 [ 25.840869] __asan_report_load4_noabort+0x20/0x30 [ 25.840928] rcu_uaf_reclaim+0x64/0x70 [ 25.840982] rcu_core+0x9f4/0x1e20 [ 25.841044] rcu_core_si+0x18/0x30 [ 25.841097] handle_softirqs+0x374/0xb28 [ 25.841157] __do_softirq+0x1c/0x28 [ 25.841209] ____do_softirq+0x18/0x30 [ 25.841265] call_on_irq_stack+0x24/0x30 [ 25.841409] do_softirq_own_stack+0x24/0x38 [ 25.841542] __irq_exit_rcu+0x1fc/0x318 [ 25.841688] irq_exit_rcu+0x1c/0x80 [ 25.842215] el1_interrupt+0x38/0x58 [ 25.842442] el1h_64_irq_handler+0x18/0x28 [ 25.842724] el1h_64_irq+0x6c/0x70 [ 25.843233] arch_local_irq_enable+0x4/0x8 (P) [ 25.843451] do_idle+0x384/0x4e8 [ 25.843985] cpu_startup_entry+0x64/0x80 [ 25.844209] rest_init+0x160/0x188 [ 25.844498] start_kernel+0x30c/0x3d0 [ 25.844646] __primary_switched+0x8c/0xa0 [ 25.844932] [ 25.845006] Allocated by task 198: [ 25.845136] kasan_save_stack+0x3c/0x68 [ 25.845287] kasan_save_track+0x20/0x40 [ 25.845518] kasan_save_alloc_info+0x40/0x58 [ 25.845668] __kasan_kmalloc+0xd4/0xd8 [ 25.845788] __kmalloc_cache_noprof+0x16c/0x3c0 [ 25.845966] rcu_uaf+0xb0/0x2d8 [ 25.846069] kunit_try_run_case+0x170/0x3f0 [ 25.846178] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.846459] kthread+0x328/0x630 [ 25.846569] ret_from_fork+0x10/0x20 [ 25.846663] [ 25.847357] Freed by task 0: [ 25.847727] kasan_save_stack+0x3c/0x68 [ 25.847906] kasan_save_track+0x20/0x40 [ 25.848124] kasan_save_free_info+0x4c/0x78 [ 25.848280] __kasan_slab_free+0x6c/0x98 [ 25.848550] kfree+0x214/0x3c8 [ 25.848696] rcu_uaf_reclaim+0x28/0x70 [ 25.848970] rcu_core+0x9f4/0x1e20 [ 25.849090] rcu_core_si+0x18/0x30 [ 25.849193] handle_softirqs+0x374/0xb28 [ 25.849368] __do_softirq+0x1c/0x28 [ 25.849478] [ 25.849549] Last potentially related work creation: [ 25.849637] kasan_save_stack+0x3c/0x68 [ 25.849888] kasan_record_aux_stack+0xb4/0xc8 [ 25.850008] __call_rcu_common.constprop.0+0x70/0x8b0 [ 25.850343] call_rcu+0x18/0x30 [ 25.850825] rcu_uaf+0x14c/0x2d8 [ 25.850918] kunit_try_run_case+0x170/0x3f0 [ 25.851018] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 25.851127] kthread+0x328/0x630 [ 25.851823] ret_from_fork+0x10/0x20 [ 25.851975] [ 25.852436] The buggy address belongs to the object at fff00000c7739240 [ 25.852436] which belongs to the cache kmalloc-32 of size 32 [ 25.852924] The buggy address is located 0 bytes inside of [ 25.852924] freed 32-byte region [fff00000c7739240, fff00000c7739260) [ 25.853501] [ 25.853744] The buggy address belongs to the physical page: [ 25.853824] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107739 [ 25.854423] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 25.854575] page_type: f5(slab) [ 25.854843] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 25.854972] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 25.855103] page dumped because: kasan: bad access detected [ 25.855320] [ 25.855479] Memory state around the buggy address: [ 25.855677] fff00000c7739100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 25.855800] fff00000c7739180: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 25.855974] >fff00000c7739200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 25.856472] ^ [ 25.856894] fff00000c7739280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.857394] fff00000c7739300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.857500] ==================================================================
[ 11.975051] ================================================================== [ 11.975509] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 11.975821] Read of size 4 at addr ffff888102b37a40 by task swapper/0/0 [ 11.976182] [ 11.976338] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.0-next-20250605 #1 PREEMPT(voluntary) [ 11.976383] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.976394] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.976416] Call Trace: [ 11.976440] <IRQ> [ 11.976455] dump_stack_lvl+0x73/0xb0 [ 11.976482] print_report+0xd1/0x650 [ 11.976504] ? __virt_addr_valid+0x1db/0x2d0 [ 11.976528] ? rcu_uaf_reclaim+0x50/0x60 [ 11.976547] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.976569] ? rcu_uaf_reclaim+0x50/0x60 [ 11.976590] kasan_report+0x141/0x180 [ 11.976612] ? rcu_uaf_reclaim+0x50/0x60 [ 11.976673] __asan_report_load4_noabort+0x18/0x20 [ 11.976695] rcu_uaf_reclaim+0x50/0x60 [ 11.976715] rcu_core+0x66f/0x1c40 [ 11.976744] ? __pfx_rcu_core+0x10/0x10 [ 11.976764] ? ktime_get+0x6b/0x150 [ 11.976786] ? handle_softirqs+0x18e/0x730 [ 11.976810] rcu_core_si+0x12/0x20 [ 11.976829] handle_softirqs+0x209/0x730 [ 11.976848] ? hrtimer_interrupt+0x2fe/0x780 [ 11.976875] ? __pfx_handle_softirqs+0x10/0x10 [ 11.976910] __irq_exit_rcu+0xc9/0x110 [ 11.976945] irq_exit_rcu+0x12/0x20 [ 11.976965] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.976992] </IRQ> [ 11.977018] <TASK> [ 11.977028] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.977158] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 11.977365] 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 a8 1d 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.977443] RSP: 0000:ffffffffb9a07dd8 EFLAGS: 00010206 [ 11.977535] RAX: ffff8881a025d000 RBX: ffffffffb9a1cac0 RCX: ffffffffb88b1245 [ 11.977581] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000012834 [ 11.977623] RBP: ffffffffb9a07de0 R08: 0000000000000001 R09: ffffed102b60618a [ 11.977663] R10: ffff88815b030c53 R11: 0000000000000000 R12: 0000000000000000 [ 11.977704] R13: fffffbfff7343958 R14: ffffffffba5c2890 R15: 0000000000000000 [ 11.977759] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 11.977809] ? default_idle+0xd/0x20 [ 11.977828] arch_cpu_idle+0xd/0x20 [ 11.977847] default_idle_call+0x48/0x80 [ 11.977866] do_idle+0x379/0x4f0 [ 11.977904] ? __pfx_do_idle+0x10/0x10 [ 11.977926] ? trace_preempt_on+0x20/0xc0 [ 11.977959] ? schedule+0x86/0x2e0 [ 11.977979] ? preempt_count_sub+0x50/0x80 [ 11.978002] cpu_startup_entry+0x5c/0x70 [ 11.978025] rest_init+0x11a/0x140 [ 11.978043] ? acpi_subsystem_init+0x5d/0x150 [ 11.978068] start_kernel+0x330/0x410 [ 11.978088] x86_64_start_reservations+0x1c/0x30 [ 11.978109] x86_64_start_kernel+0x10d/0x120 [ 11.978129] common_startup_64+0x13e/0x148 [ 11.978160] </TASK> [ 11.978171] [ 11.994416] Allocated by task 215: [ 11.994588] kasan_save_stack+0x45/0x70 [ 11.995339] kasan_save_track+0x18/0x40 [ 11.995774] kasan_save_alloc_info+0x3b/0x50 [ 11.996056] __kasan_kmalloc+0xb7/0xc0 [ 11.996238] __kmalloc_cache_noprof+0x189/0x420 [ 11.996438] rcu_uaf+0xb0/0x330 [ 11.996589] kunit_try_run_case+0x1a5/0x480 [ 11.997136] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.997383] kthread+0x337/0x6f0 [ 11.997543] ret_from_fork+0x116/0x1d0 [ 11.998116] ret_from_fork_asm+0x1a/0x30 [ 11.998401] [ 11.998646] Freed by task 0: [ 11.999117] kasan_save_stack+0x45/0x70 [ 11.999320] kasan_save_track+0x18/0x40 [ 11.999503] kasan_save_free_info+0x3f/0x60 [ 12.000152] __kasan_slab_free+0x56/0x70 [ 12.000406] kfree+0x222/0x3f0 [ 12.000701] rcu_uaf_reclaim+0x1f/0x60 [ 12.001144] rcu_core+0x66f/0x1c40 [ 12.001323] rcu_core_si+0x12/0x20 [ 12.001478] handle_softirqs+0x209/0x730 [ 12.002064] __irq_exit_rcu+0xc9/0x110 [ 12.002338] irq_exit_rcu+0x12/0x20 [ 12.002792] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.003442] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.003885] [ 12.004107] Last potentially related work creation: [ 12.004329] kasan_save_stack+0x45/0x70 [ 12.004518] kasan_record_aux_stack+0xb2/0xc0 [ 12.005173] __call_rcu_common.constprop.0+0x72/0x9d0 [ 12.005567] call_rcu+0x12/0x20 [ 12.005885] rcu_uaf+0x168/0x330 [ 12.006297] kunit_try_run_case+0x1a5/0x480 [ 12.006500] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.007113] kthread+0x337/0x6f0 [ 12.007351] ret_from_fork+0x116/0x1d0 [ 12.007711] ret_from_fork_asm+0x1a/0x30 [ 12.008162] [ 12.008271] The buggy address belongs to the object at ffff888102b37a40 [ 12.008271] which belongs to the cache kmalloc-32 of size 32 [ 12.009219] The buggy address is located 0 bytes inside of [ 12.009219] freed 32-byte region [ffff888102b37a40, ffff888102b37a60) [ 12.010220] [ 12.010320] The buggy address belongs to the physical page: [ 12.010553] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b37 [ 12.011535] flags: 0x200000000000000(node=0|zone=2) [ 12.012301] page_type: f5(slab) [ 12.012553] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.012887] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.013467] page dumped because: kasan: bad access detected [ 12.014021] [ 12.014202] Memory state around the buggy address: [ 12.014569] ffff888102b37900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.014884] ffff888102b37980: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 12.015783] >ffff888102b37a00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 12.016403] ^ [ 12.016651] ffff888102b37a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.017196] ffff888102b37b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.017591] ==================================================================