Date
June 23, 2025, 7:07 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 34.333723] ================================================================== [ 34.333867] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 34.334016] Read of size 1 at addr fff00000c76cf000 by task kunit_try_catch/225 [ 34.334161] [ 34.334250] CPU: 1 UID: 0 PID: 225 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT [ 34.334466] Tainted: [B]=BAD_PAGE, [N]=TEST [ 34.334548] Hardware name: linux,dummy-virt (DT) [ 34.334681] Call trace: [ 34.335307] show_stack+0x20/0x38 (C) [ 34.335467] dump_stack_lvl+0x8c/0xd0 [ 34.335655] print_report+0x118/0x608 [ 34.335973] kasan_report+0xdc/0x128 [ 34.336147] __asan_report_load1_noabort+0x20/0x30 [ 34.336468] kmem_cache_rcu_uaf+0x388/0x468 [ 34.336662] kunit_try_run_case+0x170/0x3f0 [ 34.336796] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.336953] kthread+0x328/0x630 [ 34.337141] ret_from_fork+0x10/0x20 [ 34.337647] [ 34.337704] Allocated by task 225: [ 34.337881] kasan_save_stack+0x3c/0x68 [ 34.338398] kasan_save_track+0x20/0x40 [ 34.338591] kasan_save_alloc_info+0x40/0x58 [ 34.338819] __kasan_slab_alloc+0xa8/0xb0 [ 34.338961] kmem_cache_alloc_noprof+0x10c/0x398 [ 34.339240] kmem_cache_rcu_uaf+0x12c/0x468 [ 34.339413] kunit_try_run_case+0x170/0x3f0 [ 34.339520] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.339648] kthread+0x328/0x630 [ 34.339787] ret_from_fork+0x10/0x20 [ 34.339892] [ 34.339941] Freed by task 32: [ 34.340012] kasan_save_stack+0x3c/0x68 [ 34.340425] kasan_save_track+0x20/0x40 [ 34.340536] kasan_save_free_info+0x4c/0x78 [ 34.340638] __kasan_slab_free+0x6c/0x98 [ 34.340796] slab_free_after_rcu_debug+0xd4/0x2f8 [ 34.340998] rcu_core+0x9f4/0x1e20 [ 34.341126] rcu_core_si+0x18/0x30 [ 34.341237] handle_softirqs+0x374/0xb28 [ 34.341628] __do_softirq+0x1c/0x28 [ 34.342074] [ 34.342123] Last potentially related work creation: [ 34.342201] kasan_save_stack+0x3c/0x68 [ 34.342446] kasan_record_aux_stack+0xb4/0xc8 [ 34.342612] kmem_cache_free+0x120/0x468 [ 34.342775] kmem_cache_rcu_uaf+0x16c/0x468 [ 34.343060] kunit_try_run_case+0x170/0x3f0 [ 34.343173] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 34.343357] kthread+0x328/0x630 [ 34.343452] ret_from_fork+0x10/0x20 [ 34.343556] [ 34.343607] The buggy address belongs to the object at fff00000c76cf000 [ 34.343607] which belongs to the cache test_cache of size 200 [ 34.343753] The buggy address is located 0 bytes inside of [ 34.343753] freed 200-byte region [fff00000c76cf000, fff00000c76cf0c8) [ 34.344448] [ 34.344507] The buggy address belongs to the physical page: [ 34.344590] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076cf [ 34.344723] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 34.345183] page_type: f5(slab) [ 34.345530] raw: 0bfffe0000000000 fff00000c598f500 dead000000000122 0000000000000000 [ 34.345696] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 34.345796] page dumped because: kasan: bad access detected [ 34.345875] [ 34.345916] Memory state around the buggy address: [ 34.346019] fff00000c76cef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.346445] fff00000c76cef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.346573] >fff00000c76cf000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 34.346854] ^ [ 34.347076] fff00000c76cf080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 34.347189] fff00000c76cf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 34.347835] ==================================================================
[ 22.631525] ================================================================== [ 22.631953] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 22.632960] Read of size 1 at addr ffff8881023c7000 by task kunit_try_catch/242 [ 22.633519] [ 22.633800] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) [ 22.633884] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.633898] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.633921] Call Trace: [ 22.633937] <TASK> [ 22.633957] dump_stack_lvl+0x73/0xb0 [ 22.633994] print_report+0xd1/0x650 [ 22.634025] ? __virt_addr_valid+0x1db/0x2d0 [ 22.634053] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 22.634078] ? kasan_complete_mode_report_info+0x64/0x200 [ 22.634473] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 22.634513] kasan_report+0x141/0x180 [ 22.634542] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 22.634567] __asan_report_load1_noabort+0x18/0x20 [ 22.634589] kmem_cache_rcu_uaf+0x3e3/0x510 [ 22.634609] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 22.634628] ? finish_task_switch.isra.0+0x153/0x700 [ 22.634650] ? __switch_to+0x47/0xf50 [ 22.634676] ? __pfx_read_tsc+0x10/0x10 [ 22.634695] ? ktime_get_ts64+0x86/0x230 [ 22.634718] kunit_try_run_case+0x1a5/0x480 [ 22.634741] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.634760] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.634780] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.634800] ? __kthread_parkme+0x82/0x180 [ 22.634818] ? preempt_count_sub+0x50/0x80 [ 22.634869] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.634895] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.634916] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.634937] kthread+0x337/0x6f0 [ 22.634954] ? trace_preempt_on+0x20/0xc0 [ 22.634975] ? __pfx_kthread+0x10/0x10 [ 22.634993] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.635011] ? calculate_sigpending+0x7b/0xa0 [ 22.635033] ? __pfx_kthread+0x10/0x10 [ 22.635051] ret_from_fork+0x116/0x1d0 [ 22.635068] ? __pfx_kthread+0x10/0x10 [ 22.635116] ret_from_fork_asm+0x1a/0x30 [ 22.635166] </TASK> [ 22.635182] [ 22.645464] Allocated by task 242: [ 22.645735] kasan_save_stack+0x45/0x70 [ 22.646030] kasan_save_track+0x18/0x40 [ 22.646759] kasan_save_alloc_info+0x3b/0x50 [ 22.647309] __kasan_slab_alloc+0x91/0xa0 [ 22.647608] kmem_cache_alloc_noprof+0x123/0x3f0 [ 22.647944] kmem_cache_rcu_uaf+0x155/0x510 [ 22.648179] kunit_try_run_case+0x1a5/0x480 [ 22.648338] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.648858] kthread+0x337/0x6f0 [ 22.649251] ret_from_fork+0x116/0x1d0 [ 22.649588] ret_from_fork_asm+0x1a/0x30 [ 22.649885] [ 22.650052] Freed by task 0: [ 22.650594] kasan_save_stack+0x45/0x70 [ 22.650930] kasan_save_track+0x18/0x40 [ 22.651301] kasan_save_free_info+0x3f/0x60 [ 22.651629] __kasan_slab_free+0x56/0x70 [ 22.651939] slab_free_after_rcu_debug+0xe4/0x310 [ 22.652437] rcu_core+0x66f/0x1c40 [ 22.652667] rcu_core_si+0x12/0x20 [ 22.652812] handle_softirqs+0x209/0x730 [ 22.652993] __irq_exit_rcu+0xc9/0x110 [ 22.653359] irq_exit_rcu+0x12/0x20 [ 22.653629] sysvec_apic_timer_interrupt+0x81/0x90 [ 22.653977] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 22.654764] [ 22.654955] Last potentially related work creation: [ 22.655268] kasan_save_stack+0x45/0x70 [ 22.655675] kasan_record_aux_stack+0xb2/0xc0 [ 22.656037] kmem_cache_free+0x131/0x420 [ 22.656512] kmem_cache_rcu_uaf+0x194/0x510 [ 22.656727] kunit_try_run_case+0x1a5/0x480 [ 22.656977] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.657499] kthread+0x337/0x6f0 [ 22.657697] ret_from_fork+0x116/0x1d0 [ 22.657922] ret_from_fork_asm+0x1a/0x30 [ 22.658606] [ 22.658791] The buggy address belongs to the object at ffff8881023c7000 [ 22.658791] which belongs to the cache test_cache of size 200 [ 22.659576] The buggy address is located 0 bytes inside of [ 22.659576] freed 200-byte region [ffff8881023c7000, ffff8881023c70c8) [ 22.660346] [ 22.660553] The buggy address belongs to the physical page: [ 22.660942] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023c7 [ 22.661478] flags: 0x200000000000000(node=0|zone=2) [ 22.661887] page_type: f5(slab) [ 22.662617] raw: 0200000000000000 ffff8881023c4000 dead000000000122 0000000000000000 [ 22.663197] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 22.663571] page dumped because: kasan: bad access detected [ 22.663817] [ 22.663951] Memory state around the buggy address: [ 22.664562] ffff8881023c6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.664815] ffff8881023c6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.665578] >ffff8881023c7000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 22.666429] ^ [ 22.666678] ffff8881023c7080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 22.666921] ffff8881023c7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.667373] ==================================================================