Date
June 17, 2025, 3:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.494285] ================================================================== [ 22.494573] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 22.494743] Read of size 4 at addr fff00000c58e1b00 by task swapper/0/0 [ 22.494866] [ 22.494959] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.3-rc1 #1 PREEMPT [ 22.495169] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.495241] Hardware name: linux,dummy-virt (DT) [ 22.495325] Call trace: [ 22.495382] show_stack+0x20/0x38 (C) [ 22.495508] dump_stack_lvl+0x8c/0xd0 [ 22.495627] print_report+0x118/0x608 [ 22.495975] kasan_report+0xdc/0x128 [ 22.496511] __asan_report_load4_noabort+0x20/0x30 [ 22.496805] rcu_uaf_reclaim+0x64/0x70 [ 22.496927] rcu_core+0x9f4/0x1e20 [ 22.497559] rcu_core_si+0x18/0x30 [ 22.497979] handle_softirqs+0x374/0xb28 [ 22.498159] __do_softirq+0x1c/0x28 [ 22.498278] ____do_softirq+0x18/0x30 [ 22.498443] call_on_irq_stack+0x24/0x30 [ 22.498596] do_softirq_own_stack+0x24/0x38 [ 22.498708] __irq_exit_rcu+0x1fc/0x318 [ 22.498829] irq_exit_rcu+0x1c/0x80 [ 22.498940] el1_interrupt+0x38/0x58 [ 22.499047] el1h_64_irq_handler+0x18/0x28 [ 22.499163] el1h_64_irq+0x6c/0x70 [ 22.499399] arch_local_irq_enable+0x4/0x8 (P) [ 22.499537] do_idle+0x384/0x4e8 [ 22.499635] cpu_startup_entry+0x64/0x80 [ 22.499963] rest_init+0x160/0x188 [ 22.500073] start_kernel+0x308/0x3d0 [ 22.500215] __primary_switched+0x8c/0xa0 [ 22.500346] [ 22.500391] Allocated by task 200: [ 22.500480] kasan_save_stack+0x3c/0x68 [ 22.500620] kasan_save_track+0x20/0x40 [ 22.500748] kasan_save_alloc_info+0x40/0x58 [ 22.500838] __kasan_kmalloc+0xd4/0xd8 [ 22.500919] __kmalloc_cache_noprof+0x16c/0x3c0 [ 22.501020] rcu_uaf+0xb0/0x2d8 [ 22.501217] kunit_try_run_case+0x170/0x3f0 [ 22.501373] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.501489] kthread+0x328/0x630 [ 22.501582] ret_from_fork+0x10/0x20 [ 22.501683] [ 22.501763] Freed by task 0: [ 22.501823] kasan_save_stack+0x3c/0x68 [ 22.501906] kasan_save_track+0x20/0x40 [ 22.502021] kasan_save_free_info+0x4c/0x78 [ 22.502114] __kasan_slab_free+0x6c/0x98 [ 22.502224] kfree+0x214/0x3c8 [ 22.502298] rcu_uaf_reclaim+0x28/0x70 [ 22.502389] rcu_core+0x9f4/0x1e20 [ 22.502528] rcu_core_si+0x18/0x30 [ 22.502618] handle_softirqs+0x374/0xb28 [ 22.502710] __do_softirq+0x1c/0x28 [ 22.502814] [ 22.502920] Last potentially related work creation: [ 22.502998] kasan_save_stack+0x3c/0x68 [ 22.503091] kasan_record_aux_stack+0xb4/0xc8 [ 22.503184] __call_rcu_common.constprop.0+0x70/0x8b0 [ 22.503393] call_rcu+0x18/0x30 [ 22.503519] rcu_uaf+0x14c/0x2d8 [ 22.503615] kunit_try_run_case+0x170/0x3f0 [ 22.503711] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.503827] kthread+0x328/0x630 [ 22.503926] ret_from_fork+0x10/0x20 [ 22.504029] [ 22.504088] The buggy address belongs to the object at fff00000c58e1b00 [ 22.504088] which belongs to the cache kmalloc-32 of size 32 [ 22.504436] The buggy address is located 0 bytes inside of [ 22.504436] freed 32-byte region [fff00000c58e1b00, fff00000c58e1b20) [ 22.504590] [ 22.504643] The buggy address belongs to the physical page: [ 22.504722] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058e1 [ 22.504875] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.505001] page_type: f5(slab) [ 22.505098] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 22.505211] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 22.505328] page dumped because: kasan: bad access detected [ 22.505440] [ 22.505482] Memory state around the buggy address: [ 22.505559] fff00000c58e1a00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 22.505786] fff00000c58e1a80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 22.505901] >fff00000c58e1b00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 22.506008] ^ [ 22.506108] fff00000c58e1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.506246] fff00000c58e1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.506362] ==================================================================
[ 20.268527] ================================================================== [ 20.269381] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 20.270126] Read of size 4 at addr ffff8881030a5840 by task swapper/0/0 [ 20.270736] [ 20.271027] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.3-rc1 #1 PREEMPT(voluntary) [ 20.271259] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.271319] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 20.271376] Call Trace: [ 20.271453] <IRQ> [ 20.271507] dump_stack_lvl+0x73/0xb0 [ 20.271596] print_report+0xd1/0x650 [ 20.271673] ? __virt_addr_valid+0x1db/0x2d0 [ 20.271753] ? rcu_uaf_reclaim+0x50/0x60 [ 20.271822] ? kasan_complete_mode_report_info+0x64/0x200 [ 20.271916] ? rcu_uaf_reclaim+0x50/0x60 [ 20.271992] kasan_report+0x141/0x180 [ 20.272110] ? rcu_uaf_reclaim+0x50/0x60 [ 20.272200] __asan_report_load4_noabort+0x18/0x20 [ 20.272363] rcu_uaf_reclaim+0x50/0x60 [ 20.272494] rcu_core+0x66c/0x1c30 [ 20.272594] ? __pfx_rcu_core+0x10/0x10 [ 20.272671] ? ktime_get+0x6b/0x150 [ 20.272752] rcu_core_si+0x12/0x20 [ 20.272782] handle_softirqs+0x209/0x730 [ 20.272821] ? hrtimer_interrupt+0x2fe/0x780 [ 20.272857] ? __pfx_handle_softirqs+0x10/0x10 [ 20.272897] __irq_exit_rcu+0xc9/0x110 [ 20.272930] irq_exit_rcu+0x12/0x20 [ 20.272957] sysvec_apic_timer_interrupt+0x81/0x90 [ 20.272996] </IRQ> [ 20.273078] <TASK> [ 20.273103] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 20.273232] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 20.273530] 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 83 ed 27 00 fb f4 <e9> fc 1f 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 20.273647] RSP: 0000:ffffffff9c807dd8 EFLAGS: 00010216 [ 20.273766] RAX: ffff8881bd493000 RBX: ffffffff9c81ca80 RCX: ffffffff9b60b015 [ 20.273832] RDX: ffffed102b606103 RSI: 0000000000000004 RDI: 000000000000edcc [ 20.273901] RBP: ffffffff9c807de0 R08: 0000000000000001 R09: ffffed102b606102 [ 20.273961] R10: ffff88815b030813 R11: 0000000000058000 R12: 0000000000000000 [ 20.274022] R13: fffffbfff3903950 R14: ffffffff9d39bf10 R15: 0000000000000000 [ 20.274147] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 20.274225] ? default_idle+0xd/0x20 [ 20.274258] arch_cpu_idle+0xd/0x20 [ 20.274311] default_idle_call+0x48/0x80 [ 20.274346] do_idle+0x379/0x4f0 [ 20.274383] ? __pfx_do_idle+0x10/0x10 [ 20.274411] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 20.274448] ? trace_preempt_on+0x20/0xc0 [ 20.274481] ? schedule+0x86/0x2e0 [ 20.274511] ? preempt_count_sub+0x50/0x80 [ 20.274547] cpu_startup_entry+0x5c/0x70 [ 20.274577] rest_init+0x11a/0x140 [ 20.274603] ? acpi_subsystem_init+0x5d/0x150 [ 20.274639] start_kernel+0x32b/0x410 [ 20.274670] x86_64_start_reservations+0x1c/0x30 [ 20.274702] x86_64_start_kernel+0xcf/0xe0 [ 20.274732] common_startup_64+0x13e/0x148 [ 20.274776] </TASK> [ 20.274792] [ 20.297829] Allocated by task 218: [ 20.298282] kasan_save_stack+0x45/0x70 [ 20.298829] kasan_save_track+0x18/0x40 [ 20.299248] kasan_save_alloc_info+0x3b/0x50 [ 20.299685] __kasan_kmalloc+0xb7/0xc0 [ 20.300255] __kmalloc_cache_noprof+0x189/0x420 [ 20.300733] rcu_uaf+0xb0/0x330 [ 20.301121] kunit_try_run_case+0x1a5/0x480 [ 20.301647] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.302222] kthread+0x337/0x6f0 [ 20.302683] ret_from_fork+0x41/0x80 [ 20.303111] ret_from_fork_asm+0x1a/0x30 [ 20.303619] [ 20.303865] Freed by task 0: [ 20.304249] kasan_save_stack+0x45/0x70 [ 20.304686] kasan_save_track+0x18/0x40 [ 20.305124] kasan_save_free_info+0x3f/0x60 [ 20.305478] __kasan_slab_free+0x56/0x70 [ 20.305857] kfree+0x222/0x3f0 [ 20.306340] rcu_uaf_reclaim+0x1f/0x60 [ 20.306773] rcu_core+0x66c/0x1c30 [ 20.307223] rcu_core_si+0x12/0x20 [ 20.307677] handle_softirqs+0x209/0x730 [ 20.308113] __irq_exit_rcu+0xc9/0x110 [ 20.308529] irq_exit_rcu+0x12/0x20 [ 20.308962] sysvec_apic_timer_interrupt+0x81/0x90 [ 20.309518] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 20.310090] [ 20.310443] Last potentially related work creation: [ 20.310920] kasan_save_stack+0x45/0x70 [ 20.311419] kasan_record_aux_stack+0xb2/0xc0 [ 20.311899] __call_rcu_common.constprop.0+0x72/0x9c0 [ 20.312490] call_rcu+0x12/0x20 [ 20.312840] rcu_uaf+0x168/0x330 [ 20.313194] kunit_try_run_case+0x1a5/0x480 [ 20.313704] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 20.314361] kthread+0x337/0x6f0 [ 20.314710] ret_from_fork+0x41/0x80 [ 20.315091] ret_from_fork_asm+0x1a/0x30 [ 20.315579] [ 20.315832] The buggy address belongs to the object at ffff8881030a5840 [ 20.315832] which belongs to the cache kmalloc-32 of size 32 [ 20.316853] The buggy address is located 0 bytes inside of [ 20.316853] freed 32-byte region [ffff8881030a5840, ffff8881030a5860) [ 20.317858] [ 20.318178] The buggy address belongs to the physical page: [ 20.318573] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1030a5 [ 20.319185] flags: 0x200000000000000(node=0|zone=2) [ 20.319726] page_type: f5(slab) [ 20.320227] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 20.320963] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.321475] page dumped because: kasan: bad access detected [ 20.321925] [ 20.322245] Memory state around the buggy address: [ 20.322801] ffff8881030a5700: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 20.323531] ffff8881030a5780: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 20.324237] >ffff8881030a5800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.324893] ^ [ 20.325364] ffff8881030a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.326093] ffff8881030a5900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.326710] ==================================================================