Date
June 19, 2025, 12:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.139439] ================================================================== [ 31.139719] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 31.140442] Read of size 4 at addr fff00000c771ed80 by task swapper/1/0 [ 31.140659] [ 31.140760] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT [ 31.140992] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.141062] Hardware name: linux,dummy-virt (DT) [ 31.141139] Call trace: [ 31.141203] show_stack+0x20/0x38 (C) [ 31.141336] dump_stack_lvl+0x8c/0xd0 [ 31.141972] print_report+0x118/0x608 [ 31.142190] kasan_report+0xdc/0x128 [ 31.142529] __asan_report_load4_noabort+0x20/0x30 [ 31.142732] rcu_uaf_reclaim+0x64/0x70 [ 31.142926] rcu_core+0x9f4/0x1e20 [ 31.143147] rcu_core_si+0x18/0x30 [ 31.143453] handle_softirqs+0x374/0xb28 [ 31.143705] __do_softirq+0x1c/0x28 [ 31.143818] ____do_softirq+0x18/0x30 [ 31.143927] call_on_irq_stack+0x24/0x30 [ 31.144031] do_softirq_own_stack+0x24/0x38 [ 31.144136] __irq_exit_rcu+0x1fc/0x318 [ 31.144268] irq_exit_rcu+0x1c/0x80 [ 31.144431] el1_interrupt+0x38/0x58 [ 31.144601] el1h_64_irq_handler+0x18/0x28 [ 31.144772] el1h_64_irq+0x6c/0x70 [ 31.145158] arch_local_irq_enable+0x4/0x8 (P) [ 31.145345] do_idle+0x384/0x4e8 [ 31.145509] cpu_startup_entry+0x68/0x80 [ 31.145623] secondary_start_kernel+0x288/0x340 [ 31.145927] __secondary_switched+0xc0/0xc8 [ 31.146266] [ 31.146405] Allocated by task 209: [ 31.146489] kasan_save_stack+0x3c/0x68 [ 31.146606] kasan_save_track+0x20/0x40 [ 31.146702] kasan_save_alloc_info+0x40/0x58 [ 31.146798] __kasan_kmalloc+0xd4/0xd8 [ 31.146889] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.146993] rcu_uaf+0xb0/0x2d8 [ 31.147395] kunit_try_run_case+0x170/0x3f0 [ 31.147527] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.147657] kthread+0x328/0x630 [ 31.147735] ret_from_fork+0x10/0x20 [ 31.147821] [ 31.148261] Freed by task 0: [ 31.148369] kasan_save_stack+0x3c/0x68 [ 31.148524] kasan_save_track+0x20/0x40 [ 31.148635] kasan_save_free_info+0x4c/0x78 [ 31.148737] __kasan_slab_free+0x6c/0x98 [ 31.148827] kfree+0x214/0x3c8 [ 31.148921] rcu_uaf_reclaim+0x28/0x70 [ 31.149017] rcu_core+0x9f4/0x1e20 [ 31.149103] rcu_core_si+0x18/0x30 [ 31.149190] handle_softirqs+0x374/0xb28 [ 31.149317] __do_softirq+0x1c/0x28 [ 31.149443] [ 31.149526] Last potentially related work creation: [ 31.149607] kasan_save_stack+0x3c/0x68 [ 31.150108] kasan_record_aux_stack+0xb4/0xc8 [ 31.150224] __call_rcu_common.constprop.0+0x74/0x8c8 [ 31.150526] call_rcu+0x18/0x30 [ 31.150916] rcu_uaf+0x14c/0x2d8 [ 31.151019] kunit_try_run_case+0x170/0x3f0 [ 31.151125] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.151286] kthread+0x328/0x630 [ 31.151370] ret_from_fork+0x10/0x20 [ 31.151489] [ 31.151558] The buggy address belongs to the object at fff00000c771ed80 [ 31.151558] which belongs to the cache kmalloc-32 of size 32 [ 31.151715] The buggy address is located 0 bytes inside of [ 31.151715] freed 32-byte region [fff00000c771ed80, fff00000c771eda0) [ 31.151883] [ 31.151943] The buggy address belongs to the physical page: [ 31.152025] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10771e [ 31.152165] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.152348] page_type: f5(slab) [ 31.152501] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.152643] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.152760] page dumped because: kasan: bad access detected [ 31.152885] [ 31.152929] Memory state around the buggy address: [ 31.153000] fff00000c771ec80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 31.153101] fff00000c771ed00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 31.153238] >fff00000c771ed80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 31.153344] ^ [ 31.153420] fff00000c771ee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.153535] fff00000c771ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.153633] ==================================================================
[ 27.637214] ================================================================== [ 27.638071] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 27.638454] Read of size 4 at addr ffff888103775240 by task swapper/1/0 [ 27.638738] [ 27.638898] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) [ 27.638960] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.638974] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.638999] Call Trace: [ 27.639037] <IRQ> [ 27.639210] dump_stack_lvl+0x73/0xb0 [ 27.639287] print_report+0xd1/0x650 [ 27.639316] ? __virt_addr_valid+0x1db/0x2d0 [ 27.639343] ? rcu_uaf_reclaim+0x50/0x60 [ 27.639365] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.639391] ? rcu_uaf_reclaim+0x50/0x60 [ 27.639413] kasan_report+0x141/0x180 [ 27.639436] ? rcu_uaf_reclaim+0x50/0x60 [ 27.639461] __asan_report_load4_noabort+0x18/0x20 [ 27.639486] rcu_uaf_reclaim+0x50/0x60 [ 27.639508] rcu_core+0x66f/0x1c40 [ 27.639539] ? __pfx_rcu_core+0x10/0x10 [ 27.639562] ? ktime_get+0x6b/0x150 [ 27.639586] ? handle_softirqs+0x18e/0x730 [ 27.639613] rcu_core_si+0x12/0x20 [ 27.639635] handle_softirqs+0x209/0x730 [ 27.639656] ? hrtimer_interrupt+0x2fe/0x780 [ 27.639680] ? __pfx_handle_softirqs+0x10/0x10 [ 27.639707] __irq_exit_rcu+0xc9/0x110 [ 27.639729] irq_exit_rcu+0x12/0x20 [ 27.639803] sysvec_apic_timer_interrupt+0x81/0x90 [ 27.639835] </IRQ> [ 27.639893] <TASK> [ 27.639917] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 27.640035] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 27.640373] 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 63 e8 1e 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 [ 27.640473] RSP: 0000:ffff888100877dc8 EFLAGS: 00010206 [ 27.640582] RAX: ffff8881b295f000 RBX: ffff888100853000 RCX: ffffffffa629d285 [ 27.640634] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 000000000001b8f4 [ 27.640681] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b626192 [ 27.640728] R10: ffff88815b130c93 R11: 0000000000059c00 R12: 0000000000000001 [ 27.640775] R13: ffffed102010a600 R14: ffffffffa7fc1b90 R15: 0000000000000000 [ 27.640842] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 27.640907] ? default_idle+0xd/0x20 [ 27.640935] arch_cpu_idle+0xd/0x20 [ 27.641001] default_idle_call+0x48/0x80 [ 27.641028] do_idle+0x379/0x4f0 [ 27.641058] ? __pfx_do_idle+0x10/0x10 [ 27.641080] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 27.641126] ? complete+0x15b/0x1d0 [ 27.641153] cpu_startup_entry+0x5c/0x70 [ 27.641179] start_secondary+0x211/0x290 [ 27.641204] ? __pfx_start_secondary+0x10/0x10 [ 27.641232] common_startup_64+0x13e/0x148 [ 27.641266] </TASK> [ 27.641279] [ 27.685560] Allocated by task 227: [ 27.687419] kasan_save_stack+0x45/0x70 [ 27.687758] kasan_save_track+0x18/0x40 [ 27.687986] kasan_save_alloc_info+0x3b/0x50 [ 27.692232] __kasan_kmalloc+0xb7/0xc0 [ 27.692573] __kmalloc_cache_noprof+0x189/0x420 [ 27.692797] rcu_uaf+0xb0/0x330 [ 27.694542] kunit_try_run_case+0x1a5/0x480 [ 27.696369] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.697132] kthread+0x337/0x6f0 [ 27.697637] ret_from_fork+0x116/0x1d0 [ 27.698194] ret_from_fork_asm+0x1a/0x30 [ 27.700267] [ 27.700809] Freed by task 0: [ 27.704549] kasan_save_stack+0x45/0x70 [ 27.705326] kasan_save_track+0x18/0x40 [ 27.705727] kasan_save_free_info+0x3f/0x60 [ 27.706251] __kasan_slab_free+0x56/0x70 [ 27.706560] kfree+0x222/0x3f0 [ 27.706888] rcu_uaf_reclaim+0x1f/0x60 [ 27.707538] rcu_core+0x66f/0x1c40 [ 27.707817] rcu_core_si+0x12/0x20 [ 27.708299] handle_softirqs+0x209/0x730 [ 27.708717] __irq_exit_rcu+0xc9/0x110 [ 27.709191] irq_exit_rcu+0x12/0x20 [ 27.709530] sysvec_apic_timer_interrupt+0x81/0x90 [ 27.710330] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 27.710802] [ 27.711045] Last potentially related work creation: [ 27.712355] kasan_save_stack+0x45/0x70 [ 27.712825] kasan_record_aux_stack+0xb2/0xc0 [ 27.713174] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 27.713645] call_rcu+0x12/0x20 [ 27.713937] rcu_uaf+0x168/0x330 [ 27.714287] kunit_try_run_case+0x1a5/0x480 [ 27.714676] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.714944] kthread+0x337/0x6f0 [ 27.715235] ret_from_fork+0x116/0x1d0 [ 27.715592] ret_from_fork_asm+0x1a/0x30 [ 27.716189] [ 27.716391] The buggy address belongs to the object at ffff888103775240 [ 27.716391] which belongs to the cache kmalloc-32 of size 32 [ 27.717090] The buggy address is located 0 bytes inside of [ 27.717090] freed 32-byte region [ffff888103775240, ffff888103775260) [ 27.717933] [ 27.718194] The buggy address belongs to the physical page: [ 27.718693] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103775 [ 27.719145] flags: 0x200000000000000(node=0|zone=2) [ 27.719601] page_type: f5(slab) [ 27.719819] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.720616] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.721401] page dumped because: kasan: bad access detected [ 27.721877] [ 27.722090] Memory state around the buggy address: [ 27.722447] ffff888103775100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.722838] ffff888103775180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.723175] >ffff888103775200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.723708] ^ [ 27.724289] ffff888103775280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.724733] ffff888103775300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 27.725207] ==================================================================