Date
July 22, 2025, 2:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.483261] ================================================================== [ 18.483391] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 18.483471] Read of size 1 at addr fff00000c6f99000 by task kunit_try_catch/215 [ 18.483524] [ 18.483568] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT [ 18.483652] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.483679] Hardware name: linux,dummy-virt (DT) [ 18.483713] Call trace: [ 18.483737] show_stack+0x20/0x38 (C) [ 18.483788] dump_stack_lvl+0x8c/0xd0 [ 18.483841] print_report+0x118/0x5d0 [ 18.483885] kasan_report+0xdc/0x128 [ 18.483929] __asan_report_load1_noabort+0x20/0x30 [ 18.483979] kmem_cache_rcu_uaf+0x388/0x468 [ 18.484026] kunit_try_run_case+0x170/0x3f0 [ 18.484080] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.484129] kthread+0x328/0x630 [ 18.484177] ret_from_fork+0x10/0x20 [ 18.484226] [ 18.484245] Allocated by task 215: [ 18.484277] kasan_save_stack+0x3c/0x68 [ 18.484329] kasan_save_track+0x20/0x40 [ 18.484365] kasan_save_alloc_info+0x40/0x58 [ 18.484403] __kasan_slab_alloc+0xa8/0xb0 [ 18.484439] kmem_cache_alloc_noprof+0x10c/0x398 [ 18.484479] kmem_cache_rcu_uaf+0x12c/0x468 [ 18.484519] kunit_try_run_case+0x170/0x3f0 [ 18.484557] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.484599] kthread+0x328/0x630 [ 18.484635] ret_from_fork+0x10/0x20 [ 18.484670] [ 18.484688] Freed by task 0: [ 18.484715] kasan_save_stack+0x3c/0x68 [ 18.484753] kasan_save_track+0x20/0x40 [ 18.484788] kasan_save_free_info+0x4c/0x78 [ 18.484826] __kasan_slab_free+0x6c/0x98 [ 18.484861] slab_free_after_rcu_debug+0xd4/0x2f8 [ 18.484898] rcu_core+0x9f4/0x1e20 [ 18.484935] rcu_core_si+0x18/0x30 [ 18.484968] handle_softirqs+0x374/0xb28 [ 18.485005] __do_softirq+0x1c/0x28 [ 18.485038] [ 18.485058] Last potentially related work creation: [ 18.485086] kasan_save_stack+0x3c/0x68 [ 18.485122] kasan_record_aux_stack+0xb4/0xc8 [ 18.485159] kmem_cache_free+0x120/0x468 [ 18.485195] kmem_cache_rcu_uaf+0x16c/0x468 [ 18.485233] kunit_try_run_case+0x170/0x3f0 [ 18.485272] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.485321] kthread+0x328/0x630 [ 18.485355] ret_from_fork+0x10/0x20 [ 18.485389] [ 18.485408] The buggy address belongs to the object at fff00000c6f99000 [ 18.485408] which belongs to the cache test_cache of size 200 [ 18.485470] The buggy address is located 0 bytes inside of [ 18.485470] freed 200-byte region [fff00000c6f99000, fff00000c6f990c8) [ 18.485532] [ 18.485555] The buggy address belongs to the physical page: [ 18.485587] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106f99 [ 18.485642] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.485695] page_type: f5(slab) [ 18.485735] raw: 0bfffe0000000000 fff00000c1bdf780 dead000000000122 0000000000000000 [ 18.485786] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.485826] page dumped because: kasan: bad access detected [ 18.485857] [ 18.485875] Memory state around the buggy address: [ 18.485908] fff00000c6f98f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 18.485950] fff00000c6f98f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 18.485993] >fff00000c6f99000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.486030] ^ [ 18.486056] fff00000c6f99080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 18.486098] fff00000c6f99100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.486138] ==================================================================
[ 11.921098] ================================================================== [ 11.921878] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.922406] Read of size 1 at addr ffff8881028c4000 by task kunit_try_catch/233 [ 11.922695] [ 11.922792] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT(voluntary) [ 11.922839] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.922850] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.922873] Call Trace: [ 11.922888] <TASK> [ 11.922907] dump_stack_lvl+0x73/0xb0 [ 11.922936] print_report+0xd1/0x610 [ 11.922961] ? __virt_addr_valid+0x1db/0x2d0 [ 11.922984] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.923003] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.923026] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.923072] kasan_report+0x141/0x180 [ 11.923096] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.923121] __asan_report_load1_noabort+0x18/0x20 [ 11.923141] kmem_cache_rcu_uaf+0x3e3/0x510 [ 11.923161] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 11.923180] ? finish_task_switch.isra.0+0x153/0x700 [ 11.923205] ? __switch_to+0x5d9/0xf60 [ 11.923238] ? dequeue_task_fair+0x166/0x4e0 [ 11.923282] ? __pfx_read_tsc+0x10/0x10 [ 11.923324] ? ktime_get_ts64+0x86/0x230 [ 11.923350] kunit_try_run_case+0x1a5/0x480 [ 11.923383] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.923402] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.923424] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.923448] ? __kthread_parkme+0x82/0x180 [ 11.923471] ? preempt_count_sub+0x50/0x80 [ 11.923512] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.923532] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.923555] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.923578] kthread+0x337/0x6f0 [ 11.923595] ? trace_preempt_on+0x20/0xc0 [ 11.923619] ? __pfx_kthread+0x10/0x10 [ 11.923637] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.923659] ? calculate_sigpending+0x7b/0xa0 [ 11.923864] ? __pfx_kthread+0x10/0x10 [ 11.923886] ret_from_fork+0x41/0x80 [ 11.923908] ? __pfx_kthread+0x10/0x10 [ 11.923926] ret_from_fork_asm+0x1a/0x30 [ 11.923956] </TASK> [ 11.923968] [ 11.935119] Allocated by task 233: [ 11.935320] kasan_save_stack+0x45/0x70 [ 11.936175] kasan_save_track+0x18/0x40 [ 11.936380] kasan_save_alloc_info+0x3b/0x50 [ 11.936553] __kasan_slab_alloc+0x91/0xa0 [ 11.937020] kmem_cache_alloc_noprof+0x123/0x3f0 [ 11.937532] kmem_cache_rcu_uaf+0x155/0x510 [ 11.937811] kunit_try_run_case+0x1a5/0x480 [ 11.938033] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.938488] kthread+0x337/0x6f0 [ 11.938787] ret_from_fork+0x41/0x80 [ 11.939081] ret_from_fork_asm+0x1a/0x30 [ 11.939250] [ 11.939543] Freed by task 0: [ 11.939790] kasan_save_stack+0x45/0x70 [ 11.939948] kasan_save_track+0x18/0x40 [ 11.940380] kasan_save_free_info+0x3f/0x60 [ 11.940615] __kasan_slab_free+0x56/0x70 [ 11.940956] slab_free_after_rcu_debug+0xe4/0x310 [ 11.941199] rcu_core+0x66c/0x1c30 [ 11.941349] rcu_core_si+0x12/0x20 [ 11.941553] handle_softirqs+0x209/0x730 [ 11.941898] __irq_exit_rcu+0xc9/0x110 [ 11.942296] irq_exit_rcu+0x12/0x20 [ 11.942508] sysvec_apic_timer_interrupt+0x81/0x90 [ 11.942930] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 11.943198] [ 11.943298] Last potentially related work creation: [ 11.943654] kasan_save_stack+0x45/0x70 [ 11.944119] kasan_record_aux_stack+0xb2/0xc0 [ 11.944461] kmem_cache_free+0x131/0x420 [ 11.944641] kmem_cache_rcu_uaf+0x194/0x510 [ 11.945288] kunit_try_run_case+0x1a5/0x480 [ 11.945549] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.945880] kthread+0x337/0x6f0 [ 11.946009] ret_from_fork+0x41/0x80 [ 11.946193] ret_from_fork_asm+0x1a/0x30 [ 11.946373] [ 11.946444] The buggy address belongs to the object at ffff8881028c4000 [ 11.946444] which belongs to the cache test_cache of size 200 [ 11.946985] The buggy address is located 0 bytes inside of [ 11.946985] freed 200-byte region [ffff8881028c4000, ffff8881028c40c8) [ 11.947448] [ 11.947534] The buggy address belongs to the physical page: [ 11.947814] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028c4 [ 11.948099] flags: 0x200000000000000(node=0|zone=2) [ 11.948336] page_type: f5(slab) [ 11.948636] raw: 0200000000000000 ffff888101db3500 dead000000000122 0000000000000000 [ 11.949093] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 11.949446] page dumped because: kasan: bad access detected [ 11.949699] [ 11.949776] Memory state around the buggy address: [ 11.949965] ffff8881028c3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.950293] ffff8881028c3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.950628] >ffff8881028c4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.950863] ^ [ 11.950978] ffff8881028c4080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 11.951303] ffff8881028c4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.951578] ==================================================================