Date
July 23, 2025, 3:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.481456] ================================================================== [ 31.481597] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 31.481672] Read of size 4 at addr fff00000c9a6bd80 by task swapper/0/0 [ 31.481720] [ 31.481761] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B W N 6.16.0-rc7-next-20250723 #1 PREEMPT [ 31.481854] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 31.481884] Hardware name: linux,dummy-virt (DT) [ 31.481930] Call trace: [ 31.481954] show_stack+0x20/0x38 (C) [ 31.482006] dump_stack_lvl+0x8c/0xd0 [ 31.482066] print_report+0x118/0x5e8 [ 31.482122] kasan_report+0xdc/0x128 [ 31.482174] __asan_report_load4_noabort+0x20/0x30 [ 31.482233] rcu_uaf_reclaim+0x64/0x70 [ 31.482283] rcu_core+0x9f4/0x1e58 [ 31.482340] rcu_core_si+0x18/0x30 [ 31.482388] handle_softirqs+0x374/0xb28 [ 31.482546] __do_softirq+0x1c/0x28 [ 31.482588] ____do_softirq+0x18/0x30 [ 31.482632] call_on_irq_stack+0x30/0x48 [ 31.484953] do_softirq_own_stack+0x24/0x38 [ 31.485025] __irq_exit_rcu+0x1fc/0x318 [ 31.485071] irq_exit_rcu+0x1c/0x80 [ 31.485114] el1_interrupt+0x38/0x58 [ 31.485162] el1h_64_irq_handler+0x18/0x28 [ 31.485206] el1h_64_irq+0x6c/0x70 [ 31.485303] arch_local_irq_enable+0x4/0x8 (P) [ 31.485352] do_idle+0x384/0x4e8 [ 31.485396] cpu_startup_entry+0x64/0x80 [ 31.485440] rest_init+0x160/0x188 [ 31.485485] start_kernel+0x30c/0x3d0 [ 31.485535] __primary_switched+0x8c/0xa0 [ 31.485587] [ 31.485606] Allocated by task 231: [ 31.485637] kasan_save_stack+0x3c/0x68 [ 31.485681] kasan_save_track+0x20/0x40 [ 31.485718] kasan_save_alloc_info+0x40/0x58 [ 31.485754] __kasan_kmalloc+0xd4/0xd8 [ 31.485789] __kmalloc_cache_noprof+0x16c/0x3c0 [ 31.485830] rcu_uaf+0xb0/0x2d8 [ 31.485865] kunit_try_run_case+0x170/0x3f0 [ 31.485926] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.485972] kthread+0x328/0x630 [ 31.486088] ret_from_fork+0x10/0x20 [ 31.486179] [ 31.486266] Freed by task 0: [ 31.486323] kasan_save_stack+0x3c/0x68 [ 31.486384] kasan_save_track+0x20/0x40 [ 31.486425] kasan_save_free_info+0x4c/0x78 [ 31.486464] __kasan_slab_free+0x6c/0x98 [ 31.486500] kfree+0x214/0x3c8 [ 31.486537] rcu_uaf_reclaim+0x28/0x70 [ 31.486577] rcu_core+0x9f4/0x1e58 [ 31.486613] rcu_core_si+0x18/0x30 [ 31.486648] handle_softirqs+0x374/0xb28 [ 31.486686] __do_softirq+0x1c/0x28 [ 31.486723] [ 31.486744] Last potentially related work creation: [ 31.486770] kasan_save_stack+0x3c/0x68 [ 31.486807] kasan_record_aux_stack+0xb4/0xc8 [ 31.486846] __call_rcu_common.constprop.0+0x74/0x8c8 [ 31.486888] call_rcu+0x18/0x30 [ 31.486934] rcu_uaf+0x14c/0x2d8 [ 31.486968] kunit_try_run_case+0x170/0x3f0 [ 31.487007] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.487050] kthread+0x328/0x630 [ 31.487083] ret_from_fork+0x10/0x20 [ 31.487117] [ 31.487138] The buggy address belongs to the object at fff00000c9a6bd80 [ 31.487138] which belongs to the cache kmalloc-32 of size 32 [ 31.487198] The buggy address is located 0 bytes inside of [ 31.487198] freed 32-byte region [fff00000c9a6bd80, fff00000c9a6bda0) [ 31.487259] [ 31.487280] The buggy address belongs to the physical page: [ 31.487322] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a6b [ 31.487380] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 31.487433] page_type: f5(slab) [ 31.487474] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 31.487524] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 31.487566] page dumped because: kasan: bad access detected [ 31.487595] [ 31.487613] Memory state around the buggy address: [ 31.487645] fff00000c9a6bc80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc [ 31.487688] fff00000c9a6bd00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 31.487731] >fff00000c9a6bd80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 31.487770] ^ [ 31.487797] fff00000c9a6be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.487839] fff00000c9a6be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 31.487876] ==================================================================
[ 25.764484] ================================================================== [ 25.764951] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 25.765331] Read of size 4 at addr ffff8881055e4900 by task swapper/1/0 [ 25.765654] [ 25.765802] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G B N 6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) [ 25.765852] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.765864] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.765886] Call Trace: [ 25.765914] <IRQ> [ 25.765934] dump_stack_lvl+0x73/0xb0 [ 25.765968] print_report+0xd1/0x640 [ 25.766015] ? __virt_addr_valid+0x1db/0x2d0 [ 25.766042] ? rcu_uaf_reclaim+0x50/0x60 [ 25.766063] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.766089] ? rcu_uaf_reclaim+0x50/0x60 [ 25.766109] kasan_report+0x141/0x180 [ 25.766131] ? rcu_uaf_reclaim+0x50/0x60 [ 25.766166] __asan_report_load4_noabort+0x18/0x20 [ 25.766211] rcu_uaf_reclaim+0x50/0x60 [ 25.766232] rcu_core+0x66f/0x1c40 [ 25.766262] ? __pfx_rcu_core+0x10/0x10 [ 25.766283] ? ktime_get+0x6b/0x150 [ 25.766307] ? handle_softirqs+0x18e/0x730 [ 25.766332] rcu_core_si+0x12/0x20 [ 25.766352] handle_softirqs+0x209/0x730 [ 25.766455] ? hrtimer_interrupt+0x2fe/0x780 [ 25.766491] ? __pfx_handle_softirqs+0x10/0x10 [ 25.766517] __irq_exit_rcu+0xc9/0x110 [ 25.766538] irq_exit_rcu+0x12/0x20 [ 25.766581] sysvec_apic_timer_interrupt+0x81/0x90 [ 25.766607] </IRQ> [ 25.766637] <TASK> [ 25.766648] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 25.766741] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 25.766990] 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 93 15 00 fb f4 <e9> bc 2a 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 [ 25.767073] RSP: 0000:ffff88810087fdc8 EFLAGS: 00010212 [ 25.767176] RAX: ffff8881c870d000 RBX: ffff88810085b000 RCX: ffffffff905329a5 [ 25.767224] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 000000000001dd4c [ 25.767268] RBP: ffff88810087fdd0 R08: 0000000000000001 R09: ffffed102b626192 [ 25.767312] R10: ffff88815b130c93 R11: ffff88815b1363c8 R12: 0000000000000001 [ 25.767356] R13: ffffed102010b600 R14: ffffffff921ff2d0 R15: 0000000000000000 [ 25.767416] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 25.767471] ? default_idle+0xd/0x20 [ 25.767493] arch_cpu_idle+0xd/0x20 [ 25.767514] default_idle_call+0x48/0x80 [ 25.767535] do_idle+0x379/0x4f0 [ 25.767561] ? __pfx_do_idle+0x10/0x10 [ 25.767583] ? _raw_spin_unlock_irqrestore+0x49/0x90 [ 25.767609] ? complete+0x15b/0x1d0 [ 25.767640] cpu_startup_entry+0x5c/0x70 [ 25.767664] start_secondary+0x211/0x290 [ 25.767687] ? __pfx_start_secondary+0x10/0x10 [ 25.767713] common_startup_64+0x13e/0x148 [ 25.767746] </TASK> [ 25.767757] [ 25.783736] Allocated by task 247: [ 25.783913] kasan_save_stack+0x45/0x70 [ 25.784526] kasan_save_track+0x18/0x40 [ 25.784833] kasan_save_alloc_info+0x3b/0x50 [ 25.785209] __kasan_kmalloc+0xb7/0xc0 [ 25.785599] __kmalloc_cache_noprof+0x189/0x420 [ 25.785818] rcu_uaf+0xb0/0x330 [ 25.786188] kunit_try_run_case+0x1a5/0x480 [ 25.786622] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.786880] kthread+0x337/0x6f0 [ 25.787261] ret_from_fork+0x116/0x1d0 [ 25.787448] ret_from_fork_asm+0x1a/0x30 [ 25.787641] [ 25.787726] Freed by task 0: [ 25.787857] kasan_save_stack+0x45/0x70 [ 25.788612] kasan_save_track+0x18/0x40 [ 25.788807] kasan_save_free_info+0x3f/0x60 [ 25.789071] __kasan_slab_free+0x56/0x70 [ 25.789258] kfree+0x222/0x3f0 [ 25.789752] rcu_uaf_reclaim+0x1f/0x60 [ 25.790085] rcu_core+0x66f/0x1c40 [ 25.790280] rcu_core_si+0x12/0x20 [ 25.790522] handle_softirqs+0x209/0x730 [ 25.790709] __irq_exit_rcu+0xc9/0x110 [ 25.790872] irq_exit_rcu+0x12/0x20 [ 25.791165] sysvec_apic_timer_interrupt+0x81/0x90 [ 25.791914] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 25.792246] [ 25.792640] Last potentially related work creation: [ 25.792948] kasan_save_stack+0x45/0x70 [ 25.793277] kasan_record_aux_stack+0xb2/0xc0 [ 25.793703] __call_rcu_common.constprop.0+0x7b/0x9e0 [ 25.793921] call_rcu+0x12/0x20 [ 25.794353] rcu_uaf+0x168/0x330 [ 25.794755] kunit_try_run_case+0x1a5/0x480 [ 25.795107] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.795361] kthread+0x337/0x6f0 [ 25.795874] ret_from_fork+0x116/0x1d0 [ 25.796200] ret_from_fork_asm+0x1a/0x30 [ 25.796680] [ 25.796809] The buggy address belongs to the object at ffff8881055e4900 [ 25.796809] which belongs to the cache kmalloc-32 of size 32 [ 25.797699] The buggy address is located 0 bytes inside of [ 25.797699] freed 32-byte region [ffff8881055e4900, ffff8881055e4920) [ 25.798762] [ 25.799044] The buggy address belongs to the physical page: [ 25.799842] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1055e4 [ 25.800214] flags: 0x200000000000000(node=0|zone=2) [ 25.800509] page_type: f5(slab) [ 25.800663] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 25.801256] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 25.801939] page dumped because: kasan: bad access detected [ 25.802338] [ 25.802524] Memory state around the buggy address: [ 25.802738] ffff8881055e4800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 25.803308] ffff8881055e4880: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 25.804376] >ffff8881055e4900: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 25.804737] ^ [ 25.804896] ffff8881055e4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.805691] ffff8881055e4a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.806278] ==================================================================