Date
May 13, 2025, 12:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.695105] ================================================================== [ 19.695277] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 19.695378] Read of size 4 at addr fff00000c7782f00 by task swapper/1/0 [ 19.695433] [ 19.695489] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.15.0-rc6-next-20250513 #1 PREEMPT [ 19.695592] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.695651] Hardware name: linux,dummy-virt (DT) [ 19.695731] Call trace: [ 19.695789] show_stack+0x20/0x38 (C) [ 19.695901] dump_stack_lvl+0x8c/0xd0 [ 19.695969] print_report+0x118/0x608 [ 19.696091] kasan_report+0xdc/0x128 [ 19.696215] __asan_report_load4_noabort+0x20/0x30 [ 19.696285] rcu_uaf_reclaim+0x64/0x70 [ 19.696338] rcu_core+0x9f4/0x1e20 [ 19.696394] rcu_core_si+0x18/0x30 [ 19.696443] handle_softirqs+0x374/0xb28 [ 19.696497] __do_softirq+0x1c/0x28 [ 19.696547] ____do_softirq+0x18/0x30 [ 19.696598] call_on_irq_stack+0x24/0x30 [ 19.696653] do_softirq_own_stack+0x24/0x38 [ 19.696705] __irq_exit_rcu+0x1fc/0x318 [ 19.696755] irq_exit_rcu+0x1c/0x80 [ 19.696805] el1_interrupt+0x38/0x58 [ 19.696859] el1h_64_irq_handler+0x18/0x28 [ 19.696912] el1h_64_irq+0x6c/0x70 [ 19.697026] arch_local_irq_enable+0x4/0x8 (P) [ 19.697092] do_idle+0x384/0x4e8 [ 19.697186] cpu_startup_entry+0x68/0x80 [ 19.697240] secondary_start_kernel+0x288/0x340 [ 19.697296] __secondary_switched+0xc0/0xc8 [ 19.697363] [ 19.697398] Allocated by task 198: [ 19.697445] kasan_save_stack+0x3c/0x68 [ 19.697508] kasan_save_track+0x20/0x40 [ 19.697561] kasan_save_alloc_info+0x40/0x58 [ 19.697608] __kasan_kmalloc+0xd4/0xd8 [ 19.697650] __kmalloc_cache_noprof+0x15c/0x3c0 [ 19.697697] rcu_uaf+0xb0/0x2d8 [ 19.697734] kunit_try_run_case+0x170/0x3f0 [ 19.697780] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.697848] kthread+0x328/0x630 [ 19.697894] ret_from_fork+0x10/0x20 [ 19.697935] [ 19.698026] Freed by task 0: [ 19.698064] kasan_save_stack+0x3c/0x68 [ 19.698112] kasan_save_track+0x20/0x40 [ 19.698156] kasan_save_free_info+0x4c/0x78 [ 19.698199] __kasan_slab_free+0x6c/0x98 [ 19.698244] kfree+0x214/0x3c8 [ 19.698281] rcu_uaf_reclaim+0x28/0x70 [ 19.698326] rcu_core+0x9f4/0x1e20 [ 19.698364] rcu_core_si+0x18/0x30 [ 19.698414] handle_softirqs+0x374/0xb28 [ 19.698463] __do_softirq+0x1c/0x28 [ 19.698504] [ 19.698573] Last potentially related work creation: [ 19.698615] kasan_save_stack+0x3c/0x68 [ 19.698665] kasan_record_aux_stack+0xb4/0xc8 [ 19.698711] __call_rcu_common.constprop.0+0x70/0x8b0 [ 19.698814] call_rcu+0x18/0x30 [ 19.698859] rcu_uaf+0x14c/0x2d8 [ 19.698899] kunit_try_run_case+0x170/0x3f0 [ 19.698940] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.699002] kthread+0x328/0x630 [ 19.699066] ret_from_fork+0x10/0x20 [ 19.699118] [ 19.699150] The buggy address belongs to the object at fff00000c7782f00 [ 19.699150] which belongs to the cache kmalloc-32 of size 32 [ 19.699219] The buggy address is located 0 bytes inside of [ 19.699219] freed 32-byte region [fff00000c7782f00, fff00000c7782f20) [ 19.699288] [ 19.699314] The buggy address belongs to the physical page: [ 19.699353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107782 [ 19.699418] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.699481] page_type: f5(slab) [ 19.699531] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.699591] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.699638] page dumped because: kasan: bad access detected [ 19.699673] [ 19.699696] Memory state around the buggy address: [ 19.699735] fff00000c7782e00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 19.699787] fff00000c7782e80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 19.699836] >fff00000c7782f00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 19.699879] ^ [ 19.699911] fff00000c7782f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.699959] fff00000c7783000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.700018] ==================================================================
[ 11.667667] ================================================================== [ 11.668157] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 11.668586] Read of size 4 at addr ffff8881026bb1c0 by task swapper/1/0 [ 11.668899] [ 11.669022] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.15.0-rc6-next-20250513 #1 PREEMPT(voluntary) [ 11.669068] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.669091] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.669111] Call Trace: [ 11.669138] <IRQ> [ 11.669156] dump_stack_lvl+0x73/0xb0 [ 11.669187] print_report+0xd1/0x650 [ 11.669211] ? __virt_addr_valid+0x1db/0x2d0 [ 11.669236] ? rcu_uaf_reclaim+0x50/0x60 [ 11.669258] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.669292] ? rcu_uaf_reclaim+0x50/0x60 [ 11.669314] kasan_report+0x141/0x180 [ 11.669348] ? rcu_uaf_reclaim+0x50/0x60 [ 11.669375] __asan_report_load4_noabort+0x18/0x20 [ 11.669397] rcu_uaf_reclaim+0x50/0x60 [ 11.669419] rcu_core+0x66f/0x1c40 [ 11.669449] ? __pfx_rcu_core+0x10/0x10 [ 11.669472] ? ktime_get+0x6b/0x150 [ 11.669495] ? handle_softirqs+0x18e/0x730 [ 11.669536] rcu_core_si+0x12/0x20 [ 11.669557] handle_softirqs+0x209/0x730 [ 11.669578] ? hrtimer_interrupt+0x2fe/0x780 [ 11.669620] ? __pfx_handle_softirqs+0x10/0x10 [ 11.669647] __irq_exit_rcu+0xc9/0x110 [ 11.669669] irq_exit_rcu+0x12/0x20 [ 11.669690] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.669765] </IRQ> [ 11.669806] <TASK> [ 11.669818] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.670014] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 11.670236] 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 a3 76 23 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 [ 11.670315] RSP: 0000:ffff888100877dc8 EFLAGS: 00010216 [ 11.670407] RAX: ffff8881c0577000 RBX: ffff88810085a000 RCX: ffffffff91e543e5 [ 11.670453] RDX: ffffed102a92618b RSI: 0000000000000004 RDI: 000000000001b21c [ 11.670502] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102a92618a [ 11.670561] R10: ffff888154930c53 R11: 0000000000000000 R12: 0000000000000001 [ 11.670604] R13: ffffed102010b400 R14: ffffffff93bb0a90 R15: 0000000000000000 [ 11.670674] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 11.670732] ? default_idle+0xd/0x20 [ 11.670755] arch_cpu_idle+0xd/0x20 [ 11.670777] default_idle_call+0x48/0x80 [ 11.670800] do_idle+0x379/0x4f0 [ 11.670819] ? complete+0x15b/0x1d0 [ 11.670839] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.670865] ? __pfx_do_idle+0x10/0x10 [ 11.670884] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 11.670907] ? complete+0x15b/0x1d0 [ 11.670930] cpu_startup_entry+0x5c/0x70 [ 11.670951] start_secondary+0x211/0x290 [ 11.670974] ? __pfx_start_secondary+0x10/0x10 [ 11.671001] common_startup_64+0x13e/0x148 [ 11.671036] </TASK> [ 11.671048] [ 11.686657] Allocated by task 215: [ 11.687065] kasan_save_stack+0x45/0x70 [ 11.687248] kasan_save_track+0x18/0x40 [ 11.687700] kasan_save_alloc_info+0x3b/0x50 [ 11.687968] __kasan_kmalloc+0xb7/0xc0 [ 11.688102] __kmalloc_cache_noprof+0x189/0x420 [ 11.688326] rcu_uaf+0xb0/0x330 [ 11.688753] kunit_try_run_case+0x1a5/0x480 [ 11.689366] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.689927] kthread+0x337/0x6f0 [ 11.690272] ret_from_fork+0x116/0x1d0 [ 11.690709] ret_from_fork_asm+0x1a/0x30 [ 11.691078] [ 11.691153] Freed by task 0: [ 11.691444] kasan_save_stack+0x45/0x70 [ 11.691919] kasan_save_track+0x18/0x40 [ 11.692244] kasan_save_free_info+0x3f/0x60 [ 11.692504] __kasan_slab_free+0x56/0x70 [ 11.692923] kfree+0x222/0x3f0 [ 11.693171] rcu_uaf_reclaim+0x1f/0x60 [ 11.693414] rcu_core+0x66f/0x1c40 [ 11.693885] rcu_core_si+0x12/0x20 [ 11.694026] handle_softirqs+0x209/0x730 [ 11.694164] __irq_exit_rcu+0xc9/0x110 [ 11.694550] irq_exit_rcu+0x12/0x20 [ 11.695026] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.695523] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.696070] [ 11.696296] Last potentially related work creation: [ 11.696769] kasan_save_stack+0x45/0x70 [ 11.696910] kasan_record_aux_stack+0xb2/0xc0 [ 11.697053] __call_rcu_common.constprop.0+0x72/0x9d0 [ 11.697238] call_rcu+0x12/0x20 [ 11.697361] rcu_uaf+0x168/0x330 [ 11.697490] kunit_try_run_case+0x1a5/0x480 [ 11.697788] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.697959] kthread+0x337/0x6f0 [ 11.698131] ret_from_fork+0x116/0x1d0 [ 11.698396] ret_from_fork_asm+0x1a/0x30 [ 11.698989] [ 11.699112] The buggy address belongs to the object at ffff8881026bb1c0 [ 11.699112] which belongs to the cache kmalloc-32 of size 32 [ 11.700014] The buggy address is located 0 bytes inside of [ 11.700014] freed 32-byte region [ffff8881026bb1c0, ffff8881026bb1e0) [ 11.700956] [ 11.701052] The buggy address belongs to the physical page: [ 11.701412] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026bb [ 11.701975] flags: 0x200000000000000(node=0|zone=2) [ 11.702223] page_type: f5(slab) [ 11.702428] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.703049] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.703406] page dumped because: kasan: bad access detected [ 11.703958] [ 11.704046] Memory state around the buggy address: [ 11.704510] ffff8881026bb080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.704929] ffff8881026bb100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 11.705269] >ffff8881026bb180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 11.705823] ^ [ 11.706065] ffff8881026bb200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.706694] ffff8881026bb280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.707108] ==================================================================