Date
June 2, 2025, 2:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.470837] ================================================================== [ 19.471493] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70 [ 19.471952] Read of size 4 at addr fff00000c65c6d00 by task swapper/0/0 [ 19.472370] [ 19.472494] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.14.10-rc1 #1 [ 19.472585] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.472618] Hardware name: linux,dummy-virt (DT) [ 19.472686] Call trace: [ 19.472738] show_stack+0x20/0x38 (C) [ 19.472814] dump_stack_lvl+0x8c/0xd0 [ 19.472902] print_report+0x118/0x608 [ 19.472972] kasan_report+0xdc/0x128 [ 19.473023] __asan_report_load4_noabort+0x20/0x30 [ 19.473104] rcu_uaf_reclaim+0x64/0x70 [ 19.473168] rcu_core+0x9f4/0x1e20 [ 19.473224] rcu_core_si+0x18/0x30 [ 19.473271] handle_softirqs+0x374/0xb28 [ 19.473322] __do_softirq+0x1c/0x28 [ 19.473369] ____do_softirq+0x18/0x30 [ 19.473416] call_on_irq_stack+0x24/0x58 [ 19.473466] do_softirq_own_stack+0x24/0x38 [ 19.473532] __irq_exit_rcu+0x1fc/0x318 [ 19.473586] irq_exit_rcu+0x1c/0x80 [ 19.473633] el1_interrupt+0x38/0x58 [ 19.473686] el1h_64_irq_handler+0x18/0x28 [ 19.473740] el1h_64_irq+0x6c/0x70 [ 19.473854] arch_local_irq_enable+0x4/0x8 (P) [ 19.473917] do_idle+0x384/0x4e8 [ 19.473964] cpu_startup_entry+0x68/0x80 [ 19.474014] rest_init+0x160/0x188 [ 19.474060] start_kernel+0x308/0x3d0 [ 19.474140] __primary_switched+0x8c/0xa0 [ 19.474220] [ 19.480262] Allocated by task 188: [ 19.480535] kasan_save_stack+0x3c/0x68 [ 19.480892] kasan_save_track+0x20/0x40 [ 19.481253] kasan_save_alloc_info+0x40/0x58 [ 19.481586] __kasan_kmalloc+0xd4/0xd8 [ 19.481928] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.482194] rcu_uaf+0xb0/0x2d0 [ 19.482456] kunit_try_run_case+0x170/0x3f0 [ 19.482748] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.483172] kthread+0x318/0x620 [ 19.483385] ret_from_fork+0x10/0x20 [ 19.483626] [ 19.483822] Freed by task 0: [ 19.483980] kasan_save_stack+0x3c/0x68 [ 19.484299] kasan_save_track+0x20/0x40 [ 19.484638] kasan_save_free_info+0x4c/0x78 [ 19.484917] __kasan_slab_free+0x6c/0x98 [ 19.485222] kfree+0x214/0x3c8 [ 19.485530] rcu_uaf_reclaim+0x28/0x70 [ 19.485805] rcu_core+0x9f4/0x1e20 [ 19.486116] rcu_core_si+0x18/0x30 [ 19.486390] handle_softirqs+0x374/0xb28 [ 19.486645] __do_softirq+0x1c/0x28 [ 19.486915] [ 19.487115] Last potentially related work creation: [ 19.487421] kasan_save_stack+0x3c/0x68 [ 19.487680] kasan_record_aux_stack+0xb4/0xc8 [ 19.487945] __call_rcu_common.constprop.0+0x74/0xa10 [ 19.488186] call_rcu+0x18/0x30 [ 19.488421] rcu_uaf+0x14c/0x2d0 [ 19.488640] kunit_try_run_case+0x170/0x3f0 [ 19.488884] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.489146] kthread+0x318/0x620 [ 19.489465] ret_from_fork+0x10/0x20 [ 19.489644] [ 19.489766] The buggy address belongs to the object at fff00000c65c6d00 [ 19.489766] which belongs to the cache kmalloc-32 of size 32 [ 19.490681] The buggy address is located 0 bytes inside of [ 19.490681] freed 32-byte region [fff00000c65c6d00, fff00000c65c6d20) [ 19.491355] [ 19.491583] The buggy address belongs to the physical page: [ 19.491921] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065c6 [ 19.492434] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.492812] page_type: f5(slab) [ 19.493009] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 19.493392] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 19.493888] page dumped because: kasan: bad access detected [ 19.494196] [ 19.494401] Memory state around the buggy address: [ 19.494671] fff00000c65c6c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.495067] fff00000c65c6c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 19.495460] >fff00000c65c6d00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 19.495779] ^ [ 19.496003] fff00000c65c6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.496359] fff00000c65c6e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.496704] ==================================================================
[ 13.241675] ================================================================== [ 13.242121] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60 [ 13.242425] Read of size 4 at addr ffff888102a2aac0 by task swapper/0/0 [ 13.242708] [ 13.242836] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G B N 6.14.10-rc1 #1 [ 13.242876] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.242887] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.242917] Call Trace: [ 13.242942] <IRQ> [ 13.242959] dump_stack_lvl+0x73/0xb0 [ 13.243000] print_report+0xd1/0x650 [ 13.243034] ? __virt_addr_valid+0x1db/0x2d0 [ 13.243059] ? rcu_uaf_reclaim+0x50/0x60 [ 13.243090] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.243118] ? rcu_uaf_reclaim+0x50/0x60 [ 13.243140] kasan_report+0x140/0x180 [ 13.243175] ? rcu_uaf_reclaim+0x50/0x60 [ 13.243201] __asan_report_load4_noabort+0x18/0x20 [ 13.243227] rcu_uaf_reclaim+0x50/0x60 [ 13.243249] rcu_core+0x680/0x1d70 [ 13.243290] ? __pfx_rcu_core+0x10/0x10 [ 13.243322] rcu_core_si+0x12/0x20 [ 13.243355] handle_softirqs+0x209/0x730 [ 13.243381] ? hrtimer_interrupt+0x2fe/0x780 [ 13.243408] ? __pfx_handle_softirqs+0x10/0x10 [ 13.243438] __irq_exit_rcu+0xc9/0x110 [ 13.243462] irq_exit_rcu+0x12/0x20 [ 13.243486] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.243513] </IRQ> [ 13.243538] <TASK> [ 13.243548] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.243648] RIP: 0010:pv_native_safe_halt+0xf/0x20 [ 13.243759] 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 [ 13.243839] RSP: 0000:ffffffff99207de0 EFLAGS: 00010202 [ 13.243926] RAX: ffff88815b000000 RBX: ffffffff9921a600 RCX: ffffffff98171d35 [ 13.243971] RDX: ffffed102b606ae3 RSI: 0000000000000004 RDI: 0000000000011184 [ 13.244013] RBP: ffffffff99207de8 R08: 0000000000000001 R09: ffffed102b606ae2 [ 13.244067] R10: ffff88815b035713 R11: 000000000003a180 R12: 0000000000000000 [ 13.244108] R13: fffffbfff32434c0 R14: ffffffff99d80310 R15: 0000000000000000 [ 13.244164] ? ct_kernel_exit.constprop.0+0xa5/0xd0 [ 13.244216] ? default_idle+0xd/0x20 [ 13.244237] arch_cpu_idle+0xd/0x20 [ 13.244258] default_idle_call+0x48/0x80 [ 13.244280] do_idle+0x310/0x3c0 [ 13.244305] ? __pfx_do_idle+0x10/0x10 [ 13.244327] ? trace_preempt_on+0x20/0xc0 [ 13.244352] ? schedule+0x86/0x310 [ 13.244374] ? preempt_count_sub+0x50/0x80 [ 13.244401] cpu_startup_entry+0x5c/0x70 [ 13.244424] rest_init+0x11a/0x140 [ 13.244444] ? acpi_subsystem_init+0x5d/0x150 [ 13.244474] start_kernel+0x32b/0x410 [ 13.244501] x86_64_start_reservations+0x1c/0x30 [ 13.244527] x86_64_start_kernel+0xcf/0xe0 [ 13.244552] common_startup_64+0x12c/0x138 [ 13.244587] </TASK> [ 13.244598] [ 13.262345] Allocated by task 206: [ 13.262757] kasan_save_stack+0x45/0x70 [ 13.263250] kasan_save_track+0x18/0x40 [ 13.263426] kasan_save_alloc_info+0x3b/0x50 [ 13.263895] __kasan_kmalloc+0xb7/0xc0 [ 13.264265] __kmalloc_cache_noprof+0x18a/0x420 [ 13.264544] rcu_uaf+0xb1/0x330 [ 13.264660] kunit_try_run_case+0x1a6/0x480 [ 13.264803] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.264972] kthread+0x324/0x6e0 [ 13.265107] ret_from_fork+0x41/0x80 [ 13.265235] ret_from_fork_asm+0x1a/0x30 [ 13.265431] [ 13.265527] Freed by task 0: [ 13.265638] kasan_save_stack+0x45/0x70 [ 13.265854] kasan_save_track+0x18/0x40 [ 13.266109] kasan_save_free_info+0x3f/0x60 [ 13.266253] __kasan_slab_free+0x56/0x70 [ 13.266453] kfree+0x224/0x3f0 [ 13.266617] rcu_uaf_reclaim+0x1f/0x60 [ 13.266760] rcu_core+0x680/0x1d70 [ 13.266973] rcu_core_si+0x12/0x20 [ 13.267144] handle_softirqs+0x209/0x730 [ 13.267282] __irq_exit_rcu+0xc9/0x110 [ 13.267467] irq_exit_rcu+0x12/0x20 [ 13.267671] sysvec_apic_timer_interrupt+0x81/0x90 [ 13.268184] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 13.268371] [ 13.268461] Last potentially related work creation: [ 13.268938] kasan_save_stack+0x45/0x70 [ 13.269286] kasan_record_aux_stack+0xb2/0xc0 [ 13.269500] __call_rcu_common.constprop.0+0x72/0xaa0 [ 13.269919] call_rcu+0x12/0x20 [ 13.270223] rcu_uaf+0x169/0x330 [ 13.270383] kunit_try_run_case+0x1a6/0x480 [ 13.270765] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.271089] kthread+0x324/0x6e0 [ 13.271375] ret_from_fork+0x41/0x80 [ 13.271546] ret_from_fork_asm+0x1a/0x30 [ 13.271730] [ 13.271827] The buggy address belongs to the object at ffff888102a2aac0 [ 13.271827] which belongs to the cache kmalloc-32 of size 32 [ 13.272284] The buggy address is located 0 bytes inside of [ 13.272284] freed 32-byte region [ffff888102a2aac0, ffff888102a2aae0) [ 13.273215] [ 13.273465] The buggy address belongs to the physical page: [ 13.273811] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a2a [ 13.274482] flags: 0x200000000000000(node=0|zone=2) [ 13.274812] page_type: f5(slab) [ 13.275255] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.275747] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.276065] page dumped because: kasan: bad access detected [ 13.276280] [ 13.276364] Memory state around the buggy address: [ 13.276553] ffff888102a2a980: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 13.276830] ffff888102a2aa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.277116] >ffff888102a2aa80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.277399] ^ [ 13.278096] ffff888102a2ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.278444] ffff888102a2ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.278959] ==================================================================