Date
July 5, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.493185] ================================================================== [ 18.493590] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 18.493662] Read of size 4 at addr fff00000c65c4ac0 by task swapper/0/0 [ 18.494032] [ 18.494074] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.494316] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.494425] Hardware name: linux,dummy-virt (DT) [ 18.494617] Call trace: [ 18.494662] show_stack+0x20/0x38 (C) [ 18.494932] dump_stack_lvl+0x8c/0xd0 [ 18.494987] print_report+0x118/0x608 [ 18.495031] kasan_report+0xdc/0x128 [ 18.495082] __asan_report_load4_noabort+0x20/0x30 [ 18.495326] rcu_uaf_reclaim+0x64/0x70 [ 18.495398] rcu_core+0x9f4/0x1e20 [ 18.495599] rcu_core_si+0x18/0x30 [ 18.495778] handle_softirqs+0x374/0xb28 [ 18.495833] __do_softirq+0x1c/0x28 [ 18.495958] ____do_softirq+0x18/0x30 [ 18.496004] call_on_irq_stack+0x24/0x30 [ 18.496049] do_softirq_own_stack+0x24/0x38 [ 18.496095] __irq_exit_rcu+0x1fc/0x318 [ 18.496147] irq_exit_rcu+0x1c/0x80 [ 18.496463] el1_interrupt+0x38/0x58 [ 18.496514] el1h_64_irq_handler+0x18/0x28 [ 18.496578] el1h_64_irq+0x6c/0x70 [ 18.496679] arch_local_irq_enable+0x4/0x8 (P) [ 18.496731] do_idle+0x384/0x4e8 [ 18.496845] cpu_startup_entry+0x64/0x80 [ 18.497004] rest_init+0x160/0x188 [ 18.497160] start_kernel+0x30c/0x3d0 [ 18.497339] __primary_switched+0x8c/0xa0 [ 18.497396] [ 18.497417] Allocated by task 198: [ 18.497628] kasan_save_stack+0x3c/0x68 [ 18.497765] kasan_save_track+0x20/0x40 [ 18.497875] kasan_save_alloc_info+0x40/0x58 [ 18.497946] __kasan_kmalloc+0xd4/0xd8 [ 18.497995] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.498038] rcu_uaf+0xb0/0x2d8 [ 18.498082] kunit_try_run_case+0x170/0x3f0 [ 18.498122] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.498395] kthread+0x328/0x630 [ 18.498470] ret_from_fork+0x10/0x20 [ 18.498545] [ 18.498565] Freed by task 0: [ 18.498592] kasan_save_stack+0x3c/0x68 [ 18.498650] kasan_save_track+0x20/0x40 [ 18.498782] kasan_save_free_info+0x4c/0x78 [ 18.498830] __kasan_slab_free+0x6c/0x98 [ 18.498977] kfree+0x214/0x3c8 [ 18.499040] rcu_uaf_reclaim+0x28/0x70 [ 18.499077] rcu_core+0x9f4/0x1e20 [ 18.499110] rcu_core_si+0x18/0x30 [ 18.499171] handle_softirqs+0x374/0xb28 [ 18.499208] __do_softirq+0x1c/0x28 [ 18.499243] [ 18.499274] Last potentially related work creation: [ 18.499311] kasan_save_stack+0x3c/0x68 [ 18.499350] kasan_record_aux_stack+0xb4/0xc8 [ 18.499698] __call_rcu_common.constprop.0+0x74/0x8c8 [ 18.500161] call_rcu+0x18/0x30 [ 18.500248] rcu_uaf+0x14c/0x2d8 [ 18.500332] kunit_try_run_case+0x170/0x3f0 [ 18.500372] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.500454] kthread+0x328/0x630 [ 18.500519] ret_from_fork+0x10/0x20 [ 18.500574] [ 18.500688] The buggy address belongs to the object at fff00000c65c4ac0 [ 18.500688] which belongs to the cache kmalloc-32 of size 32 [ 18.500748] The buggy address is located 0 bytes inside of [ 18.500748] freed 32-byte region [fff00000c65c4ac0, fff00000c65c4ae0) [ 18.500823] [ 18.500889] The buggy address belongs to the physical page: [ 18.500926] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065c4 [ 18.501037] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.501311] page_type: f5(slab) [ 18.501424] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 18.501475] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.501565] page dumped because: kasan: bad access detected [ 18.501596] [ 18.501615] Memory state around the buggy address: [ 18.501715] fff00000c65c4980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.501906] fff00000c65c4a00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 18.502021] >fff00000c65c4a80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 18.502067] ^ [ 18.502426] fff00000c65c4b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.502701] fff00000c65c4b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.502742] ==================================================================
[ 14.218369] ================================================================== [ 14.218983] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 14.220119] Read of size 4 at addr ffff888103918b80 by task swapper/0/0 [ 14.220521] [ 14.220638] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 14.220691] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.220706] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.220731] Call Trace: [ 14.220769] <IRQ> [ 14.220810] dump_stack_lvl+0x73/0xb0 [ 14.220852] print_report+0xd1/0x650 [ 14.220878] ? __virt_addr_valid+0x1db/0x2d0 [ 14.220907] ? rcu_uaf_reclaim+0x50/0x60 [ 14.220930] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.220955] ? rcu_uaf_reclaim+0x50/0x60 [ 14.220978] kasan_report+0x141/0x180 [ 14.221002] ? rcu_uaf_reclaim+0x50/0x60 [ 14.221030] __asan_report_load4_noabort+0x18/0x20 [ 14.221056] rcu_uaf_reclaim+0x50/0x60 [ 14.221088] rcu_core+0x66f/0x1c40 [ 14.221120] ? __pfx_rcu_core+0x10/0x10 [ 14.221144] ? ktime_get+0x6b/0x150 [ 14.221168] ? handle_softirqs+0x18e/0x730 [ 14.221197] rcu_core_si+0x12/0x20 [ 14.221219] handle_softirqs+0x209/0x730 [ 14.221240] ? hrtimer_interrupt+0x2fe/0x780 [ 14.221265] ? __pfx_handle_softirqs+0x10/0x10 [ 14.221292] __irq_exit_rcu+0xc9/0x110 [ 14.221315] irq_exit_rcu+0x12/0x20 [ 14.221341] sysvec_apic_timer_interrupt+0x81/0x90 [ 14.221369] </IRQ> [ 14.221402] <TASK> [ 14.221414] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 14.221524] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 14.221777] 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 [ 14.222231] RSP: 0000:ffffffffbb007dd8 EFLAGS: 00010206 [ 14.222356] RAX: ffff88819ec74000 RBX: ffffffffbb01cac0 RCX: ffffffffb9e720e5 [ 14.222410] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000014904 [ 14.222459] RBP: ffffffffbb007de0 R08: 0000000000000001 R09: ffffed102b60618a [ 14.222507] R10: ffff88815b030c53 R11: 0000000000052800 R12: 0000000000000000 [ 14.222554] R13: fffffbfff7603958 R14: ffffffffbbbb0e90 R15: 0000000000000000 [ 14.222621] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 14.222686] ? default_idle+0xd/0x20 [ 14.222712] arch_cpu_idle+0xd/0x20 [ 14.222737] default_idle_call+0x48/0x80 [ 14.222758] do_idle+0x379/0x4f0 [ 14.222801] ? __pfx_do_idle+0x10/0x10 [ 14.222826] ? complete+0x15b/0x1d0 [ 14.222846] ? trace_preempt_on+0x20/0xc0 [ 14.222872] ? schedule+0x86/0x2e0 [ 14.222895] ? preempt_count_sub+0x50/0x80 [ 14.222921] cpu_startup_entry+0x5c/0x70 [ 14.222947] rest_init+0x11a/0x140 [ 14.222967] ? acpi_subsystem_init+0x5d/0x150 [ 14.222995] start_kernel+0x330/0x410 [ 14.223024] x86_64_start_reservations+0x1c/0x30 [ 14.223052] x86_64_start_kernel+0x10d/0x120 [ 14.223107] common_startup_64+0x13e/0x148 [ 14.223144] </TASK> [ 14.223158] [ 14.245820] Allocated by task 216: [ 14.246293] kasan_save_stack+0x45/0x70 [ 14.246740] kasan_save_track+0x18/0x40 [ 14.247187] kasan_save_alloc_info+0x3b/0x50 [ 14.247665] __kasan_kmalloc+0xb7/0xc0 [ 14.247952] __kmalloc_cache_noprof+0x189/0x420 [ 14.248298] rcu_uaf+0xb0/0x330 [ 14.248648] kunit_try_run_case+0x1a5/0x480 [ 14.249107] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.249419] kthread+0x337/0x6f0 [ 14.249559] ret_from_fork+0x116/0x1d0 [ 14.249708] ret_from_fork_asm+0x1a/0x30 [ 14.250018] [ 14.250178] Freed by task 0: [ 14.250299] kasan_save_stack+0x45/0x70 [ 14.250450] kasan_save_track+0x18/0x40 [ 14.250600] kasan_save_free_info+0x3f/0x60 [ 14.250762] __kasan_slab_free+0x56/0x70 [ 14.250933] kfree+0x222/0x3f0 [ 14.251065] rcu_uaf_reclaim+0x1f/0x60 [ 14.251524] rcu_core+0x66f/0x1c40 [ 14.251963] rcu_core_si+0x12/0x20 [ 14.252349] handle_softirqs+0x209/0x730 [ 14.252804] __irq_exit_rcu+0xc9/0x110 [ 14.253227] irq_exit_rcu+0x12/0x20 [ 14.253612] sysvec_apic_timer_interrupt+0x81/0x90 [ 14.254135] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 14.254670] [ 14.254894] Last potentially related work creation: [ 14.255464] kasan_save_stack+0x45/0x70 [ 14.255888] kasan_record_aux_stack+0xb2/0xc0 [ 14.256141] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 14.256640] call_rcu+0x12/0x20 [ 14.257004] rcu_uaf+0x168/0x330 [ 14.257263] kunit_try_run_case+0x1a5/0x480 [ 14.257434] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.257628] kthread+0x337/0x6f0 [ 14.257763] ret_from_fork+0x116/0x1d0 [ 14.257936] ret_from_fork_asm+0x1a/0x30 [ 14.258201] [ 14.258303] The buggy address belongs to the object at ffff888103918b80 [ 14.258303] which belongs to the cache kmalloc-32 of size 32 [ 14.258754] The buggy address is located 0 bytes inside of [ 14.258754] freed 32-byte region [ffff888103918b80, ffff888103918ba0) [ 14.259273] [ 14.259373] The buggy address belongs to the physical page: [ 14.259672] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103918 [ 14.260101] flags: 0x200000000000000(node=0|zone=2) [ 14.260317] page_type: f5(slab) [ 14.260513] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.260856] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 14.261205] page dumped because: kasan: bad access detected [ 14.261493] [ 14.261598] Memory state around the buggy address: [ 14.261840] ffff888103918a80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.262197] ffff888103918b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.262448] >ffff888103918b80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 14.262778] ^ [ 14.262982] ffff888103918c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.263309] ffff888103918c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 14.263593] ==================================================================