Date
July 8, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.446519] ================================================================== [ 31.446657] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 31.446730] Read of size 4 at addr fff00000c9aa7740 by task swapper/0/0 [ 31.446778] [ 31.449411] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT [ 31.451338] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.451365] Hardware name: linux,dummy-virt (DT) [ 31.451401] Call trace: [ 31.451429] show_stack+0x20/0x38 (C) [ 31.451487] dump_stack_lvl+0x8c/0xd0 [ 31.451536] print_report+0x118/0x5d0 [ 31.451584] kasan_report+0xdc/0x128 [ 31.451631] __asan_report_load4_noabort+0x20/0x30 [ 31.451678] rcu_uaf_reclaim+0x64/0x70 [ 31.451723] rcu_core+0x9f4/0x1e20 [ 31.451769] rcu_core_si+0x18/0x30 [ 31.451814] handle_softirqs+0x374/0xb28 [ 31.451861] __do_softirq+0x1c/0x28 [ 31.451903] ____do_softirq+0x18/0x30 [ 31.451948] call_on_irq_stack+0x24/0x30 [ 31.451992] do_softirq_own_stack+0x24/0x38 [ 31.452038] __irq_exit_rcu+0x1fc/0x318 [ 31.452085] irq_exit_rcu+0x1c/0x80 [ 31.452129] el1_interrupt+0x38/0x58 [ 31.452177] el1h_64_irq_handler+0x18/0x28 [ 31.452235] el1h_64_irq+0x6c/0x70 [ 31.452353] arch_local_irq_enable+0x4/0x8 (P) [ 31.452447] do_idle+0x384/0x4e8 [ 31.452514] cpu_startup_entry+0x64/0x80 [ 31.452571] rest_init+0x160/0x188 [ 31.452634] start_kernel+0x30c/0x3d0 [ 31.452885] __primary_switched+0x8c/0xa0 [ 31.453147] [ 31.453197] Allocated by task 229: [ 31.453275] kasan_save_stack+0x3c/0x68 [ 31.453334] kasan_save_track+0x20/0x40 [ 31.453374] kasan_save_alloc_info+0x40/0x58 [ 31.453422] __kasan_kmalloc+0xd4/0xd8 [ 31.453466] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.453510] rcu_uaf+0xb0/0x2d8 [ 31.453544] kunit_try_run_case+0x170/0x3f0 [ 31.453970] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.454032] kthread+0x328/0x630 [ 31.454192] ret_from_fork+0x10/0x20 [ 31.454305] [ 31.454348] Freed by task 0: [ 31.454390] kasan_save_stack+0x3c/0x68 [ 31.454461] kasan_save_track+0x20/0x40 [ 31.454531] kasan_save_free_info+0x4c/0x78 [ 31.454604] __kasan_slab_free+0x6c/0x98 [ 31.454684] kfree+0x214/0x3c8 [ 31.454753] rcu_uaf_reclaim+0x28/0x70 [ 31.454803] rcu_core+0x9f4/0x1e20 [ 31.454885] rcu_core_si+0x18/0x30 [ 31.454977] handle_softirqs+0x374/0xb28 [ 31.455043] __do_softirq+0x1c/0x28 [ 31.455079] [ 31.455242] Last potentially related work creation: [ 31.455448] kasan_save_stack+0x3c/0x68 [ 31.455500] kasan_record_aux_stack+0xb4/0xc8 [ 31.455539] __call_rcu_common.constprop.0+0x74/0x8c8 [ 31.455582] call_rcu+0x18/0x30 [ 31.455615] rcu_uaf+0x14c/0x2d8 [ 31.455769] kunit_try_run_case+0x170/0x3f0 [ 31.455852] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.455910] kthread+0x328/0x630 [ 31.455962] ret_from_fork+0x10/0x20 [ 31.456064] [ 31.456149] The buggy address belongs to the object at fff00000c9aa7740 [ 31.456149] which belongs to the cache kmalloc-32 of size 32 [ 31.456284] The buggy address is located 0 bytes inside of [ 31.456284] freed 32-byte region [fff00000c9aa7740, fff00000c9aa7760) [ 31.456362] [ 31.456416] The buggy address belongs to the physical page: [ 31.456473] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109aa7 [ 31.456556] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.456616] page_type: f5(slab) [ 31.456659] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.456714] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.456791] page dumped because: kasan: bad access detected [ 31.456845] [ 31.456876] Memory state around the buggy address: [ 31.456962] fff00000c9aa7600: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 31.457027] fff00000c9aa7680: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.457070] >fff00000c9aa7700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.457109] ^ [ 31.457143] fff00000c9aa7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.457238] fff00000c9aa7800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.457424] ==================================================================
[ 23.915908] ================================================================== [ 23.916375] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 23.916613] Read of size 4 at addr ffff8881059bae40 by task swapper/0/0 [ 23.917482] [ 23.918030] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc5-next-20250708 #1 PREEMPT(voluntary) [ 23.918201] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.918219] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.918256] Call Trace: [ 23.918291] <IRQ> [ 23.918315] dump_stack_lvl+0x73/0xb0 [ 23.918354] print_report+0xd1/0x610 [ 23.918379] ? __virt_addr_valid+0x1db/0x2d0 [ 23.918406] ? rcu_uaf_reclaim+0x50/0x60 [ 23.918426] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.918455] ? rcu_uaf_reclaim+0x50/0x60 [ 23.918475] kasan_report+0x141/0x180 [ 23.918498] ? rcu_uaf_reclaim+0x50/0x60 [ 23.918523] __asan_report_load4_noabort+0x18/0x20 [ 23.918549] rcu_uaf_reclaim+0x50/0x60 [ 23.918570] rcu_core+0x66f/0x1c40 [ 23.918602] ? __pfx_rcu_core+0x10/0x10 [ 23.918626] ? ktime_get+0x6b/0x150 [ 23.918651] ? handle_softirqs+0x18e/0x730 [ 23.918679] rcu_core_si+0x12/0x20 [ 23.918702] handle_softirqs+0x209/0x730 [ 23.918724] ? hrtimer_interrupt+0x2fe/0x780 [ 23.918747] ? __pfx_handle_softirqs+0x10/0x10 [ 23.918799] __irq_exit_rcu+0xc9/0x110 [ 23.918837] irq_exit_rcu+0x12/0x20 [ 23.918859] sysvec_apic_timer_interrupt+0x81/0x90 [ 23.918884] </IRQ> [ 23.918914] <TASK> [ 23.918926] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 23.919020] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 23.919249] 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 c3 e7 18 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 [ 23.919337] RSP: 0000:ffffffffa0207dd8 EFLAGS: 00010202 [ 23.919428] RAX: ffff8881b3222000 RBX: ffffffffa021cac0 RCX: ffffffff9f0fca05 [ 23.919473] RDX: ffffed102a906193 RSI: 0000000000000004 RDI: 00000000000f08e4 [ 23.919521] RBP: ffffffffa0207de0 R08: 0000000000000001 R09: ffffed102a906192 [ 23.919563] R10: ffff888154830c93 R11: 00000000000b7000 R12: 0000000000000000 [ 23.919607] R13: fffffbfff4043958 R14: ffffffffa0df07d0 R15: 0000000000000000 [ 23.919667] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 23.919721] ? default_idle+0xd/0x20 [ 23.919772] arch_cpu_idle+0xd/0x20 [ 23.919798] default_idle_call+0x48/0x80 [ 23.919836] do_idle+0x379/0x4f0 [ 23.919867] ? __pfx_do_idle+0x10/0x10 [ 23.919898] cpu_startup_entry+0x5c/0x70 [ 23.919926] rest_init+0x11a/0x140 [ 23.919949] ? acpi_subsystem_init+0x5d/0x150 [ 23.919980] start_kernel+0x352/0x400 [ 23.920006] x86_64_start_reservations+0x1c/0x30 [ 23.920031] x86_64_start_kernel+0x10d/0x120 [ 23.920056] common_startup_64+0x13e/0x148 [ 23.920092] </TASK> [ 23.920104] [ 23.938417] Allocated by task 246: [ 23.938780] kasan_save_stack+0x45/0x70 [ 23.939278] kasan_save_track+0x18/0x40 [ 23.939596] kasan_save_alloc_info+0x3b/0x50 [ 23.939889] __kasan_kmalloc+0xb7/0xc0 [ 23.940295] __kmalloc_cache_noprof+0x189/0x420 [ 23.940730] rcu_uaf+0xb0/0x330 [ 23.941079] kunit_try_run_case+0x1a5/0x480 [ 23.941235] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.941420] kthread+0x337/0x6f0 [ 23.941538] ret_from_fork+0x116/0x1d0 [ 23.941667] ret_from_fork_asm+0x1a/0x30 [ 23.942120] [ 23.942295] Freed by task 0: [ 23.942588] kasan_save_stack+0x45/0x70 [ 23.943076] kasan_save_track+0x18/0x40 [ 23.943461] kasan_save_free_info+0x3f/0x60 [ 23.943972] __kasan_slab_free+0x56/0x70 [ 23.944358] kfree+0x222/0x3f0 [ 23.944680] rcu_uaf_reclaim+0x1f/0x60 [ 23.945085] rcu_core+0x66f/0x1c40 [ 23.945542] rcu_core_si+0x12/0x20 [ 23.945976] handle_softirqs+0x209/0x730 [ 23.946281] __irq_exit_rcu+0xc9/0x110 [ 23.946409] irq_exit_rcu+0x12/0x20 [ 23.946528] sysvec_apic_timer_interrupt+0x81/0x90 [ 23.946677] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 23.947327] [ 23.947562] Last potentially related work creation: [ 23.948290] kasan_save_stack+0x45/0x70 [ 23.948784] kasan_record_aux_stack+0xb2/0xc0 [ 23.949291] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 23.949778] call_rcu+0x12/0x20 [ 23.950128] rcu_uaf+0x168/0x330 [ 23.950525] kunit_try_run_case+0x1a5/0x480 [ 23.950922] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.951571] kthread+0x337/0x6f0 [ 23.952140] ret_from_fork+0x116/0x1d0 [ 23.952523] ret_from_fork_asm+0x1a/0x30 [ 23.952915] [ 23.953025] The buggy address belongs to the object at ffff8881059bae40 [ 23.953025] which belongs to the cache kmalloc-32 of size 32 [ 23.954035] The buggy address is located 0 bytes inside of [ 23.954035] freed 32-byte region [ffff8881059bae40, ffff8881059bae60) [ 23.955114] [ 23.955322] The buggy address belongs to the physical page: [ 23.955549] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059ba [ 23.956327] flags: 0x200000000000000(node=0|zone=2) [ 23.956998] page_type: f5(slab) [ 23.957132] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 23.957381] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.957603] page dumped because: kasan: bad access detected [ 23.957857] [ 23.958009] Memory state around the buggy address: [ 23.958541] ffff8881059bad00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.959331] ffff8881059bad80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 23.960174] >ffff8881059bae00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 23.960845] ^ [ 23.961394] ffff8881059bae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.962091] ffff8881059baf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.962411] ==================================================================