Date
May 26, 2025, 9:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.043605] ================================================================== [ 18.043855] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 18.043987] Read of size 4 at addr fff00000c78c3f80 by task swapper/0/0 [ 18.044086] [ 18.044164] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT [ 18.044367] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.044423] Hardware name: linux,dummy-virt (DT) [ 18.044505] Call trace: [ 18.044560] show_stack+0x20/0x38 (C) [ 18.044673] dump_stack_lvl+0x8c/0xd0 [ 18.044778] print_report+0x118/0x608 [ 18.044885] kasan_report+0xdc/0x128 [ 18.044983] __asan_report_load4_noabort+0x20/0x30 [ 18.045100] rcu_uaf_reclaim+0x64/0x70 [ 18.045201] rcu_core+0x9f4/0x1e20 [ 18.045306] rcu_core_si+0x18/0x30 [ 18.046293] handle_softirqs+0x374/0xb28 [ 18.046506] __do_softirq+0x1c/0x28 [ 18.046639] ____do_softirq+0x18/0x30 [ 18.046802] call_on_irq_stack+0x24/0x30 [ 18.046887] do_softirq_own_stack+0x24/0x38 [ 18.046977] __irq_exit_rcu+0x1fc/0x318 [ 18.047395] irq_exit_rcu+0x1c/0x80 [ 18.047530] el1_interrupt+0x38/0x58 [ 18.047625] el1h_64_irq_handler+0x18/0x28 [ 18.047704] el1h_64_irq+0x6c/0x70 [ 18.047882] arch_local_irq_enable+0x4/0x8 (P) [ 18.047988] do_idle+0x384/0x4e8 [ 18.048123] cpu_startup_entry+0x68/0x80 [ 18.048211] rest_init+0x160/0x188 [ 18.048301] start_kernel+0x314/0x3d8 [ 18.048571] __primary_switched+0x8c/0xa0 [ 18.048900] [ 18.048959] Allocated by task 198: [ 18.049021] kasan_save_stack+0x3c/0x68 [ 18.049147] kasan_save_track+0x20/0x40 [ 18.049271] kasan_save_alloc_info+0x40/0x58 [ 18.049385] __kasan_kmalloc+0xd4/0xd8 [ 18.049457] __kmalloc_cache_noprof+0x15c/0x3c0 [ 18.049575] rcu_uaf+0xb0/0x2d8 [ 18.049677] kunit_try_run_case+0x170/0x3f0 [ 18.049799] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.049902] kthread+0x328/0x630 [ 18.049996] ret_from_fork+0x10/0x20 [ 18.050103] [ 18.050144] Freed by task 0: [ 18.050199] kasan_save_stack+0x3c/0x68 [ 18.050274] kasan_save_track+0x20/0x40 [ 18.050356] kasan_save_free_info+0x4c/0x78 [ 18.050452] __kasan_slab_free+0x6c/0x98 [ 18.050560] kfree+0x214/0x3c8 [ 18.050660] rcu_uaf_reclaim+0x28/0x70 [ 18.050793] rcu_core+0x9f4/0x1e20 [ 18.050861] rcu_core_si+0x18/0x30 [ 18.050927] handle_softirqs+0x374/0xb28 [ 18.051005] __do_softirq+0x1c/0x28 [ 18.051158] [ 18.051482] Last potentially related work creation: [ 18.051649] kasan_save_stack+0x3c/0x68 [ 18.051930] kasan_record_aux_stack+0xb4/0xc8 [ 18.052036] __call_rcu_common.constprop.0+0x70/0x8b0 [ 18.052160] call_rcu+0x18/0x30 [ 18.052222] rcu_uaf+0x14c/0x2d8 [ 18.052330] kunit_try_run_case+0x170/0x3f0 [ 18.052418] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.052564] kthread+0x328/0x630 [ 18.052632] ret_from_fork+0x10/0x20 [ 18.052767] [ 18.052848] The buggy address belongs to the object at fff00000c78c3f80 [ 18.052848] which belongs to the cache kmalloc-32 of size 32 [ 18.053006] The buggy address is located 0 bytes inside of [ 18.053006] freed 32-byte region [fff00000c78c3f80, fff00000c78c3fa0) [ 18.053134] [ 18.053193] The buggy address belongs to the physical page: [ 18.053298] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078c3 [ 18.053467] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.053580] page_type: f5(slab) [ 18.053672] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.053781] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.053868] page dumped because: kasan: bad access detected [ 18.053929] [ 18.053967] Memory state around the buggy address: [ 18.054053] fff00000c78c3e80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 18.054191] fff00000c78c3f00: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.054328] >fff00000c78c3f80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.054419] ^ [ 18.054481] fff00000c78c4000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.054574] fff00000c78c4080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 18.054655] ==================================================================
[ 11.542118] ================================================================== [ 11.542532] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 11.543134] Read of size 4 at addr ffff888102824c40 by task swapper/0/0 [ 11.544064] [ 11.544478] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) [ 11.544528] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.544541] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.544686] Call Trace: [ 11.544717] <IRQ> [ 11.544735] dump_stack_lvl+0x73/0xb0 [ 11.544765] print_report+0xd1/0x650 [ 11.544788] ? __virt_addr_valid+0x1db/0x2d0 [ 11.544811] ? rcu_uaf_reclaim+0x50/0x60 [ 11.544831] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.544853] ? rcu_uaf_reclaim+0x50/0x60 [ 11.544874] kasan_report+0x141/0x180 [ 11.544895] ? rcu_uaf_reclaim+0x50/0x60 [ 11.544920] __asan_report_load4_noabort+0x18/0x20 [ 11.544941] rcu_uaf_reclaim+0x50/0x60 [ 11.544961] rcu_core+0x66f/0x1c40 [ 11.544990] ? __pfx_rcu_core+0x10/0x10 [ 11.545032] ? ktime_get+0x6b/0x150 [ 11.545053] ? handle_softirqs+0x18e/0x730 [ 11.545078] rcu_core_si+0x12/0x20 [ 11.545098] handle_softirqs+0x209/0x730 [ 11.545117] ? hrtimer_interrupt+0x2fe/0x780 [ 11.545139] ? __pfx_handle_softirqs+0x10/0x10 [ 11.545164] __irq_exit_rcu+0xc9/0x110 [ 11.545184] irq_exit_rcu+0x12/0x20 [ 11.545203] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.545229] </IRQ> [ 11.545254] <TASK> [ 11.545264] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.545351] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 11.545580] 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 c8 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.545667] RSP: 0000:ffffffffa8407dd8 EFLAGS: 00010212 [ 11.545766] RAX: ffff8881ab05b000 RBX: ffffffffa841cac0 RCX: ffffffffa72af245 [ 11.545811] RDX: ffffed102a90618b RSI: 0000000000000004 RDI: 0000000000011efc [ 11.545857] RBP: ffffffffa8407de0 R08: 0000000000000001 R09: ffffed102a90618a [ 11.545899] R10: ffff888154830c53 R11: 000000000000d000 R12: 0000000000000000 [ 11.545944] R13: fffffbfff5083958 R14: ffffffffa8fc2f90 R15: 0000000000000000 [ 11.546086] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 11.546154] ? default_idle+0xd/0x20 [ 11.546175] arch_cpu_idle+0xd/0x20 [ 11.546194] default_idle_call+0x48/0x80 [ 11.546214] do_idle+0x379/0x4f0 [ 11.546236] ? __pfx_do_idle+0x10/0x10 [ 11.546254] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.546278] ? trace_preempt_on+0x20/0xc0 [ 11.546299] ? schedule+0x86/0x2e0 [ 11.546320] ? preempt_count_sub+0x50/0x80 [ 11.546343] cpu_startup_entry+0x5c/0x70 [ 11.546363] rest_init+0x11a/0x140 [ 11.546394] ? acpi_subsystem_init+0x5d/0x150 [ 11.546419] start_kernel+0x330/0x410 [ 11.546441] x86_64_start_reservations+0x1c/0x30 [ 11.546462] x86_64_start_kernel+0x10d/0x120 [ 11.546483] common_startup_64+0x13e/0x148 [ 11.546515] </TASK> [ 11.546525] [ 11.558854] Allocated by task 216: [ 11.559032] kasan_save_stack+0x45/0x70 [ 11.559302] kasan_save_track+0x18/0x40 [ 11.559501] kasan_save_alloc_info+0x3b/0x50 [ 11.559704] __kasan_kmalloc+0xb7/0xc0 [ 11.559911] __kmalloc_cache_noprof+0x189/0x420 [ 11.560267] rcu_uaf+0xb0/0x330 [ 11.560466] kunit_try_run_case+0x1a5/0x480 [ 11.560641] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.560969] kthread+0x337/0x6f0 [ 11.561213] ret_from_fork+0x116/0x1d0 [ 11.561356] ret_from_fork_asm+0x1a/0x30 [ 11.561510] [ 11.561581] Freed by task 0: [ 11.561689] kasan_save_stack+0x45/0x70 [ 11.561883] kasan_save_track+0x18/0x40 [ 11.562080] kasan_save_free_info+0x3f/0x60 [ 11.562437] __kasan_slab_free+0x56/0x70 [ 11.562646] kfree+0x222/0x3f0 [ 11.562935] rcu_uaf_reclaim+0x1f/0x60 [ 11.563325] rcu_core+0x66f/0x1c40 [ 11.563528] rcu_core_si+0x12/0x20 [ 11.563694] handle_softirqs+0x209/0x730 [ 11.563908] __irq_exit_rcu+0xc9/0x110 [ 11.564045] irq_exit_rcu+0x12/0x20 [ 11.564173] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.564338] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.564780] [ 11.564906] Last potentially related work creation: [ 11.565229] kasan_save_stack+0x45/0x70 [ 11.565459] kasan_record_aux_stack+0xb2/0xc0 [ 11.565612] __call_rcu_common.constprop.0+0x72/0x9d0 [ 11.565783] call_rcu+0x12/0x20 [ 11.566062] rcu_uaf+0x168/0x330 [ 11.566245] kunit_try_run_case+0x1a5/0x480 [ 11.566461] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.566715] kthread+0x337/0x6f0 [ 11.566872] ret_from_fork+0x116/0x1d0 [ 11.567171] ret_from_fork_asm+0x1a/0x30 [ 11.567334] [ 11.567444] The buggy address belongs to the object at ffff888102824c40 [ 11.567444] which belongs to the cache kmalloc-32 of size 32 [ 11.567978] The buggy address is located 0 bytes inside of [ 11.567978] freed 32-byte region [ffff888102824c40, ffff888102824c60) [ 11.568549] [ 11.568630] The buggy address belongs to the physical page: [ 11.568909] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102824 [ 11.569368] flags: 0x200000000000000(node=0|zone=2) [ 11.570672] page_type: f5(slab) [ 11.570887] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.571760] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.572067] page dumped because: kasan: bad access detected [ 11.572473] [ 11.572729] Memory state around the buggy address: [ 11.573024] ffff888102824b00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 11.573330] ffff888102824b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.573602] >ffff888102824c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.574310] ^ [ 11.574525] ffff888102824c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.575284] ffff888102824d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.575600] ==================================================================