Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.090391] ================================================================== [ 20.090535] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 20.090613] Read of size 4 at addr fff00000c6674100 by task swapper/0/0 [ 20.090661] [ 20.090704] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.090790] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.090818] Hardware name: linux,dummy-virt (DT) [ 20.090855] Call trace: [ 20.090880] show_stack+0x20/0x38 (C) [ 20.090931] dump_stack_lvl+0x8c/0xd0 [ 20.090981] print_report+0x118/0x608 [ 20.091065] kasan_report+0xdc/0x128 [ 20.091172] __asan_report_load4_noabort+0x20/0x30 [ 20.091306] rcu_uaf_reclaim+0x64/0x70 [ 20.091389] rcu_core+0x9f4/0x1e20 [ 20.091472] rcu_core_si+0x18/0x30 [ 20.091556] handle_softirqs+0x374/0xb28 [ 20.091652] __do_softirq+0x1c/0x28 [ 20.091777] ____do_softirq+0x18/0x30 [ 20.091920] call_on_irq_stack+0x24/0x30 [ 20.092077] do_softirq_own_stack+0x24/0x38 [ 20.092226] __irq_exit_rcu+0x1fc/0x318 [ 20.092367] irq_exit_rcu+0x1c/0x80 [ 20.092504] el1_interrupt+0x38/0x58 [ 20.092623] el1h_64_irq_handler+0x18/0x28 [ 20.092732] el1h_64_irq+0x6c/0x70 [ 20.092914] arch_local_irq_enable+0x4/0x8 (P) [ 20.093230] do_idle+0x384/0x4e8 [ 20.093341] cpu_startup_entry+0x68/0x80 [ 20.093434] rest_init+0x160/0x188 [ 20.093514] start_kernel+0x30c/0x3d0 [ 20.093628] __primary_switched+0x8c/0xa0 [ 20.093724] [ 20.093762] Allocated by task 198: [ 20.093815] kasan_save_stack+0x3c/0x68 [ 20.094376] kasan_save_track+0x20/0x40 [ 20.094472] kasan_save_alloc_info+0x40/0x58 [ 20.094561] __kasan_kmalloc+0xd4/0xd8 [ 20.094649] __kmalloc_cache_noprof+0x16c/0x3c0 [ 20.094749] rcu_uaf+0xb0/0x2d8 [ 20.094829] kunit_try_run_case+0x170/0x3f0 [ 20.094918] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.095071] kthread+0x328/0x630 [ 20.095152] ret_from_fork+0x10/0x20 [ 20.095233] [ 20.095279] Freed by task 0: [ 20.095331] kasan_save_stack+0x3c/0x68 [ 20.095402] kasan_save_track+0x20/0x40 [ 20.095467] kasan_save_free_info+0x4c/0x78 [ 20.095542] __kasan_slab_free+0x6c/0x98 [ 20.095608] kfree+0x214/0x3c8 [ 20.095675] rcu_uaf_reclaim+0x28/0x70 [ 20.095745] rcu_core+0x9f4/0x1e20 [ 20.095817] rcu_core_si+0x18/0x30 [ 20.095896] handle_softirqs+0x374/0xb28 [ 20.095979] __do_softirq+0x1c/0x28 [ 20.096073] [ 20.096143] Last potentially related work creation: [ 20.096214] kasan_save_stack+0x3c/0x68 [ 20.096295] kasan_record_aux_stack+0xb4/0xc8 [ 20.096393] __call_rcu_common.constprop.0+0x74/0x8c8 [ 20.096474] call_rcu+0x18/0x30 [ 20.096564] rcu_uaf+0x14c/0x2d8 [ 20.096661] kunit_try_run_case+0x170/0x3f0 [ 20.096751] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.096835] kthread+0x328/0x630 [ 20.096912] ret_from_fork+0x10/0x20 [ 20.097012] [ 20.097093] The buggy address belongs to the object at fff00000c6674100 [ 20.097093] which belongs to the cache kmalloc-32 of size 32 [ 20.097265] The buggy address is located 0 bytes inside of [ 20.097265] freed 32-byte region [fff00000c6674100, fff00000c6674120) [ 20.097440] [ 20.097509] The buggy address belongs to the physical page: [ 20.097600] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106674 [ 20.097728] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.097833] page_type: f5(slab) [ 20.098131] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.098254] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 20.098419] page dumped because: kasan: bad access detected [ 20.098545] [ 20.098639] Memory state around the buggy address: [ 20.098799] fff00000c6674000: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 20.098948] fff00000c6674080: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 20.099070] >fff00000c6674100: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 20.099152] ^ [ 20.099214] fff00000c6674180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.099312] fff00000c6674200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.099397] ==================================================================
[ 12.104453] ================================================================== [ 12.104904] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 12.105208] Read of size 4 at addr ffff8881027b4f00 by task swapper/1/0 [ 12.105491] [ 12.105685] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.105731] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.105742] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.105762] Call Trace: [ 12.105786] <IRQ> [ 12.105802] dump_stack_lvl+0x73/0xb0 [ 12.105831] print_report+0xd1/0x650 [ 12.105853] ? __virt_addr_valid+0x1db/0x2d0 [ 12.105876] ? rcu_uaf_reclaim+0x50/0x60 [ 12.105896] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.105916] ? rcu_uaf_reclaim+0x50/0x60 [ 12.105935] kasan_report+0x141/0x180 [ 12.105956] ? rcu_uaf_reclaim+0x50/0x60 [ 12.105979] __asan_report_load4_noabort+0x18/0x20 [ 12.106002] rcu_uaf_reclaim+0x50/0x60 [ 12.106021] rcu_core+0x66f/0x1c40 [ 12.106049] ? __pfx_rcu_core+0x10/0x10 [ 12.106069] ? ktime_get+0x6b/0x150 [ 12.106094] rcu_core_si+0x12/0x20 [ 12.106113] handle_softirqs+0x209/0x730 [ 12.106167] ? hrtimer_interrupt+0x2fe/0x780 [ 12.106189] ? __pfx_handle_softirqs+0x10/0x10 [ 12.106213] __irq_exit_rcu+0xc9/0x110 [ 12.106232] irq_exit_rcu+0x12/0x20 [ 12.106250] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.106274] </IRQ> [ 12.106298] <TASK> [ 12.106309] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.106394] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 12.106608] 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.106686] RSP: 0000:ffff888100877dc8 EFLAGS: 00010202 [ 12.106772] RAX: ffff8881ba774000 RBX: ffff888100853000 RCX: ffffffff9e4730e5 [ 12.106816] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 0000000000010bb4 [ 12.106858] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 12.106906] R10: ffff88815b130c53 R11: 000000000000cc00 R12: 0000000000000001 [ 12.106947] R13: ffffed102010a600 R14: ffffffffa01b0690 R15: 0000000000000000 [ 12.107005] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 12.107056] ? default_idle+0xd/0x20 [ 12.107077] arch_cpu_idle+0xd/0x20 [ 12.107097] default_idle_call+0x48/0x80 [ 12.107119] do_idle+0x379/0x4f0 [ 12.107156] ? complete+0x15b/0x1d0 [ 12.107173] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.107197] ? __pfx_do_idle+0x10/0x10 [ 12.107217] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 12.107238] ? complete+0x15b/0x1d0 [ 12.107259] cpu_startup_entry+0x5c/0x70 [ 12.107281] start_secondary+0x211/0x290 [ 12.107302] ? __pfx_start_secondary+0x10/0x10 [ 12.107326] common_startup_64+0x13e/0x148 [ 12.107357] </TASK> [ 12.107368] [ 12.120639] Allocated by task 215: [ 12.120970] kasan_save_stack+0x45/0x70 [ 12.121476] kasan_save_track+0x18/0x40 [ 12.121746] kasan_save_alloc_info+0x3b/0x50 [ 12.122094] __kasan_kmalloc+0xb7/0xc0 [ 12.122288] __kmalloc_cache_noprof+0x189/0x420 [ 12.122821] rcu_uaf+0xb0/0x330 [ 12.122991] kunit_try_run_case+0x1a5/0x480 [ 12.123531] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.123803] kthread+0x337/0x6f0 [ 12.123965] ret_from_fork+0x116/0x1d0 [ 12.124428] ret_from_fork_asm+0x1a/0x30 [ 12.124704] [ 12.124796] Freed by task 0: [ 12.124935] kasan_save_stack+0x45/0x70 [ 12.125111] kasan_save_track+0x18/0x40 [ 12.125581] kasan_save_free_info+0x3f/0x60 [ 12.125771] __kasan_slab_free+0x56/0x70 [ 12.125946] kfree+0x222/0x3f0 [ 12.126093] rcu_uaf_reclaim+0x1f/0x60 [ 12.126557] rcu_core+0x66f/0x1c40 [ 12.126964] rcu_core_si+0x12/0x20 [ 12.127290] handle_softirqs+0x209/0x730 [ 12.127641] __irq_exit_rcu+0xc9/0x110 [ 12.127823] irq_exit_rcu+0x12/0x20 [ 12.127989] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.128635] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.129087] [ 12.129262] Last potentially related work creation: [ 12.129544] kasan_save_stack+0x45/0x70 [ 12.129733] kasan_record_aux_stack+0xb2/0xc0 [ 12.129932] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 12.130501] call_rcu+0x12/0x20 [ 12.130820] rcu_uaf+0x168/0x330 [ 12.131004] kunit_try_run_case+0x1a5/0x480 [ 12.131584] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.131923] kthread+0x337/0x6f0 [ 12.132297] ret_from_fork+0x116/0x1d0 [ 12.132696] ret_from_fork_asm+0x1a/0x30 [ 12.132899] [ 12.133003] The buggy address belongs to the object at ffff8881027b4f00 [ 12.133003] which belongs to the cache kmalloc-32 of size 32 [ 12.134238] The buggy address is located 0 bytes inside of [ 12.134238] freed 32-byte region [ffff8881027b4f00, ffff8881027b4f20) [ 12.134996] [ 12.135096] The buggy address belongs to the physical page: [ 12.135843] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027b4 [ 12.136494] flags: 0x200000000000000(node=0|zone=2) [ 12.136720] page_type: f5(slab) [ 12.136881] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.137472] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.137782] page dumped because: kasan: bad access detected [ 12.138012] [ 12.138100] Memory state around the buggy address: [ 12.138718] ffff8881027b4e00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.139016] ffff8881027b4e80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 12.139592] >ffff8881027b4f00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 12.139884] ^ [ 12.140035] ffff8881027b4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.140981] ffff8881027b5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.141655] ==================================================================