Date
June 17, 2025, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.388241] ================================================================== [ 17.388400] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 17.388481] Read of size 4 at addr fff00000c4f8cb40 by task swapper/1/0 [ 17.388530] [ 17.389347] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT [ 17.390756] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.391010] Hardware name: linux,dummy-virt (DT) [ 17.391363] Call trace: [ 17.391449] show_stack+0x20/0x38 (C) [ 17.392177] dump_stack_lvl+0x8c/0xd0 [ 17.392774] print_report+0x118/0x608 [ 17.392843] kasan_report+0xdc/0x128 [ 17.393517] __asan_report_load4_noabort+0x20/0x30 [ 17.394177] rcu_uaf_reclaim+0x64/0x70 [ 17.394258] rcu_core+0x9f4/0x1e20 [ 17.394688] rcu_core_si+0x18/0x30 [ 17.394749] handle_softirqs+0x374/0xb28 [ 17.394800] __do_softirq+0x1c/0x28 [ 17.394845] ____do_softirq+0x18/0x30 [ 17.394889] call_on_irq_stack+0x24/0x30 [ 17.394949] do_softirq_own_stack+0x24/0x38 [ 17.396441] __irq_exit_rcu+0x1fc/0x318 [ 17.397674] irq_exit_rcu+0x1c/0x80 [ 17.397803] el1_interrupt+0x38/0x58 [ 17.397857] el1h_64_irq_handler+0x18/0x28 [ 17.398320] el1h_64_irq+0x6c/0x70 [ 17.399447] arch_local_irq_enable+0x4/0x8 (P) [ 17.399516] do_idle+0x384/0x4e8 [ 17.400686] cpu_startup_entry+0x64/0x80 [ 17.401299] secondary_start_kernel+0x288/0x340 [ 17.401709] __secondary_switched+0xc0/0xc8 [ 17.401941] [ 17.402195] Allocated by task 207: [ 17.402436] kasan_save_stack+0x3c/0x68 [ 17.402839] kasan_save_track+0x20/0x40 [ 17.403147] kasan_save_alloc_info+0x40/0x58 [ 17.403562] __kasan_kmalloc+0xd4/0xd8 [ 17.403612] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.403657] rcu_uaf+0xb0/0x2d8 [ 17.404415] kunit_try_run_case+0x170/0x3f0 [ 17.404994] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.405059] kthread+0x328/0x630 [ 17.405597] ret_from_fork+0x10/0x20 [ 17.406099] [ 17.406570] Freed by task 0: [ 17.406646] kasan_save_stack+0x3c/0x68 [ 17.406731] kasan_save_track+0x20/0x40 [ 17.406769] kasan_save_free_info+0x4c/0x78 [ 17.406807] __kasan_slab_free+0x6c/0x98 [ 17.406845] kfree+0x214/0x3c8 [ 17.407676] rcu_uaf_reclaim+0x28/0x70 [ 17.408584] rcu_core+0x9f4/0x1e20 [ 17.408655] rcu_core_si+0x18/0x30 [ 17.408691] handle_softirqs+0x374/0xb28 [ 17.408730] __do_softirq+0x1c/0x28 [ 17.408767] [ 17.408808] Last potentially related work creation: [ 17.410384] kasan_save_stack+0x3c/0x68 [ 17.410629] kasan_record_aux_stack+0xb4/0xc8 [ 17.410689] __call_rcu_common.constprop.0+0x74/0x8c8 [ 17.410735] call_rcu+0x18/0x30 [ 17.410769] rcu_uaf+0x14c/0x2d8 [ 17.410805] kunit_try_run_case+0x170/0x3f0 [ 17.411290] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.411995] kthread+0x328/0x630 [ 17.412534] ret_from_fork+0x10/0x20 [ 17.412788] [ 17.413219] The buggy address belongs to the object at fff00000c4f8cb40 [ 17.413219] which belongs to the cache kmalloc-32 of size 32 [ 17.413674] The buggy address is located 0 bytes inside of [ 17.413674] freed 32-byte region [fff00000c4f8cb40, fff00000c4f8cb60) [ 17.413744] [ 17.413768] The buggy address belongs to the physical page: [ 17.413802] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104f8c [ 17.414945] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.415613] page_type: f5(slab) [ 17.415815] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 17.416472] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 17.416727] page dumped because: kasan: bad access detected [ 17.417709] [ 17.417903] Memory state around the buggy address: [ 17.417976] fff00000c4f8ca00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 17.418157] fff00000c4f8ca80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 17.418377] >fff00000c4f8cb00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 17.418494] ^ [ 17.418674] fff00000c4f8cb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.418725] fff00000c4f8cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.418767] ==================================================================
[ 18.885474] ================================================================== [ 18.886426] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 18.887031] Read of size 4 at addr ffff888102a1a0c0 by task swapper/1/0 [ 18.887546] [ 18.887751] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) [ 18.888046] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.888086] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 18.888146] Call Trace: [ 18.888208] <IRQ> [ 18.888402] dump_stack_lvl+0x73/0xb0 [ 18.888495] print_report+0xd1/0x650 [ 18.888568] ? __virt_addr_valid+0x1db/0x2d0 [ 18.888644] ? rcu_uaf_reclaim+0x50/0x60 [ 18.888713] ? kasan_complete_mode_report_info+0x64/0x200 [ 18.888782] ? rcu_uaf_reclaim+0x50/0x60 [ 18.888867] kasan_report+0x141/0x180 [ 18.888946] ? rcu_uaf_reclaim+0x50/0x60 [ 18.889026] __asan_report_load4_noabort+0x18/0x20 [ 18.889102] rcu_uaf_reclaim+0x50/0x60 [ 18.889168] rcu_core+0x66f/0x1c40 [ 18.889317] ? __pfx_rcu_core+0x10/0x10 [ 18.889360] ? ktime_get+0x6b/0x150 [ 18.889401] rcu_core_si+0x12/0x20 [ 18.889431] handle_softirqs+0x209/0x730 [ 18.889462] ? hrtimer_interrupt+0x2fe/0x780 [ 18.889494] ? __pfx_handle_softirqs+0x10/0x10 [ 18.889528] __irq_exit_rcu+0xc9/0x110 [ 18.889556] irq_exit_rcu+0x12/0x20 [ 18.889582] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.889614] </IRQ> [ 18.889651] <TASK> [ 18.889668] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.889783] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 18.890061] 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 48 1f 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 [ 18.890170] RSP: 0000:ffff888100877dc8 EFLAGS: 00010212 [ 18.890393] RAX: ffff88819b969000 RBX: ffff888100853000 RCX: ffffffffbd297225 [ 18.890459] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 00000000000103fc [ 18.890519] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 18.890576] R10: ffff88815b130c53 R11: 0000000000072c00 R12: 0000000000000001 [ 18.890631] R13: ffffed102010a600 R14: ffffffffbefb7990 R15: 0000000000000000 [ 18.890707] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 18.890783] ? default_idle+0xd/0x20 [ 18.890818] arch_cpu_idle+0xd/0x20 [ 18.890868] default_idle_call+0x48/0x80 [ 18.890900] do_idle+0x379/0x4f0 [ 18.890936] ? __pfx_do_idle+0x10/0x10 [ 18.890966] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 18.891004] ? complete+0x15b/0x1d0 [ 18.891033] cpu_startup_entry+0x5c/0x70 [ 18.891066] start_secondary+0x211/0x290 [ 18.891095] ? __pfx_start_secondary+0x10/0x10 [ 18.891129] common_startup_64+0x13e/0x148 [ 18.891170] </TASK> [ 18.891185] [ 18.910180] Allocated by task 225: [ 18.910667] kasan_save_stack+0x45/0x70 [ 18.911085] kasan_save_track+0x18/0x40 [ 18.911610] kasan_save_alloc_info+0x3b/0x50 [ 18.912039] __kasan_kmalloc+0xb7/0xc0 [ 18.912532] __kmalloc_cache_noprof+0x189/0x420 [ 18.912947] rcu_uaf+0xb0/0x330 [ 18.913201] kunit_try_run_case+0x1a5/0x480 [ 18.913599] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.914106] kthread+0x337/0x6f0 [ 18.914444] ret_from_fork+0x116/0x1d0 [ 18.915149] ret_from_fork_asm+0x1a/0x30 [ 18.915605] [ 18.915765] Freed by task 0: [ 18.916075] kasan_save_stack+0x45/0x70 [ 18.916612] kasan_save_track+0x18/0x40 [ 18.917007] kasan_save_free_info+0x3f/0x60 [ 18.918579] __kasan_slab_free+0x56/0x70 [ 18.918952] kfree+0x222/0x3f0 [ 18.919264] rcu_uaf_reclaim+0x1f/0x60 [ 18.920749] rcu_core+0x66f/0x1c40 [ 18.921083] rcu_core_si+0x12/0x20 [ 18.921418] handle_softirqs+0x209/0x730 [ 18.921770] __irq_exit_rcu+0xc9/0x110 [ 18.922853] irq_exit_rcu+0x12/0x20 [ 18.923210] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.924435] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.924923] [ 18.925118] Last potentially related work creation: [ 18.925529] kasan_save_stack+0x45/0x70 [ 18.925921] kasan_record_aux_stack+0xb2/0xc0 [ 18.926346] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 18.926755] call_rcu+0x12/0x20 [ 18.928003] rcu_uaf+0x168/0x330 [ 18.928311] kunit_try_run_case+0x1a5/0x480 [ 18.928704] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.929794] kthread+0x337/0x6f0 [ 18.930328] ret_from_fork+0x116/0x1d0 [ 18.930687] ret_from_fork_asm+0x1a/0x30 [ 18.931237] [ 18.931863] The buggy address belongs to the object at ffff888102a1a0c0 [ 18.931863] which belongs to the cache kmalloc-32 of size 32 [ 18.933113] The buggy address is located 0 bytes inside of [ 18.933113] freed 32-byte region [ffff888102a1a0c0, ffff888102a1a0e0) [ 18.934940] [ 18.935247] The buggy address belongs to the physical page: [ 18.935594] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a1a [ 18.936566] flags: 0x200000000000000(node=0|zone=2) [ 18.936872] page_type: f5(slab) [ 18.937514] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 18.938200] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.938913] page dumped because: kasan: bad access detected [ 18.939763] [ 18.939959] Memory state around the buggy address: [ 18.940554] ffff888102a19f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.941778] ffff888102a1a000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.942326] >ffff888102a1a080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.943140] ^ [ 18.943792] ffff888102a1a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.944368] ffff888102a1a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.944885] ==================================================================