Date
July 1, 2025, 3:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.477584] ================================================================== [ 17.478551] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 17.479071] Read of size 4 at addr fff00000c57d1680 by task swapper/1/0 [ 17.479420] [ 17.479745] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 17.479905] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.479934] Hardware name: linux,dummy-virt (DT) [ 17.480366] Call trace: [ 17.480574] show_stack+0x20/0x38 (C) [ 17.480694] dump_stack_lvl+0x8c/0xd0 [ 17.481607] print_report+0x118/0x608 [ 17.481759] kasan_report+0xdc/0x128 [ 17.481902] __asan_report_load4_noabort+0x20/0x30 [ 17.482636] rcu_uaf_reclaim+0x64/0x70 [ 17.482802] rcu_core+0x9f4/0x1e20 [ 17.482852] rcu_core_si+0x18/0x30 [ 17.482897] handle_softirqs+0x374/0xb28 [ 17.483502] __do_softirq+0x1c/0x28 [ 17.483933] ____do_softirq+0x18/0x30 [ 17.484270] call_on_irq_stack+0x24/0x30 [ 17.484327] do_softirq_own_stack+0x24/0x38 [ 17.484607] __irq_exit_rcu+0x1fc/0x318 [ 17.484909] irq_exit_rcu+0x1c/0x80 [ 17.485022] el1_interrupt+0x38/0x58 [ 17.485678] el1h_64_irq_handler+0x18/0x28 [ 17.485988] el1h_64_irq+0x6c/0x70 [ 17.486779] arch_local_irq_enable+0x4/0x8 (P) [ 17.487059] do_idle+0x384/0x4e8 [ 17.487369] cpu_startup_entry+0x64/0x80 [ 17.487513] secondary_start_kernel+0x288/0x340 [ 17.487947] __secondary_switched+0xc0/0xc8 [ 17.488474] [ 17.488892] Allocated by task 199: [ 17.488946] kasan_save_stack+0x3c/0x68 [ 17.489151] kasan_save_track+0x20/0x40 [ 17.489189] kasan_save_alloc_info+0x40/0x58 [ 17.489230] __kasan_kmalloc+0xd4/0xd8 [ 17.489274] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.490083] rcu_uaf+0xb0/0x2d8 [ 17.490396] kunit_try_run_case+0x170/0x3f0 [ 17.490629] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.490707] kthread+0x328/0x630 [ 17.490987] ret_from_fork+0x10/0x20 [ 17.491231] [ 17.491252] Freed by task 0: [ 17.491433] kasan_save_stack+0x3c/0x68 [ 17.491543] kasan_save_track+0x20/0x40 [ 17.491590] kasan_save_free_info+0x4c/0x78 [ 17.491631] __kasan_slab_free+0x6c/0x98 [ 17.492646] kfree+0x214/0x3c8 [ 17.492927] rcu_uaf_reclaim+0x28/0x70 [ 17.492967] rcu_core+0x9f4/0x1e20 [ 17.493004] rcu_core_si+0x18/0x30 [ 17.493370] handle_softirqs+0x374/0xb28 [ 17.493735] __do_softirq+0x1c/0x28 [ 17.493781] [ 17.493821] Last potentially related work creation: [ 17.494213] kasan_save_stack+0x3c/0x68 [ 17.494263] kasan_record_aux_stack+0xb4/0xc8 [ 17.494305] __call_rcu_common.constprop.0+0x74/0x8c8 [ 17.494850] call_rcu+0x18/0x30 [ 17.494921] rcu_uaf+0x14c/0x2d8 [ 17.495412] kunit_try_run_case+0x170/0x3f0 [ 17.495529] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.495899] kthread+0x328/0x630 [ 17.496134] ret_from_fork+0x10/0x20 [ 17.496457] [ 17.496983] The buggy address belongs to the object at fff00000c57d1680 [ 17.496983] which belongs to the cache kmalloc-32 of size 32 [ 17.497157] The buggy address is located 0 bytes inside of [ 17.497157] freed 32-byte region [fff00000c57d1680, fff00000c57d16a0) [ 17.497223] [ 17.497246] The buggy address belongs to the physical page: [ 17.498131] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057d1 [ 17.498279] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.498986] page_type: f5(slab) [ 17.499643] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.499741] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.500358] page dumped because: kasan: bad access detected [ 17.500497] [ 17.500709] Memory state around the buggy address: [ 17.500943] fff00000c57d1580: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 17.501750] fff00000c57d1600: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.502414] >fff00000c57d1680: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 17.502738] ^ [ 17.502843] fff00000c57d1700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.502913] fff00000c57d1780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.503298] ==================================================================
[ 12.171758] ================================================================== [ 12.172259] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 12.172533] Read of size 4 at addr ffff8881027cfb80 by task swapper/1/0 [ 12.173197] [ 12.173336] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.173385] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.173396] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.173418] Call Trace: [ 12.173447] <IRQ> [ 12.173466] dump_stack_lvl+0x73/0xb0 [ 12.173498] print_report+0xd1/0x650 [ 12.173522] ? __virt_addr_valid+0x1db/0x2d0 [ 12.173545] ? rcu_uaf_reclaim+0x50/0x60 [ 12.173565] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.173586] ? rcu_uaf_reclaim+0x50/0x60 [ 12.173605] kasan_report+0x141/0x180 [ 12.173626] ? rcu_uaf_reclaim+0x50/0x60 [ 12.173907] __asan_report_load4_noabort+0x18/0x20 [ 12.173941] rcu_uaf_reclaim+0x50/0x60 [ 12.173961] rcu_core+0x66f/0x1c40 [ 12.173991] ? __pfx_rcu_core+0x10/0x10 [ 12.174011] ? ktime_get+0x6b/0x150 [ 12.174049] ? handle_softirqs+0x18e/0x730 [ 12.174073] rcu_core_si+0x12/0x20 [ 12.174091] handle_softirqs+0x209/0x730 [ 12.174109] ? hrtimer_interrupt+0x2fe/0x780 [ 12.174130] ? __pfx_handle_softirqs+0x10/0x10 [ 12.174154] __irq_exit_rcu+0xc9/0x110 [ 12.174172] irq_exit_rcu+0x12/0x20 [ 12.174191] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.174214] </IRQ> [ 12.174245] <TASK> [ 12.174256] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.174347] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 12.174560] 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 03 8a 21 00 fb f4 <e9> 7c 1d 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 12.174683] RSP: 0000:ffff888100877dc8 EFLAGS: 00010206 [ 12.174786] RAX: ffff8881d3574000 RBX: ffff888100853000 RCX: ffffffff856730e5 [ 12.174830] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000000faa4 [ 12.174879] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 12.174920] R10: ffff88815b130c53 R11: 0000000000023c00 R12: 0000000000000001 [ 12.174978] R13: ffffed102010a600 R14: ffffffff873b0690 R15: 0000000000000000 [ 12.175049] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 12.175103] ? default_idle+0xd/0x20 [ 12.175124] arch_cpu_idle+0xd/0x20 [ 12.175144] default_idle_call+0x48/0x80 [ 12.175165] do_idle+0x379/0x4f0 [ 12.175188] ? complete+0x15b/0x1d0 [ 12.175205] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.175229] ? __pfx_do_idle+0x10/0x10 [ 12.175248] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 12.175270] ? complete+0x15b/0x1d0 [ 12.175290] cpu_startup_entry+0x5c/0x70 [ 12.175312] start_secondary+0x211/0x290 [ 12.175333] ? __pfx_start_secondary+0x10/0x10 [ 12.175357] common_startup_64+0x13e/0x148 [ 12.175387] </TASK> [ 12.175398] [ 12.188457] Allocated by task 215: [ 12.188794] kasan_save_stack+0x45/0x70 [ 12.189005] kasan_save_track+0x18/0x40 [ 12.189198] kasan_save_alloc_info+0x3b/0x50 [ 12.189397] __kasan_kmalloc+0xb7/0xc0 [ 12.189571] __kmalloc_cache_noprof+0x189/0x420 [ 12.189844] rcu_uaf+0xb0/0x330 [ 12.190004] kunit_try_run_case+0x1a5/0x480 [ 12.190211] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.190446] kthread+0x337/0x6f0 [ 12.190604] ret_from_fork+0x116/0x1d0 [ 12.190837] ret_from_fork_asm+0x1a/0x30 [ 12.191031] [ 12.191120] Freed by task 0: [ 12.191256] kasan_save_stack+0x45/0x70 [ 12.191435] kasan_save_track+0x18/0x40 [ 12.191607] kasan_save_free_info+0x3f/0x60 [ 12.191836] __kasan_slab_free+0x56/0x70 [ 12.192019] kfree+0x222/0x3f0 [ 12.192187] rcu_uaf_reclaim+0x1f/0x60 [ 12.192360] rcu_core+0x66f/0x1c40 [ 12.192522] rcu_core_si+0x12/0x20 [ 12.192736] handle_softirqs+0x209/0x730 [ 12.192920] __irq_exit_rcu+0xc9/0x110 [ 12.193103] irq_exit_rcu+0x12/0x20 [ 12.193268] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.193480] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.193881] [ 12.193988] Last potentially related work creation: [ 12.194242] kasan_save_stack+0x45/0x70 [ 12.194441] kasan_record_aux_stack+0xb2/0xc0 [ 12.194632] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 12.194903] call_rcu+0x12/0x20 [ 12.195018] rcu_uaf+0x168/0x330 [ 12.195146] kunit_try_run_case+0x1a5/0x480 [ 12.195289] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.195459] kthread+0x337/0x6f0 [ 12.195578] ret_from_fork+0x116/0x1d0 [ 12.195708] ret_from_fork_asm+0x1a/0x30 [ 12.195851] [ 12.195929] The buggy address belongs to the object at ffff8881027cfb80 [ 12.195929] which belongs to the cache kmalloc-32 of size 32 [ 12.196543] The buggy address is located 0 bytes inside of [ 12.196543] freed 32-byte region [ffff8881027cfb80, ffff8881027cfba0) [ 12.197323] [ 12.197433] The buggy address belongs to the physical page: [ 12.197687] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027cf [ 12.198985] flags: 0x200000000000000(node=0|zone=2) [ 12.199175] page_type: f5(slab) [ 12.199301] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.199533] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.200284] page dumped because: kasan: bad access detected [ 12.200549] [ 12.200655] Memory state around the buggy address: [ 12.200884] ffff8881027cfa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.201214] ffff8881027cfb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 12.201526] >ffff8881027cfb80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 12.202656] ^ [ 12.202907] ffff8881027cfc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.203189] ffff8881027cfc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.203408] ==================================================================