Date
July 15, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.386869] ================================================================== [ 18.387008] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 18.387083] Read of size 4 at addr fff00000c59da0c0 by task swapper/0/0 [ 18.387131] [ 18.387169] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.7-rc1 #1 PREEMPT [ 18.388544] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.388639] Hardware name: linux,dummy-virt (DT) [ 18.388673] Call trace: [ 18.388695] show_stack+0x20/0x38 (C) [ 18.388752] dump_stack_lvl+0x8c/0xd0 [ 18.388801] print_report+0x118/0x5d0 [ 18.388846] kasan_report+0xdc/0x128 [ 18.388888] __asan_report_load4_noabort+0x20/0x30 [ 18.388939] rcu_uaf_reclaim+0x64/0x70 [ 18.390234] rcu_core+0x9f4/0x1e20 [ 18.390300] rcu_core_si+0x18/0x30 [ 18.390345] handle_softirqs+0x374/0xb28 [ 18.390421] __do_softirq+0x1c/0x28 [ 18.390463] ____do_softirq+0x18/0x30 [ 18.390523] call_on_irq_stack+0x24/0x30 [ 18.390568] do_softirq_own_stack+0x24/0x38 [ 18.390615] __irq_exit_rcu+0x1fc/0x318 [ 18.390659] irq_exit_rcu+0x1c/0x80 [ 18.390702] el1_interrupt+0x38/0x58 [ 18.390747] el1h_64_irq_handler+0x18/0x28 [ 18.390792] el1h_64_irq+0x6c/0x70 [ 18.390888] arch_local_irq_enable+0x4/0x8 (P) [ 18.390941] do_idle+0x384/0x4e8 [ 18.390986] cpu_startup_entry+0x68/0x80 [ 18.391032] rest_init+0x160/0x188 [ 18.391559] start_kernel+0x308/0x3d0 [ 18.391703] __primary_switched+0x8c/0xa0 [ 18.391826] [ 18.391888] Allocated by task 200: [ 18.391976] kasan_save_stack+0x3c/0x68 [ 18.392046] kasan_save_track+0x20/0x40 [ 18.392086] kasan_save_alloc_info+0x40/0x58 [ 18.392125] __kasan_kmalloc+0xd4/0xd8 [ 18.392306] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.392353] rcu_uaf+0xb0/0x2d8 [ 18.392586] kunit_try_run_case+0x170/0x3f0 [ 18.392637] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.392693] kthread+0x328/0x630 [ 18.392852] ret_from_fork+0x10/0x20 [ 18.393002] [ 18.393038] Freed by task 0: [ 18.393073] kasan_save_stack+0x3c/0x68 [ 18.393135] kasan_save_track+0x20/0x40 [ 18.393180] kasan_save_free_info+0x4c/0x78 [ 18.393237] __kasan_slab_free+0x6c/0x98 [ 18.393285] kfree+0x214/0x3c8 [ 18.393439] rcu_uaf_reclaim+0x28/0x70 [ 18.393493] rcu_core+0x9f4/0x1e20 [ 18.393533] rcu_core_si+0x18/0x30 [ 18.393566] handle_softirqs+0x374/0xb28 [ 18.393603] __do_softirq+0x1c/0x28 [ 18.394023] [ 18.394128] Last potentially related work creation: [ 18.394174] kasan_save_stack+0x3c/0x68 [ 18.394234] kasan_record_aux_stack+0xb4/0xc8 [ 18.394275] __call_rcu_common.constprop.0+0x74/0x8c8 [ 18.394316] call_rcu+0x18/0x30 [ 18.394349] rcu_uaf+0x14c/0x2d8 [ 18.395242] kunit_try_run_case+0x170/0x3f0 [ 18.395762] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.396406] kthread+0x328/0x630 [ 18.396751] ret_from_fork+0x10/0x20 [ 18.397331] [ 18.397607] The buggy address belongs to the object at fff00000c59da0c0 [ 18.397607] which belongs to the cache kmalloc-32 of size 32 [ 18.397711] The buggy address is located 0 bytes inside of [ 18.397711] freed 32-byte region [fff00000c59da0c0, fff00000c59da0e0) [ 18.397775] [ 18.398050] The buggy address belongs to the physical page: [ 18.398142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059da [ 18.398216] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.398418] page_type: f5(slab) [ 18.398910] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.399082] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.399414] page dumped because: kasan: bad access detected [ 18.399572] [ 18.399669] Memory state around the buggy address: [ 18.399705] fff00000c59d9f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 18.399973] fff00000c59da000: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.400030] >fff00000c59da080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.400071] ^ [ 18.400606] fff00000c59da100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.400769] fff00000c59da180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.400876] ==================================================================
[ 11.554833] ================================================================== [ 11.555272] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 11.555494] Read of size 4 at addr ffff88810222fb80 by task swapper/0/0 [ 11.555698] [ 11.556170] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.15.7-rc1 #1 PREEMPT(voluntary) [ 11.556218] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.556229] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.556250] Call Trace: [ 11.556278] <IRQ> [ 11.556296] dump_stack_lvl+0x73/0xb0 [ 11.556323] print_report+0xd1/0x610 [ 11.556345] ? __virt_addr_valid+0x1db/0x2d0 [ 11.556366] ? rcu_uaf_reclaim+0x50/0x60 [ 11.556386] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.556407] ? rcu_uaf_reclaim+0x50/0x60 [ 11.556427] kasan_report+0x141/0x180 [ 11.556449] ? rcu_uaf_reclaim+0x50/0x60 [ 11.556473] __asan_report_load4_noabort+0x18/0x20 [ 11.556493] rcu_uaf_reclaim+0x50/0x60 [ 11.556513] rcu_core+0x66c/0x1c30 [ 11.556536] ? enqueue_hrtimer+0xfe/0x210 [ 11.556559] ? __pfx_rcu_core+0x10/0x10 [ 11.556581] ? ktime_get+0x6b/0x150 [ 11.556601] ? handle_softirqs+0x18e/0x730 [ 11.556626] rcu_core_si+0x12/0x20 [ 11.556642] handle_softirqs+0x209/0x730 [ 11.556662] ? hrtimer_interrupt+0x2fe/0x780 [ 11.556683] ? __pfx_handle_softirqs+0x10/0x10 [ 11.556709] __irq_exit_rcu+0xc9/0x110 [ 11.556730] irq_exit_rcu+0x12/0x20 [ 11.556746] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.556766] </IRQ> [ 11.556817] <TASK> [ 11.556828] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.556927] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 11.557168] 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 87 27 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.557249] RSP: 0000:ffffffff9a607dd8 EFLAGS: 00010206 [ 11.557335] RAX: ffff8881bf690000 RBX: ffffffff9a61ca80 RCX: ffffffff99411fb5 [ 11.557379] RDX: ffffed102b606103 RSI: 0000000000000004 RDI: 0000000000010f54 [ 11.557421] RBP: ffffffff9a607de0 R08: 0000000000000001 R09: ffffed102b606102 [ 11.557475] R10: ffff88815b030813 R11: 000000000000e800 R12: 0000000000000000 [ 11.557516] R13: fffffbfff34c3950 R14: ffffffff9b19cc10 R15: 0000000000000000 [ 11.557571] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 11.557620] ? default_idle+0xd/0x20 [ 11.557639] arch_cpu_idle+0xd/0x20 [ 11.557657] default_idle_call+0x48/0x80 [ 11.557675] do_idle+0x379/0x4f0 [ 11.557699] ? __pfx_do_idle+0x10/0x10 [ 11.557719] ? rest_init+0x10b/0x140 [ 11.557740] cpu_startup_entry+0x5c/0x70 [ 11.557759] rest_init+0x11a/0x140 [ 11.557776] ? acpi_subsystem_init+0x5d/0x150 [ 11.557802] start_kernel+0x32b/0x410 [ 11.557824] x86_64_start_reservations+0x1c/0x30 [ 11.557845] x86_64_start_kernel+0xcf/0xe0 [ 11.557865] common_startup_64+0x13e/0x148 [ 11.557908] </TASK> [ 11.557919] [ 11.578876] Allocated by task 217: [ 11.579428] kasan_save_stack+0x45/0x70 [ 11.579585] kasan_save_track+0x18/0x40 [ 11.579719] kasan_save_alloc_info+0x3b/0x50 [ 11.580086] __kasan_kmalloc+0xb7/0xc0 [ 11.580713] __kmalloc_cache_noprof+0x189/0x420 [ 11.581204] rcu_uaf+0xb0/0x330 [ 11.581521] kunit_try_run_case+0x1a5/0x480 [ 11.582003] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.582532] kthread+0x337/0x6f0 [ 11.583075] ret_from_fork+0x41/0x80 [ 11.583462] ret_from_fork_asm+0x1a/0x30 [ 11.583649] [ 11.583806] Freed by task 0: [ 11.584135] kasan_save_stack+0x45/0x70 [ 11.584558] kasan_save_track+0x18/0x40 [ 11.584749] kasan_save_free_info+0x3f/0x60 [ 11.585215] __kasan_slab_free+0x56/0x70 [ 11.585650] kfree+0x222/0x3f0 [ 11.585808] rcu_uaf_reclaim+0x1f/0x60 [ 11.586293] rcu_core+0x66c/0x1c30 [ 11.586529] rcu_core_si+0x12/0x20 [ 11.586650] handle_softirqs+0x209/0x730 [ 11.587088] __irq_exit_rcu+0xc9/0x110 [ 11.587430] irq_exit_rcu+0x12/0x20 [ 11.587774] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.588216] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.588549] [ 11.588643] Last potentially related work creation: [ 11.588805] kasan_save_stack+0x45/0x70 [ 11.589142] kasan_record_aux_stack+0xb2/0xc0 [ 11.589592] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 11.590203] call_rcu+0x12/0x20 [ 11.590494] rcu_uaf+0x168/0x330 [ 11.590810] kunit_try_run_case+0x1a5/0x480 [ 11.591332] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.591512] kthread+0x337/0x6f0 [ 11.591627] ret_from_fork+0x41/0x80 [ 11.591841] ret_from_fork_asm+0x1a/0x30 [ 11.592231] [ 11.592472] The buggy address belongs to the object at ffff88810222fb80 [ 11.592472] which belongs to the cache kmalloc-32 of size 32 [ 11.593658] The buggy address is located 0 bytes inside of [ 11.593658] freed 32-byte region [ffff88810222fb80, ffff88810222fba0) [ 11.594654] [ 11.594756] The buggy address belongs to the physical page: [ 11.595258] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10222f [ 11.595973] flags: 0x200000000000000(node=0|zone=2) [ 11.596536] page_type: f5(slab) [ 11.596691] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 11.597349] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 11.597574] page dumped because: kasan: bad access detected [ 11.597901] [ 11.598055] Memory state around the buggy address: [ 11.598470] ffff88810222fa80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 11.599140] ffff88810222fb00: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 11.599911] >ffff88810222fb80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 11.600337] ^ [ 11.600455] ffff88810222fc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.600668] ffff88810222fc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.600915] ==================================================================