Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 23.593537] ================================================================== [ 23.594985] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 23.595776] Read of size 4 at addr fff00000c637b3c0 by task swapper/1/0 [ 23.596621] [ 23.597036] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.14.11-rc1 #1 [ 23.597244] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.597323] Hardware name: linux,dummy-virt (DT) [ 23.597413] Call trace: [ 23.597481] show_stack+0x20/0x38 (C) [ 23.597622] dump_stack_lvl+0x8c/0xd0 [ 23.597764] print_report+0x118/0x608 [ 23.597901] kasan_report+0xdc/0x128 [ 23.598039] __asan_report_load4_noabort+0x20/0x30 [ 23.598238] rcu_uaf_reclaim+0x64/0x70 [ 23.598367] rcu_core+0x9f4/0x1e20 [ 23.598480] rcu_core_si+0x18/0x30 [ 23.598588] handle_softirqs+0x374/0xb28 [ 23.598700] __do_softirq+0x1c/0x28 [ 23.598807] ____do_softirq+0x18/0x30 [ 23.598937] call_on_irq_stack+0x24/0x58 [ 23.599055] do_softirq_own_stack+0x24/0x38 [ 23.599143] __irq_exit_rcu+0x1fc/0x318 [ 23.599198] irq_exit_rcu+0x1c/0x80 [ 23.599252] el1_interrupt+0x38/0x58 [ 23.599310] el1h_64_irq_handler+0x18/0x28 [ 23.599369] el1h_64_irq+0x6c/0x70 [ 23.599486] arch_local_irq_enable+0x4/0x8 (P) [ 23.599560] do_idle+0x384/0x4e8 [ 23.599612] cpu_startup_entry+0x64/0x80 [ 23.599668] secondary_start_kernel+0x288/0x340 [ 23.599727] __secondary_switched+0xc0/0xc8 [ 23.599793] [ 23.614363] Allocated by task 187: [ 23.614900] kasan_save_stack+0x3c/0x68 [ 23.615440] kasan_save_track+0x20/0x40 [ 23.615952] kasan_save_alloc_info+0x40/0x58 [ 23.616488] __kasan_kmalloc+0xd4/0xd8 [ 23.616959] __kmalloc_cache_noprof+0x16c/0x3c0 [ 23.617980] rcu_uaf+0xb0/0x2d0 [ 23.618435] kunit_try_run_case+0x170/0x3f0 [ 23.618962] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.619570] kthread+0x318/0x620 [ 23.620070] ret_from_fork+0x10/0x20 [ 23.620551] [ 23.620856] Freed by task 0: [ 23.622378] kasan_save_stack+0x3c/0x68 [ 23.622877] kasan_save_track+0x20/0x40 [ 23.623385] kasan_save_free_info+0x4c/0x78 [ 23.623906] __kasan_slab_free+0x6c/0x98 [ 23.624442] kfree+0x214/0x3c8 [ 23.624923] rcu_uaf_reclaim+0x28/0x70 [ 23.625834] rcu_core+0x9f4/0x1e20 [ 23.626293] rcu_core_si+0x18/0x30 [ 23.626820] handle_softirqs+0x374/0xb28 [ 23.627393] __do_softirq+0x1c/0x28 [ 23.627862] [ 23.628208] Last potentially related work creation: [ 23.628846] kasan_save_stack+0x3c/0x68 [ 23.630073] kasan_record_aux_stack+0xb4/0xc8 [ 23.630601] __call_rcu_common.constprop.0+0x74/0xa10 [ 23.631232] call_rcu+0x18/0x30 [ 23.631700] rcu_uaf+0x14c/0x2d0 [ 23.632267] kunit_try_run_case+0x170/0x3f0 [ 23.632781] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.633872] kthread+0x318/0x620 [ 23.634465] ret_from_fork+0x10/0x20 [ 23.635519] [ 23.635835] The buggy address belongs to the object at fff00000c637b3c0 [ 23.635835] which belongs to the cache kmalloc-32 of size 32 [ 23.638852] The buggy address is located 0 bytes inside of [ 23.638852] freed 32-byte region [fff00000c637b3c0, fff00000c637b3e0) [ 23.639862] [ 23.640232] The buggy address belongs to the physical page: [ 23.640924] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10637b [ 23.642099] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 23.642729] page_type: f5(slab) [ 23.643247] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 23.644260] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 23.645875] page dumped because: kasan: bad access detected [ 23.646333] [ 23.646558] Memory state around the buggy address: [ 23.646973] fff00000c637b280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 23.647485] fff00000c637b300: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 23.648306] >fff00000c637b380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 23.651531] ^ [ 23.652845] fff00000c637b400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.654545] fff00000c637b480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.655574] ==================================================================
[ 18.420655] ================================================================== [ 18.421332] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 18.422156] Read of size 4 at addr ffff88810297cb80 by task swapper/1/0 [ 18.422914] [ 18.423190] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.14.11-rc1 #1 [ 18.423292] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.423322] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 18.423372] Call Trace: [ 18.423476] <IRQ> [ 18.423547] dump_stack_lvl+0x73/0xb0 [ 18.423644] print_report+0xd1/0x650 [ 18.423707] ? __virt_addr_valid+0x1db/0x2d0 [ 18.423765] ? rcu_uaf_reclaim+0x50/0x60 [ 18.423814] ? kasan_complete_mode_report_info+0x64/0x200 [ 18.423899] ? rcu_uaf_reclaim+0x50/0x60 [ 18.423967] kasan_report+0x140/0x180 [ 18.424025] ? rcu_uaf_reclaim+0x50/0x60 [ 18.424080] __asan_report_load4_noabort+0x18/0x20 [ 18.424136] rcu_uaf_reclaim+0x50/0x60 [ 18.424184] rcu_core+0x680/0x1d70 [ 18.424272] ? __pfx_rcu_core+0x10/0x10 [ 18.424346] ? ktime_get+0x6b/0x150 [ 18.424402] ? handle_softirqs+0x18e/0x730 [ 18.424465] rcu_core_si+0x12/0x20 [ 18.424519] handle_softirqs+0x209/0x730 [ 18.424581] ? hrtimer_interrupt+0x2fe/0x780 [ 18.424656] ? __pfx_handle_softirqs+0x10/0x10 [ 18.424724] __irq_exit_rcu+0xc9/0x110 [ 18.424769] irq_exit_rcu+0x12/0x20 [ 18.424798] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.424835] </IRQ> [ 18.424917] <TASK> [ 18.424949] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.425198] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 18.425451] 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 83 63 11 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 [ 18.425668] RSP: 0000:ffff88810088fdd0 EFLAGS: 00010216 [ 18.425904] RAX: ffff88815b100000 RBX: ffff8881008790c0 RCX: ffffffffb4171d35 [ 18.426053] RDX: ffffed102b626ae3 RSI: 0000000000000004 RDI: 000000000001920c [ 18.426191] RBP: ffff88810088fdd8 R08: 0000000000000001 R09: ffffed102b626ae2 [ 18.426266] R10: ffff88815b135713 R11: 0000000000064000 R12: 0000000000000001 [ 18.426341] R13: ffffed102010f218 R14: ffffffffb5d80310 R15: 0000000000000000 [ 18.426430] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 18.426515] ? default_idle+0xd/0x20 [ 18.426544] arch_cpu_idle+0xd/0x20 [ 18.426570] default_idle_call+0x48/0x80 [ 18.426595] do_idle+0x310/0x3c0 [ 18.426626] ? __pfx_do_idle+0x10/0x10 [ 18.426649] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 18.426678] ? complete+0x15b/0x1d0 [ 18.426707] cpu_startup_entry+0x5c/0x70 [ 18.426733] start_secondary+0x212/0x290 [ 18.426760] ? __pfx_start_secondary+0x10/0x10 [ 18.426792] common_startup_64+0x12c/0x138 [ 18.426833] </TASK> [ 18.426850] [ 18.442470] Allocated by task 206: [ 18.442937] kasan_save_stack+0x45/0x70 [ 18.443448] kasan_save_track+0x18/0x40 [ 18.443842] kasan_save_alloc_info+0x3b/0x50 [ 18.444311] __kasan_kmalloc+0xb7/0xc0 [ 18.444612] __kmalloc_cache_noprof+0x18a/0x420 [ 18.445029] rcu_uaf+0xb1/0x330 [ 18.445381] kunit_try_run_case+0x1a6/0x480 [ 18.445731] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.446216] kthread+0x324/0x6e0 [ 18.446497] ret_from_fork+0x41/0x80 [ 18.446731] ret_from_fork_asm+0x1a/0x30 [ 18.447083] [ 18.447348] Freed by task 0: [ 18.447667] kasan_save_stack+0x45/0x70 [ 18.448089] kasan_save_track+0x18/0x40 [ 18.448501] kasan_save_free_info+0x3f/0x60 [ 18.448963] __kasan_slab_free+0x56/0x70 [ 18.449394] kfree+0x224/0x3f0 [ 18.449746] rcu_uaf_reclaim+0x1f/0x60 [ 18.450100] rcu_core+0x680/0x1d70 [ 18.450375] rcu_core_si+0x12/0x20 [ 18.450774] handle_softirqs+0x209/0x730 [ 18.451227] __irq_exit_rcu+0xc9/0x110 [ 18.451641] irq_exit_rcu+0x12/0x20 [ 18.452056] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.452418] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.452710] [ 18.452927] Last potentially related work creation: [ 18.453481] kasan_save_stack+0x45/0x70 [ 18.453892] kasan_record_aux_stack+0xb2/0xc0 [ 18.454389] __call_rcu_common.constprop.0+0x72/0xaa0 [ 18.454894] call_rcu+0x12/0x20 [ 18.455240] rcu_uaf+0x169/0x330 [ 18.455534] kunit_try_run_case+0x1a6/0x480 [ 18.455981] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.456427] kthread+0x324/0x6e0 [ 18.456774] ret_from_fork+0x41/0x80 [ 18.457084] ret_from_fork_asm+0x1a/0x30 [ 18.457604] [ 18.457852] The buggy address belongs to the object at ffff88810297cb80 [ 18.457852] which belongs to the cache kmalloc-32 of size 32 [ 18.458629] The buggy address is located 0 bytes inside of [ 18.458629] freed 32-byte region [ffff88810297cb80, ffff88810297cba0) [ 18.459507] [ 18.459739] The buggy address belongs to the physical page: [ 18.460180] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10297c [ 18.460719] flags: 0x200000000000000(node=0|zone=2) [ 18.460995] page_type: f5(slab) [ 18.461210] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 18.461937] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 18.462379] page dumped because: kasan: bad access detected [ 18.462656] [ 18.462793] Memory state around the buggy address: [ 18.463251] ffff88810297ca80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.463961] ffff88810297cb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 18.464586] >ffff88810297cb80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 18.465152] ^ [ 18.465540] ffff88810297cc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.465992] ffff88810297cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.466521] ==================================================================