Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.651458] ================================================================== [ 18.651712] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 18.651779] Read of size 4 at addr fff00000c77eb280 by task swapper/1/0 [ 18.651825] [ 18.651877] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.651977] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.652033] Hardware name: linux,dummy-virt (DT) [ 18.652076] Call trace: [ 18.652145] show_stack+0x20/0x38 (C) [ 18.652242] dump_stack_lvl+0x8c/0xd0 [ 18.652293] print_report+0x118/0x608 [ 18.652338] kasan_report+0xdc/0x128 [ 18.652389] __asan_report_load4_noabort+0x20/0x30 [ 18.652484] rcu_uaf_reclaim+0x64/0x70 [ 18.652556] rcu_core+0x9f4/0x1e20 [ 18.652644] rcu_core_si+0x18/0x30 [ 18.652707] handle_softirqs+0x374/0xb28 [ 18.652753] __do_softirq+0x1c/0x28 [ 18.652818] ____do_softirq+0x18/0x30 [ 18.652873] call_on_irq_stack+0x24/0x30 [ 18.653172] do_softirq_own_stack+0x24/0x38 [ 18.653237] __irq_exit_rcu+0x1fc/0x318 [ 18.653281] irq_exit_rcu+0x1c/0x80 [ 18.653325] el1_interrupt+0x38/0x58 [ 18.653373] el1h_64_irq_handler+0x18/0x28 [ 18.653417] el1h_64_irq+0x6c/0x70 [ 18.653519] arch_local_irq_enable+0x4/0x8 (P) [ 18.653620] do_idle+0x384/0x4e8 [ 18.653664] cpu_startup_entry+0x64/0x80 [ 18.653708] secondary_start_kernel+0x288/0x340 [ 18.653764] __secondary_switched+0xc0/0xc8 [ 18.653855] [ 18.653923] Allocated by task 198: [ 18.653969] kasan_save_stack+0x3c/0x68 [ 18.654010] kasan_save_track+0x20/0x40 [ 18.654246] kasan_save_alloc_info+0x40/0x58 [ 18.654315] __kasan_kmalloc+0xd4/0xd8 [ 18.654376] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.654443] rcu_uaf+0xb0/0x2d8 [ 18.654517] kunit_try_run_case+0x170/0x3f0 [ 18.654583] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.654628] kthread+0x328/0x630 [ 18.654690] ret_from_fork+0x10/0x20 [ 18.654959] [ 18.655028] Freed by task 0: [ 18.655094] kasan_save_stack+0x3c/0x68 [ 18.655257] kasan_save_track+0x20/0x40 [ 18.655315] kasan_save_free_info+0x4c/0x78 [ 18.655382] __kasan_slab_free+0x6c/0x98 [ 18.655428] kfree+0x214/0x3c8 [ 18.655460] rcu_uaf_reclaim+0x28/0x70 [ 18.655502] rcu_core+0x9f4/0x1e20 [ 18.655537] rcu_core_si+0x18/0x30 [ 18.655669] handle_softirqs+0x374/0xb28 [ 18.655833] __do_softirq+0x1c/0x28 [ 18.655943] [ 18.656003] Last potentially related work creation: [ 18.656054] kasan_save_stack+0x3c/0x68 [ 18.656129] kasan_record_aux_stack+0xb4/0xc8 [ 18.656396] __call_rcu_common.constprop.0+0x74/0x8c8 [ 18.656579] call_rcu+0x18/0x30 [ 18.656705] rcu_uaf+0x14c/0x2d8 [ 18.656784] kunit_try_run_case+0x170/0x3f0 [ 18.656916] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.657035] kthread+0x328/0x630 [ 18.657090] ret_from_fork+0x10/0x20 [ 18.657131] [ 18.657338] The buggy address belongs to the object at fff00000c77eb280 [ 18.657338] which belongs to the cache kmalloc-32 of size 32 [ 18.657457] The buggy address is located 0 bytes inside of [ 18.657457] freed 32-byte region [fff00000c77eb280, fff00000c77eb2a0) [ 18.657560] [ 18.657601] The buggy address belongs to the physical page: [ 18.657633] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077eb [ 18.657773] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.657879] page_type: f5(slab) [ 18.657957] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.658035] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.658140] page dumped because: kasan: bad access detected [ 18.658190] [ 18.658221] Memory state around the buggy address: [ 18.658271] fff00000c77eb180: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 18.658332] fff00000c77eb200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.658375] >fff00000c77eb280: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 18.658413] ^ [ 18.658443] fff00000c77eb300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.658502] fff00000c77eb380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.658551] ==================================================================
[ 12.146418] ================================================================== [ 12.146907] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 12.147179] Read of size 4 at addr ffff8881038d4f80 by task swapper/1/0 [ 12.147503] [ 12.147640] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.147686] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.147698] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.147720] Call Trace: [ 12.147745] <IRQ> [ 12.147764] dump_stack_lvl+0x73/0xb0 [ 12.147795] print_report+0xd1/0x650 [ 12.147817] ? __virt_addr_valid+0x1db/0x2d0 [ 12.147839] ? rcu_uaf_reclaim+0x50/0x60 [ 12.147859] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.147880] ? rcu_uaf_reclaim+0x50/0x60 [ 12.147900] kasan_report+0x141/0x180 [ 12.147922] ? rcu_uaf_reclaim+0x50/0x60 [ 12.147947] __asan_report_load4_noabort+0x18/0x20 [ 12.147970] rcu_uaf_reclaim+0x50/0x60 [ 12.147990] rcu_core+0x66f/0x1c40 [ 12.148017] ? __pfx_rcu_core+0x10/0x10 [ 12.148038] ? ktime_get+0x6b/0x150 [ 12.148059] ? handle_softirqs+0x18e/0x730 [ 12.148083] rcu_core_si+0x12/0x20 [ 12.148102] handle_softirqs+0x209/0x730 [ 12.148120] ? hrtimer_interrupt+0x2fe/0x780 [ 12.148142] ? __pfx_handle_softirqs+0x10/0x10 [ 12.148166] __irq_exit_rcu+0xc9/0x110 [ 12.148186] irq_exit_rcu+0x12/0x20 [ 12.148205] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.148229] </IRQ> [ 12.148252] <TASK> [ 12.148264] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.148348] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 12.148582] 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 9a 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.148662] RSP: 0000:ffff888100877dc8 EFLAGS: 00010212 [ 12.148772] RAX: ffff88819d174000 RBX: ffff888100853000 RCX: ffffffffbba720e5 [ 12.148817] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000001902c [ 12.148860] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a [ 12.148902] R10: ffff88815b130c53 R11: 000000000001e400 R12: 0000000000000001 [ 12.148944] R13: ffffed102010a600 R14: ffffffffbd7b0e90 R15: 0000000000000000 [ 12.149001] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 12.149053] ? default_idle+0xd/0x20 [ 12.149075] arch_cpu_idle+0xd/0x20 [ 12.149096] default_idle_call+0x48/0x80 [ 12.149114] do_idle+0x379/0x4f0 [ 12.149136] ? complete+0x15b/0x1d0 [ 12.149154] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.149179] ? __pfx_do_idle+0x10/0x10 [ 12.149199] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 12.149221] ? complete+0x15b/0x1d0 [ 12.149242] cpu_startup_entry+0x5c/0x70 [ 12.149264] start_secondary+0x211/0x290 [ 12.149285] ? __pfx_start_secondary+0x10/0x10 [ 12.149310] common_startup_64+0x13e/0x148 [ 12.149341] </TASK> [ 12.149353] [ 12.163566] Allocated by task 216: [ 12.163764] kasan_save_stack+0x45/0x70 [ 12.163961] kasan_save_track+0x18/0x40 [ 12.164141] kasan_save_alloc_info+0x3b/0x50 [ 12.164580] __kasan_kmalloc+0xb7/0xc0 [ 12.165049] __kmalloc_cache_noprof+0x189/0x420 [ 12.165532] rcu_uaf+0xb0/0x330 [ 12.165810] kunit_try_run_case+0x1a5/0x480 [ 12.166021] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.166724] kthread+0x337/0x6f0 [ 12.166966] ret_from_fork+0x116/0x1d0 [ 12.167136] ret_from_fork_asm+0x1a/0x30 [ 12.167620] [ 12.167867] Freed by task 0: [ 12.168058] kasan_save_stack+0x45/0x70 [ 12.168302] kasan_save_track+0x18/0x40 [ 12.168500] kasan_save_free_info+0x3f/0x60 [ 12.168959] __kasan_slab_free+0x56/0x70 [ 12.169292] kfree+0x222/0x3f0 [ 12.169608] rcu_uaf_reclaim+0x1f/0x60 [ 12.170116] rcu_core+0x66f/0x1c40 [ 12.170363] rcu_core_si+0x12/0x20 [ 12.170672] handle_softirqs+0x209/0x730 [ 12.170862] __irq_exit_rcu+0xc9/0x110 [ 12.171038] irq_exit_rcu+0x12/0x20 [ 12.171432] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.171745] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.172143] [ 12.172391] Last potentially related work creation: [ 12.172808] kasan_save_stack+0x45/0x70 [ 12.173001] kasan_record_aux_stack+0xb2/0xc0 [ 12.173208] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 12.173436] call_rcu+0x12/0x20 [ 12.173569] rcu_uaf+0x168/0x330 [ 12.173734] kunit_try_run_case+0x1a5/0x480 [ 12.174062] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.174633] kthread+0x337/0x6f0 [ 12.174864] ret_from_fork+0x116/0x1d0 [ 12.175096] ret_from_fork_asm+0x1a/0x30 [ 12.175499] [ 12.175593] The buggy address belongs to the object at ffff8881038d4f80 [ 12.175593] which belongs to the cache kmalloc-32 of size 32 [ 12.176318] The buggy address is located 0 bytes inside of [ 12.176318] freed 32-byte region [ffff8881038d4f80, ffff8881038d4fa0) [ 12.177273] [ 12.177497] The buggy address belongs to the physical page: [ 12.177725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038d4 [ 12.178069] flags: 0x200000000000000(node=0|zone=2) [ 12.178516] page_type: f5(slab) [ 12.178694] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.179085] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 12.179563] page dumped because: kasan: bad access detected [ 12.179823] [ 12.179920] Memory state around the buggy address: [ 12.180123] ffff8881038d4e80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.180436] ffff8881038d4f00: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 12.181100] >ffff8881038d4f80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 12.181714] ^ [ 12.181895] ffff8881038d5000: 00 00 00 00 05 fc fc fc fc fc fc fc fc fc fc fc [ 12.182470] ffff8881038d5080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.182759] ==================================================================