Date
July 10, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.311240] ================================================================== [ 16.311397] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 16.311489] Read of size 4 at addr fff00000c6437640 by task swapper/1/0 [ 16.311557] [ 16.311604] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.311707] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.311743] Hardware name: linux,dummy-virt (DT) [ 16.311869] Call trace: [ 16.312021] show_stack+0x20/0x38 (C) [ 16.312092] dump_stack_lvl+0x8c/0xd0 [ 16.312146] print_report+0x118/0x608 [ 16.312193] kasan_report+0xdc/0x128 [ 16.312239] __asan_report_load4_noabort+0x20/0x30 [ 16.312307] rcu_uaf_reclaim+0x64/0x70 [ 16.312361] rcu_core+0x9f4/0x1e20 [ 16.312426] rcu_core_si+0x18/0x30 [ 16.312471] handle_softirqs+0x374/0xb28 [ 16.312529] __do_softirq+0x1c/0x28 [ 16.312572] ____do_softirq+0x18/0x30 [ 16.312636] call_on_irq_stack+0x24/0x30 [ 16.312691] do_softirq_own_stack+0x24/0x38 [ 16.312746] __irq_exit_rcu+0x1fc/0x318 [ 16.312823] irq_exit_rcu+0x1c/0x80 [ 16.312868] el1_interrupt+0x38/0x58 [ 16.312923] el1h_64_irq_handler+0x18/0x28 [ 16.312987] el1h_64_irq+0x6c/0x70 [ 16.313121] arch_local_irq_enable+0x4/0x8 (P) [ 16.313329] do_idle+0x384/0x4e8 [ 16.313374] cpu_startup_entry+0x64/0x80 [ 16.313459] secondary_start_kernel+0x288/0x340 [ 16.313516] __secondary_switched+0xc0/0xc8 [ 16.313581] [ 16.313615] Allocated by task 198: [ 16.313677] kasan_save_stack+0x3c/0x68 [ 16.313721] kasan_save_track+0x20/0x40 [ 16.313886] kasan_save_alloc_info+0x40/0x58 [ 16.313954] __kasan_kmalloc+0xd4/0xd8 [ 16.314047] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.314099] rcu_uaf+0xb0/0x2d8 [ 16.314134] kunit_try_run_case+0x170/0x3f0 [ 16.314176] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.314240] kthread+0x328/0x630 [ 16.314275] ret_from_fork+0x10/0x20 [ 16.314313] [ 16.314333] Freed by task 0: [ 16.314359] kasan_save_stack+0x3c/0x68 [ 16.314536] kasan_save_track+0x20/0x40 [ 16.314613] kasan_save_free_info+0x4c/0x78 [ 16.314705] __kasan_slab_free+0x6c/0x98 [ 16.314775] kfree+0x214/0x3c8 [ 16.314834] rcu_uaf_reclaim+0x28/0x70 [ 16.314891] rcu_core+0x9f4/0x1e20 [ 16.314958] rcu_core_si+0x18/0x30 [ 16.315026] handle_softirqs+0x374/0xb28 [ 16.315142] __do_softirq+0x1c/0x28 [ 16.315201] [ 16.315287] Last potentially related work creation: [ 16.315370] kasan_save_stack+0x3c/0x68 [ 16.315422] kasan_record_aux_stack+0xb4/0xc8 [ 16.315505] __call_rcu_common.constprop.0+0x74/0x8c8 [ 16.315795] call_rcu+0x18/0x30 [ 16.315866] rcu_uaf+0x14c/0x2d8 [ 16.315972] kunit_try_run_case+0x170/0x3f0 [ 16.316053] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.316110] kthread+0x328/0x630 [ 16.316354] ret_from_fork+0x10/0x20 [ 16.316441] [ 16.316542] The buggy address belongs to the object at fff00000c6437640 [ 16.316542] which belongs to the cache kmalloc-32 of size 32 [ 16.316638] The buggy address is located 0 bytes inside of [ 16.316638] freed 32-byte region [fff00000c6437640, fff00000c6437660) [ 16.316749] [ 16.316809] The buggy address belongs to the physical page: [ 16.316863] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106437 [ 16.316962] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.317060] page_type: f5(slab) [ 16.317116] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 16.317174] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.317225] page dumped because: kasan: bad access detected [ 16.317258] [ 16.317290] Memory state around the buggy address: [ 16.317323] fff00000c6437500: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 16.317368] fff00000c6437580: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 16.317422] >fff00000c6437600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.317459] ^ [ 16.317492] fff00000c6437680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.317533] fff00000c6437700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.317571] ==================================================================
[ 13.280567] ================================================================== [ 13.280993] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.281225] Read of size 4 at addr ffff8881027abe00 by task swapper/0/0 [ 13.281466] [ 13.281554] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 13.281641] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.281653] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.281673] Call Trace: [ 13.281701] <IRQ> [ 13.281718] dump_stack_lvl+0x73/0xb0 [ 13.281749] print_report+0xd1/0x650 [ 13.281771] ? __virt_addr_valid+0x1db/0x2d0 [ 13.281881] ? rcu_uaf_reclaim+0x50/0x60 [ 13.281904] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.281927] ? rcu_uaf_reclaim+0x50/0x60 [ 13.281949] kasan_report+0x141/0x180 [ 13.281971] ? rcu_uaf_reclaim+0x50/0x60 [ 13.281996] __asan_report_load4_noabort+0x18/0x20 [ 13.282021] rcu_uaf_reclaim+0x50/0x60 [ 13.282041] rcu_core+0x66f/0x1c40 [ 13.282069] ? __pfx_rcu_core+0x10/0x10 [ 13.282090] ? ktime_get+0x6b/0x150 [ 13.282110] ? handle_softirqs+0x18e/0x730 [ 13.282135] rcu_core_si+0x12/0x20 [ 13.282154] handle_softirqs+0x209/0x730 [ 13.282173] ? hrtimer_interrupt+0x2fe/0x780 [ 13.282195] ? __pfx_handle_softirqs+0x10/0x10 [ 13.282220] __irq_exit_rcu+0xc9/0x110 [ 13.282241] irq_exit_rcu+0x12/0x20 [ 13.282260] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.282286] </IRQ> [ 13.282332] <TASK> [ 13.282342] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.282533] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.282756] 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 e3 81 21 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 [ 13.282834] RSP: 0000:ffffffffa7407dd8 EFLAGS: 00010212 [ 13.282919] RAX: ffff8881b2872000 RBX: ffffffffa741cac0 RCX: ffffffffa6274105 [ 13.282963] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000004e2c [ 13.283007] RBP: ffffffffa7407de0 R08: 0000000000000001 R09: ffffed102b60618a [ 13.283047] R10: ffff88815b030c53 R11: ffffffffa87c36c0 R12: 0000000000000000 [ 13.283092] R13: fffffbfff4e83958 R14: ffffffffa7fb1490 R15: 0000000000000000 [ 13.283148] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.283201] ? default_idle+0xd/0x20 [ 13.283223] arch_cpu_idle+0xd/0x20 [ 13.283244] default_idle_call+0x48/0x80 [ 13.283263] do_idle+0x379/0x4f0 [ 13.283288] ? __pfx_do_idle+0x10/0x10 [ 13.283315] cpu_startup_entry+0x5c/0x70 [ 13.283335] rest_init+0x11a/0x140 [ 13.283379] ? acpi_subsystem_init+0x5d/0x150 [ 13.283405] start_kernel+0x330/0x410 [ 13.283430] x86_64_start_reservations+0x1c/0x30 [ 13.283502] x86_64_start_kernel+0x10d/0x120 [ 13.283527] common_startup_64+0x13e/0x148 [ 13.283559] </TASK> [ 13.283569] [ 13.296165] Allocated by task 215: [ 13.296350] kasan_save_stack+0x45/0x70 [ 13.296538] kasan_save_track+0x18/0x40 [ 13.297134] kasan_save_alloc_info+0x3b/0x50 [ 13.297339] __kasan_kmalloc+0xb7/0xc0 [ 13.297635] __kmalloc_cache_noprof+0x189/0x420 [ 13.297994] rcu_uaf+0xb0/0x330 [ 13.298170] kunit_try_run_case+0x1a5/0x480 [ 13.298603] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.298950] kthread+0x337/0x6f0 [ 13.299082] ret_from_fork+0x116/0x1d0 [ 13.299459] ret_from_fork_asm+0x1a/0x30 [ 13.299740] [ 13.299883] Freed by task 0: [ 13.300031] kasan_save_stack+0x45/0x70 [ 13.300381] kasan_save_track+0x18/0x40 [ 13.300882] kasan_save_free_info+0x3f/0x60 [ 13.301104] __kasan_slab_free+0x56/0x70 [ 13.301248] kfree+0x222/0x3f0 [ 13.301638] rcu_uaf_reclaim+0x1f/0x60 [ 13.301815] rcu_core+0x66f/0x1c40 [ 13.301983] rcu_core_si+0x12/0x20 [ 13.302134] handle_softirqs+0x209/0x730 [ 13.302304] __irq_exit_rcu+0xc9/0x110 [ 13.302567] irq_exit_rcu+0x12/0x20 [ 13.303104] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.303290] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.303766] [ 13.303863] Last potentially related work creation: [ 13.304204] kasan_save_stack+0x45/0x70 [ 13.304483] kasan_record_aux_stack+0xb2/0xc0 [ 13.304828] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 13.305033] call_rcu+0x12/0x20 [ 13.305203] rcu_uaf+0x168/0x330 [ 13.305748] kunit_try_run_case+0x1a5/0x480 [ 13.305966] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.306180] kthread+0x337/0x6f0 [ 13.306354] ret_from_fork+0x116/0x1d0 [ 13.306800] ret_from_fork_asm+0x1a/0x30 [ 13.307010] [ 13.307107] The buggy address belongs to the object at ffff8881027abe00 [ 13.307107] which belongs to the cache kmalloc-32 of size 32 [ 13.307813] The buggy address is located 0 bytes inside of [ 13.307813] freed 32-byte region [ffff8881027abe00, ffff8881027abe20) [ 13.308318] [ 13.308466] The buggy address belongs to the physical page: [ 13.308712] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027ab [ 13.309046] flags: 0x200000000000000(node=0|zone=2) [ 13.309254] page_type: f5(slab) [ 13.309422] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.310085] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.310622] page dumped because: kasan: bad access detected [ 13.310954] [ 13.311106] Memory state around the buggy address: [ 13.311318] ffff8881027abd00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 13.311897] ffff8881027abd80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.312276] >ffff8881027abe00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 13.312680] ^ [ 13.312940] ffff8881027abe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.313346] ffff8881027abf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.313807] ==================================================================