Date
July 9, 2025, 11:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.126525] ================================================================== [ 17.126663] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 17.126737] Read of size 4 at addr fff00000c6cd34c0 by task swapper/1/0 [ 17.130794] [ 17.131679] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 17.131933] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.132365] Hardware name: linux,dummy-virt (DT) [ 17.132413] Call trace: [ 17.133326] show_stack+0x20/0x38 (C) [ 17.133718] dump_stack_lvl+0x8c/0xd0 [ 17.134461] print_report+0x118/0x608 [ 17.134534] kasan_report+0xdc/0x128 [ 17.134583] __asan_report_load4_noabort+0x20/0x30 [ 17.134633] rcu_uaf_reclaim+0x64/0x70 [ 17.134678] rcu_core+0x9f4/0x1e20 [ 17.134728] rcu_core_si+0x18/0x30 [ 17.134773] handle_softirqs+0x374/0xb28 [ 17.136840] __do_softirq+0x1c/0x28 [ 17.137602] ____do_softirq+0x18/0x30 [ 17.137967] call_on_irq_stack+0x24/0x30 [ 17.139323] do_softirq_own_stack+0x24/0x38 [ 17.139508] __irq_exit_rcu+0x1fc/0x318 [ 17.139583] irq_exit_rcu+0x1c/0x80 [ 17.140182] el1_interrupt+0x38/0x58 [ 17.140370] el1h_64_irq_handler+0x18/0x28 [ 17.141297] el1h_64_irq+0x6c/0x70 [ 17.141868] arch_local_irq_enable+0x4/0x8 (P) [ 17.141937] do_idle+0x384/0x4e8 [ 17.141981] cpu_startup_entry+0x64/0x80 [ 17.143328] secondary_start_kernel+0x288/0x340 [ 17.143644] __secondary_switched+0xc0/0xc8 [ 17.144254] [ 17.144278] Allocated by task 198: [ 17.144459] kasan_save_stack+0x3c/0x68 [ 17.144614] kasan_save_track+0x20/0x40 [ 17.145058] kasan_save_alloc_info+0x40/0x58 [ 17.145105] __kasan_kmalloc+0xd4/0xd8 [ 17.145154] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.145194] rcu_uaf+0xb0/0x2d8 [ 17.145229] kunit_try_run_case+0x170/0x3f0 [ 17.145271] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.146440] kthread+0x328/0x630 [ 17.146489] ret_from_fork+0x10/0x20 [ 17.146527] [ 17.147677] Freed by task 0: [ 17.148230] kasan_save_stack+0x3c/0x68 [ 17.148281] kasan_save_track+0x20/0x40 [ 17.148320] kasan_save_free_info+0x4c/0x78 [ 17.148359] __kasan_slab_free+0x6c/0x98 [ 17.148397] kfree+0x214/0x3c8 [ 17.148433] rcu_uaf_reclaim+0x28/0x70 [ 17.148469] rcu_core+0x9f4/0x1e20 [ 17.149587] rcu_core_si+0x18/0x30 [ 17.149668] handle_softirqs+0x374/0xb28 [ 17.149908] __do_softirq+0x1c/0x28 [ 17.150357] [ 17.150526] Last potentially related work creation: [ 17.151130] kasan_save_stack+0x3c/0x68 [ 17.151368] kasan_record_aux_stack+0xb4/0xc8 [ 17.152200] __call_rcu_common.constprop.0+0x74/0x8c8 [ 17.152307] call_rcu+0x18/0x30 [ 17.152605] rcu_uaf+0x14c/0x2d8 [ 17.153017] kunit_try_run_case+0x170/0x3f0 [ 17.153088] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.153145] kthread+0x328/0x630 [ 17.153178] ret_from_fork+0x10/0x20 [ 17.153226] [ 17.154363] The buggy address belongs to the object at fff00000c6cd34c0 [ 17.154363] which belongs to the cache kmalloc-32 of size 32 [ 17.154857] The buggy address is located 0 bytes inside of [ 17.154857] freed 32-byte region [fff00000c6cd34c0, fff00000c6cd34e0) [ 17.154926] [ 17.154956] The buggy address belongs to the physical page: [ 17.156129] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cd3 [ 17.156254] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.156984] page_type: f5(slab) [ 17.157510] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.157670] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.157720] page dumped because: kasan: bad access detected [ 17.157753] [ 17.157770] Memory state around the buggy address: [ 17.157805] fff00000c6cd3380: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 17.159857] fff00000c6cd3400: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.160087] >fff00000c6cd3480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.160135] ^ [ 17.160905] fff00000c6cd3500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.161025] fff00000c6cd3580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.161128] ==================================================================
[ 13.098145] ================================================================== [ 13.098601] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.099164] Read of size 4 at addr ffff8881038d4380 by task swapper/1/0 [ 13.099381] [ 13.099762] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.099809] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.099820] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.099840] Call Trace: [ 13.099868] <IRQ> [ 13.099885] dump_stack_lvl+0x73/0xb0 [ 13.099917] print_report+0xd1/0x650 [ 13.099939] ? __virt_addr_valid+0x1db/0x2d0 [ 13.099962] ? rcu_uaf_reclaim+0x50/0x60 [ 13.099981] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.100004] ? rcu_uaf_reclaim+0x50/0x60 [ 13.100087] kasan_report+0x141/0x180 [ 13.100112] ? rcu_uaf_reclaim+0x50/0x60 [ 13.100138] __asan_report_load4_noabort+0x18/0x20 [ 13.100162] rcu_uaf_reclaim+0x50/0x60 [ 13.100183] rcu_core+0x66f/0x1c40 [ 13.100211] ? __pfx_rcu_core+0x10/0x10 [ 13.100232] ? ktime_get+0x6b/0x150 [ 13.100254] ? handle_softirqs+0x18e/0x730 [ 13.100279] rcu_core_si+0x12/0x20 [ 13.100299] handle_softirqs+0x209/0x730 [ 13.100325] ? hrtimer_interrupt+0x2fe/0x780 [ 13.100348] ? __pfx_handle_softirqs+0x10/0x10 [ 13.100374] __irq_exit_rcu+0xc9/0x110 [ 13.100394] irq_exit_rcu+0x12/0x20 [ 13.100414] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.100439] </IRQ> [ 13.100466] <TASK> [ 13.100477] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.100568] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.100787] 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.100868] RSP: 0000:ffff888100877dc8 EFLAGS: 00010212 [ 13.100954] RAX: ffff8881cc572000 RBX: ffff888100853000 RCX: ffffffff8c674105 [ 13.100999] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000001ebbc [ 13.101091] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 13.101138] R10: ffff88815b130c53 R11: ffffffff8ebc36c0 R12: 0000000000000001 [ 13.101180] R13: ffffed102010a600 R14: ffffffff8e3b1390 R15: 0000000000000000 [ 13.101239] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.101294] ? default_idle+0xd/0x20 [ 13.101316] arch_cpu_idle+0xd/0x20 [ 13.101337] default_idle_call+0x48/0x80 [ 13.101356] do_idle+0x379/0x4f0 [ 13.101378] ? complete+0x15b/0x1d0 [ 13.101395] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.101421] ? __pfx_do_idle+0x10/0x10 [ 13.101441] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 13.101465] ? complete+0x15b/0x1d0 [ 13.101487] cpu_startup_entry+0x5c/0x70 [ 13.101506] start_secondary+0x211/0x290 [ 13.101528] ? __pfx_start_secondary+0x10/0x10 [ 13.101555] common_startup_64+0x13e/0x148 [ 13.101588] </TASK> [ 13.101598] [ 13.116532] Allocated by task 215: [ 13.116674] kasan_save_stack+0x45/0x70 [ 13.117349] kasan_save_track+0x18/0x40 [ 13.117655] kasan_save_alloc_info+0x3b/0x50 [ 13.117828] __kasan_kmalloc+0xb7/0xc0 [ 13.118011] __kmalloc_cache_noprof+0x189/0x420 [ 13.118492] rcu_uaf+0xb0/0x330 [ 13.119776] kunit_try_run_case+0x1a5/0x480 [ 13.120163] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.120470] kthread+0x337/0x6f0 [ 13.120592] ret_from_fork+0x116/0x1d0 [ 13.120811] ret_from_fork_asm+0x1a/0x30 [ 13.121185] [ 13.121569] Freed by task 0: [ 13.122019] kasan_save_stack+0x45/0x70 [ 13.122682] kasan_save_track+0x18/0x40 [ 13.123137] kasan_save_free_info+0x3f/0x60 [ 13.123292] __kasan_slab_free+0x56/0x70 [ 13.123430] kfree+0x222/0x3f0 [ 13.123546] rcu_uaf_reclaim+0x1f/0x60 [ 13.123678] rcu_core+0x66f/0x1c40 [ 13.124384] rcu_core_si+0x12/0x20 [ 13.124729] handle_softirqs+0x209/0x730 [ 13.125256] __irq_exit_rcu+0xc9/0x110 [ 13.125722] irq_exit_rcu+0x12/0x20 [ 13.126191] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.126711] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.127327] [ 13.127507] Last potentially related work creation: [ 13.127671] kasan_save_stack+0x45/0x70 [ 13.127830] kasan_record_aux_stack+0xb2/0xc0 [ 13.127983] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.128611] call_rcu+0x12/0x20 [ 13.128940] rcu_uaf+0x168/0x330 [ 13.129300] kunit_try_run_case+0x1a5/0x480 [ 13.129749] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.130310] kthread+0x337/0x6f0 [ 13.130686] ret_from_fork+0x116/0x1d0 [ 13.131167] ret_from_fork_asm+0x1a/0x30 [ 13.131556] [ 13.131740] The buggy address belongs to the object at ffff8881038d4380 [ 13.131740] which belongs to the cache kmalloc-32 of size 32 [ 13.132618] The buggy address is located 0 bytes inside of [ 13.132618] freed 32-byte region [ffff8881038d4380, ffff8881038d43a0) [ 13.132975] [ 13.133329] The buggy address belongs to the physical page: [ 13.133959] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038d4 [ 13.134823] flags: 0x200000000000000(node=0|zone=2) [ 13.135525] page_type: f5(slab) [ 13.135868] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.136670] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.137040] page dumped because: kasan: bad access detected [ 13.137317] [ 13.137491] Memory state around the buggy address: [ 13.137960] ffff8881038d4280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.138743] ffff8881038d4300: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.139385] >ffff8881038d4380: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 13.139776] ^ [ 13.139890] ffff8881038d4400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.140261] ffff8881038d4480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.141071] ==================================================================