Date
July 17, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.826359] ================================================================== [ 15.826513] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 15.826582] Read of size 4 at addr fff00000c789a380 by task swapper/0/0 [ 15.827039] [ 15.827097] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.827531] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.827571] Hardware name: linux,dummy-virt (DT) [ 15.827605] Call trace: [ 15.827628] show_stack+0x20/0x38 (C) [ 15.827691] dump_stack_lvl+0x8c/0xd0 [ 15.827853] print_report+0x118/0x5d0 [ 15.828047] kasan_report+0xdc/0x128 [ 15.828111] __asan_report_load4_noabort+0x20/0x30 [ 15.828475] rcu_uaf_reclaim+0x64/0x70 [ 15.828569] rcu_core+0x9f4/0x1e20 [ 15.828642] rcu_core_si+0x18/0x30 [ 15.828686] handle_softirqs+0x374/0xb28 [ 15.828853] __do_softirq+0x1c/0x28 [ 15.829187] ____do_softirq+0x18/0x30 [ 15.829236] call_on_irq_stack+0x24/0x30 [ 15.829528] do_softirq_own_stack+0x24/0x38 [ 15.829678] __irq_exit_rcu+0x1fc/0x318 [ 15.829801] irq_exit_rcu+0x1c/0x80 [ 15.830034] el1_interrupt+0x38/0x58 [ 15.830096] el1h_64_irq_handler+0x18/0x28 [ 15.830145] el1h_64_irq+0x6c/0x70 [ 15.830259] arch_local_irq_enable+0x4/0x8 (P) [ 15.830310] do_idle+0x384/0x4e8 [ 15.830354] cpu_startup_entry+0x64/0x80 [ 15.830570] rest_init+0x160/0x188 [ 15.832052] start_kernel+0x30c/0x3d0 [ 15.832114] __primary_switched+0x8c/0xa0 [ 15.832183] [ 15.832203] Allocated by task 199: [ 15.832237] kasan_save_stack+0x3c/0x68 [ 15.832286] kasan_save_track+0x20/0x40 [ 15.832333] kasan_save_alloc_info+0x40/0x58 [ 15.832374] __kasan_kmalloc+0xd4/0xd8 [ 15.832412] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.832461] rcu_uaf+0xb0/0x2d8 [ 15.832496] kunit_try_run_case+0x170/0x3f0 [ 15.832544] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.832598] kthread+0x328/0x630 [ 15.832631] ret_from_fork+0x10/0x20 [ 15.832668] [ 15.832702] Freed by task 0: [ 15.832729] kasan_save_stack+0x3c/0x68 [ 15.833172] kasan_save_track+0x20/0x40 [ 15.833228] kasan_save_free_info+0x4c/0x78 [ 15.833271] __kasan_slab_free+0x6c/0x98 [ 15.833319] kfree+0x214/0x3c8 [ 15.833354] rcu_uaf_reclaim+0x28/0x70 [ 15.833390] rcu_core+0x9f4/0x1e20 [ 15.833425] rcu_core_si+0x18/0x30 [ 15.833460] handle_softirqs+0x374/0xb28 [ 15.833496] __do_softirq+0x1c/0x28 [ 15.833530] [ 15.833564] Last potentially related work creation: [ 15.833600] kasan_save_stack+0x3c/0x68 [ 15.833637] kasan_record_aux_stack+0xb4/0xc8 [ 15.833679] __call_rcu_common.constprop.0+0x74/0x8c8 [ 15.833720] call_rcu+0x18/0x30 [ 15.833754] rcu_uaf+0x14c/0x2d8 [ 15.833788] kunit_try_run_case+0x170/0x3f0 [ 15.833827] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.833869] kthread+0x328/0x630 [ 15.833900] ret_from_fork+0x10/0x20 [ 15.833942] [ 15.833967] The buggy address belongs to the object at fff00000c789a380 [ 15.833967] which belongs to the cache kmalloc-32 of size 32 [ 15.834382] The buggy address is located 0 bytes inside of [ 15.834382] freed 32-byte region [fff00000c789a380, fff00000c789a3a0) [ 15.834454] [ 15.834475] The buggy address belongs to the physical page: [ 15.835353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10789a [ 15.835429] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.836125] page_type: f5(slab) [ 15.836387] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 15.837958] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 15.838062] page dumped because: kasan: bad access detected [ 15.838102] [ 15.838133] Memory state around the buggy address: [ 15.838171] fff00000c789a280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.838233] fff00000c789a300: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 15.838276] >fff00000c789a380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 15.838325] ^ [ 15.838365] fff00000c789a400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.838410] fff00000c789a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.838450] ==================================================================
[ 13.579434] ================================================================== [ 13.579869] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.580135] Read of size 4 at addr ffff888102a11680 by task swapper/0/0 [ 13.580410] [ 13.580516] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 13.580566] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.580577] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.580597] Call Trace: [ 13.580624] <IRQ> [ 13.580639] dump_stack_lvl+0x73/0xb0 [ 13.580670] print_report+0xd1/0x610 [ 13.580691] ? __virt_addr_valid+0x1db/0x2d0 [ 13.580714] ? rcu_uaf_reclaim+0x50/0x60 [ 13.580732] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.580754] ? rcu_uaf_reclaim+0x50/0x60 [ 13.580773] kasan_report+0x141/0x180 [ 13.580794] ? rcu_uaf_reclaim+0x50/0x60 [ 13.580818] __asan_report_load4_noabort+0x18/0x20 [ 13.580841] rcu_uaf_reclaim+0x50/0x60 [ 13.580860] rcu_core+0x66f/0x1c40 [ 13.580888] ? __pfx_rcu_core+0x10/0x10 [ 13.580908] ? ktime_get+0x6b/0x150 [ 13.580929] ? handle_softirqs+0x18e/0x730 [ 13.580953] rcu_core_si+0x12/0x20 [ 13.580972] handle_softirqs+0x209/0x730 [ 13.580990] ? hrtimer_interrupt+0x2fe/0x780 [ 13.581012] ? __pfx_handle_softirqs+0x10/0x10 [ 13.581036] __irq_exit_rcu+0xc9/0x110 [ 13.581055] irq_exit_rcu+0x12/0x20 [ 13.581075] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.581098] </IRQ> [ 13.581119] <TASK> [ 13.581128] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.581216] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.581431] 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.581611] RSP: 0000:ffffffffbbe07dd8 EFLAGS: 00010206 [ 13.581706] RAX: ffff88819de72000 RBX: ffffffffbbe1cac0 RCX: ffffffffbac75125 [ 13.581751] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000005e04 [ 13.581795] RBP: ffffffffbbe07de0 R08: 0000000000000001 R09: ffffed102b60618a [ 13.581839] R10: ffff88815b030c53 R11: ffffffffbd1c36c0 R12: 0000000000000000 [ 13.581881] R13: fffffbfff77c3958 R14: ffffffffbc9b1490 R15: 0000000000000000 [ 13.581939] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.581995] ? default_idle+0xd/0x20 [ 13.582018] arch_cpu_idle+0xd/0x20 [ 13.582039] default_idle_call+0x48/0x80 [ 13.582058] do_idle+0x379/0x4f0 [ 13.582084] ? __pfx_do_idle+0x10/0x10 [ 13.582106] ? trace_preempt_on+0x20/0xc0 [ 13.582128] ? schedule+0x86/0x2e0 [ 13.582149] ? preempt_count_sub+0x50/0x80 [ 13.582172] cpu_startup_entry+0x5c/0x70 [ 13.582192] rest_init+0x11a/0x140 [ 13.582209] ? acpi_subsystem_init+0x5d/0x150 [ 13.582255] start_kernel+0x330/0x410 [ 13.582281] x86_64_start_reservations+0x1c/0x30 [ 13.582307] x86_64_start_kernel+0x10d/0x120 [ 13.582332] common_startup_64+0x13e/0x148 [ 13.582365] </TASK> [ 13.582376] [ 13.595330] Allocated by task 215: [ 13.595527] kasan_save_stack+0x45/0x70 [ 13.595738] kasan_save_track+0x18/0x40 [ 13.595905] kasan_save_alloc_info+0x3b/0x50 [ 13.596103] __kasan_kmalloc+0xb7/0xc0 [ 13.596850] __kmalloc_cache_noprof+0x189/0x420 [ 13.597044] rcu_uaf+0xb0/0x330 [ 13.597166] kunit_try_run_case+0x1a5/0x480 [ 13.597428] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.597677] kthread+0x337/0x6f0 [ 13.597841] ret_from_fork+0x116/0x1d0 [ 13.598017] ret_from_fork_asm+0x1a/0x30 [ 13.598186] [ 13.598437] Freed by task 0: [ 13.598598] kasan_save_stack+0x45/0x70 [ 13.598776] kasan_save_track+0x18/0x40 [ 13.598953] kasan_save_free_info+0x3f/0x60 [ 13.599135] __kasan_slab_free+0x56/0x70 [ 13.599368] kfree+0x222/0x3f0 [ 13.599640] rcu_uaf_reclaim+0x1f/0x60 [ 13.599812] rcu_core+0x66f/0x1c40 [ 13.599972] rcu_core_si+0x12/0x20 [ 13.600134] handle_softirqs+0x209/0x730 [ 13.600445] __irq_exit_rcu+0xc9/0x110 [ 13.600638] irq_exit_rcu+0x12/0x20 [ 13.600811] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.601024] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.601235] [ 13.602228] Last potentially related work creation: [ 13.602902] kasan_save_stack+0x45/0x70 [ 13.603392] kasan_record_aux_stack+0xb2/0xc0 [ 13.603804] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.604189] call_rcu+0x12/0x20 [ 13.604730] rcu_uaf+0x168/0x330 [ 13.604992] kunit_try_run_case+0x1a5/0x480 [ 13.605197] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.605703] kthread+0x337/0x6f0 [ 13.605889] ret_from_fork+0x116/0x1d0 [ 13.606064] ret_from_fork_asm+0x1a/0x30 [ 13.606493] [ 13.606609] The buggy address belongs to the object at ffff888102a11680 [ 13.606609] which belongs to the cache kmalloc-32 of size 32 [ 13.607522] The buggy address is located 0 bytes inside of [ 13.607522] freed 32-byte region [ffff888102a11680, ffff888102a116a0) [ 13.608001] [ 13.608098] The buggy address belongs to the physical page: [ 13.608625] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a11 [ 13.609210] flags: 0x200000000000000(node=0|zone=2) [ 13.609663] page_type: f5(slab) [ 13.609979] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.610489] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.610983] page dumped because: kasan: bad access detected [ 13.611216] [ 13.611306] Memory state around the buggy address: [ 13.611509] ffff888102a11580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.611802] ffff888102a11600: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 13.612086] >ffff888102a11680: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 13.612365] ^ [ 13.612517] ffff888102a11700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.613588] ffff888102a11780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.614570] ==================================================================