Date
June 2, 2025, 2:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.628790] ================================================================== [ 20.629915] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 20.630296] Read of size 4 at addr fff00000c5c7fb00 by task ksoftirqd/1/26 [ 20.630741] [ 20.630924] CPU: 1 UID: 0 PID: 26 Comm: ksoftirqd/1 Tainted: G B N 6.12.32-rc1 #1 [ 20.631036] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.631082] Hardware name: linux,dummy-virt (DT) [ 20.631126] Call trace: [ 20.631170] dump_backtrace+0x9c/0x128 [ 20.631227] show_stack+0x20/0x38 [ 20.631284] dump_stack_lvl+0x8c/0xd0 [ 20.631371] print_report+0x118/0x5f0 [ 20.631424] kasan_report+0xdc/0x128 [ 20.631483] __asan_report_load4_noabort+0x20/0x30 [ 20.631539] rcu_uaf_reclaim+0x64/0x70 [ 20.631588] rcu_core+0xa54/0x1df8 [ 20.631641] rcu_core_si+0x18/0x30 [ 20.631688] handle_softirqs+0x36c/0xb18 [ 20.631736] run_ksoftirqd+0x80/0xb0 [ 20.631777] smpboot_thread_fn+0x42c/0x6b8 [ 20.631828] kthread+0x24c/0x2d0 [ 20.631870] ret_from_fork+0x10/0x20 [ 20.631922] [ 20.635987] Allocated by task 185: [ 20.636299] kasan_save_stack+0x3c/0x68 [ 20.636686] kasan_save_track+0x20/0x40 [ 20.636882] kasan_save_alloc_info+0x40/0x58 [ 20.637299] __kasan_kmalloc+0xd4/0xd8 [ 20.637664] __kmalloc_cache_noprof+0x154/0x320 [ 20.637986] rcu_uaf+0xb8/0x2e0 [ 20.638253] kunit_try_run_case+0x170/0x3f0 [ 20.638491] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.638997] kthread+0x24c/0x2d0 [ 20.639315] ret_from_fork+0x10/0x20 [ 20.639599] [ 20.639817] Freed by task 26: [ 20.640063] kasan_save_stack+0x3c/0x68 [ 20.640326] kasan_save_track+0x20/0x40 [ 20.640645] kasan_save_free_info+0x4c/0x78 [ 20.640894] __kasan_slab_free+0x6c/0x98 [ 20.641249] kfree+0x110/0x3b8 [ 20.641503] rcu_uaf_reclaim+0x28/0x70 [ 20.641762] rcu_core+0xa54/0x1df8 [ 20.642094] rcu_core_si+0x18/0x30 [ 20.642351] handle_softirqs+0x36c/0xb18 [ 20.642587] run_ksoftirqd+0x80/0xb0 [ 20.642890] smpboot_thread_fn+0x42c/0x6b8 [ 20.643226] kthread+0x24c/0x2d0 [ 20.643463] ret_from_fork+0x10/0x20 [ 20.643643] [ 20.643914] Last potentially related work creation: [ 20.644285] kasan_save_stack+0x3c/0x68 [ 20.644658] __kasan_record_aux_stack+0xbc/0xe8 [ 20.644922] kasan_record_aux_stack_noalloc+0x14/0x20 [ 20.645148] __call_rcu_common.constprop.0+0x74/0xa18 [ 20.645524] call_rcu+0x18/0x30 [ 20.645796] rcu_uaf+0x150/0x2e0 [ 20.646604] kunit_try_run_case+0x170/0x3f0 [ 20.647172] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.647428] kthread+0x24c/0x2d0 [ 20.647603] ret_from_fork+0x10/0x20 [ 20.647805] [ 20.647941] The buggy address belongs to the object at fff00000c5c7fb00 [ 20.647941] which belongs to the cache kmalloc-32 of size 32 [ 20.649672] The buggy address is located 0 bytes inside of [ 20.649672] freed 32-byte region [fff00000c5c7fb00, fff00000c5c7fb20) [ 20.650880] [ 20.651366] The buggy address belongs to the physical page: [ 20.652069] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105c7f [ 20.653019] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.653988] page_type: f5(slab) [ 20.654633] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 20.655307] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 20.655773] page dumped because: kasan: bad access detected [ 20.656040] [ 20.656251] Memory state around the buggy address: [ 20.656552] fff00000c5c7fa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.656965] fff00000c5c7fa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 20.657348] >fff00000c5c7fb00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 20.657865] ^ [ 20.658200] fff00000c5c7fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.658643] fff00000c5c7fc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.659079] ==================================================================
[ 12.634258] ================================================================== [ 12.634714] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 12.635341] Read of size 4 at addr ffff88810261f100 by task swapper/0/0 [ 12.635824] [ 12.635949] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.12.32-rc1 #1 [ 12.636059] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.636086] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.636133] Call Trace: [ 12.636189] <IRQ> [ 12.636235] dump_stack_lvl+0x73/0xb0 [ 12.636291] print_report+0xd1/0x640 [ 12.636454] ? __virt_addr_valid+0x1db/0x2d0 [ 12.636506] ? rcu_uaf_reclaim+0x50/0x60 [ 12.636548] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.636592] ? rcu_uaf_reclaim+0x50/0x60 [ 12.636628] kasan_report+0x140/0x180 [ 12.636675] ? rcu_uaf_reclaim+0x50/0x60 [ 12.636722] __asan_report_load4_noabort+0x18/0x20 [ 12.636758] rcu_uaf_reclaim+0x50/0x60 [ 12.636827] rcu_core+0x683/0x1c80 [ 12.636898] ? __pfx_rcu_core+0x10/0x10 [ 12.636936] ? lapic_next_event+0x19/0x30 [ 12.636968] ? handle_softirqs+0x18e/0x730 [ 12.637001] rcu_core_si+0x12/0x20 [ 12.637019] handle_softirqs+0x209/0x730 [ 12.637041] ? __pfx_handle_softirqs+0x10/0x10 [ 12.637074] irq_exit_rcu+0x9c/0xd0 [ 12.637135] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.637169] </IRQ> [ 12.637225] <TASK> [ 12.637237] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.637341] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 12.637447] 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 2b 3b 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 [ 12.637533] RSP: 0000:ffffffff86807de0 EFLAGS: 00010212 [ 12.637631] RAX: ffff88815b000000 RBX: ffffffff86818700 RCX: ffffffff854d4d75 [ 12.637698] RDX: ffffed102b606b2b RSI: 0000000000000004 RDI: 0000000000025f2c [ 12.637745] RBP: ffffffff86807de8 R08: 0000000000000001 R09: ffffed102b606b2a [ 12.637787] R10: ffff88815b035953 R11: 0000000000011c00 R12: 0000000000000000 [ 12.637831] R13: fffffbfff0d030e0 R14: ffffffff87354e08 R15: 0000000000000000 [ 12.637899] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 12.637958] ? default_idle+0xd/0x20 [ 12.637981] arch_cpu_idle+0xd/0x20 [ 12.638000] default_idle_call+0x48/0x80 [ 12.638019] do_idle+0x313/0x3c0 [ 12.638043] ? __pfx_do_idle+0x10/0x10 [ 12.638073] ? __call_rcu_common.constprop.0+0x2dd/0xaa0 [ 12.638143] ? do_idle+0x1a/0x3c0 [ 12.638179] cpu_startup_entry+0x5c/0x70 [ 12.638203] rest_init+0x11a/0x140 [ 12.638222] start_kernel+0x326/0x410 [ 12.638247] x86_64_start_reservations+0x1c/0x30 [ 12.638266] x86_64_start_kernel+0xcf/0xe0 [ 12.638285] common_startup_64+0x12c/0x138 [ 12.638314] </TASK> [ 12.638325] [ 12.653769] Allocated by task 203: [ 12.654072] kasan_save_stack+0x45/0x70 [ 12.654457] kasan_save_track+0x18/0x40 [ 12.654753] kasan_save_alloc_info+0x3b/0x50 [ 12.654916] __kasan_kmalloc+0xb7/0xc0 [ 12.655208] __kmalloc_cache_noprof+0x168/0x350 [ 12.655519] rcu_uaf+0xb1/0x330 [ 12.655697] kunit_try_run_case+0x1a6/0x480 [ 12.656002] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.656532] kthread+0x257/0x310 [ 12.656729] ret_from_fork+0x41/0x80 [ 12.656976] ret_from_fork_asm+0x1a/0x30 [ 12.657412] [ 12.657527] Freed by task 0: [ 12.657678] kasan_save_stack+0x45/0x70 [ 12.657942] kasan_save_track+0x18/0x40 [ 12.658237] kasan_save_free_info+0x3f/0x60 [ 12.658567] __kasan_slab_free+0x56/0x70 [ 12.658778] kfree+0x123/0x3d0 [ 12.659014] rcu_uaf_reclaim+0x1f/0x60 [ 12.659742] rcu_core+0x683/0x1c80 [ 12.659951] rcu_core_si+0x12/0x20 [ 12.660545] handle_softirqs+0x209/0x730 [ 12.660910] irq_exit_rcu+0x9c/0xd0 [ 12.661186] sysvec_apic_timer_interrupt+0x81/0x90 [ 12.661795] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 12.662191] [ 12.662335] Last potentially related work creation: [ 12.662685] kasan_save_stack+0x45/0x70 [ 12.663014] __kasan_record_aux_stack+0xae/0xc0 [ 12.663558] kasan_record_aux_stack_noalloc+0xf/0x20 [ 12.664139] __call_rcu_common.constprop.0+0x72/0xaa0 [ 12.664338] call_rcu+0x12/0x20 [ 12.664508] rcu_uaf+0x169/0x330 [ 12.664780] kunit_try_run_case+0x1a6/0x480 [ 12.665090] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.665304] kthread+0x257/0x310 [ 12.665475] ret_from_fork+0x41/0x80 [ 12.665817] ret_from_fork_asm+0x1a/0x30 [ 12.666353] [ 12.666565] The buggy address belongs to the object at ffff88810261f100 [ 12.666565] which belongs to the cache kmalloc-32 of size 32 [ 12.667259] The buggy address is located 0 bytes inside of [ 12.667259] freed 32-byte region [ffff88810261f100, ffff88810261f120) [ 12.667850] [ 12.668007] The buggy address belongs to the physical page: [ 12.668765] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10261f [ 12.669174] flags: 0x200000000000000(node=0|zone=2) [ 12.669431] page_type: f5(slab) [ 12.669875] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 12.670478] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 12.670879] page dumped because: kasan: bad access detected [ 12.671333] [ 12.671431] Memory state around the buggy address: [ 12.671676] ffff88810261f000: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 12.672252] ffff88810261f080: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 12.672731] >ffff88810261f100: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 12.672999] ^ [ 12.673718] ffff88810261f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.674295] ffff88810261f200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.674621] ==================================================================