Date
June 23, 2025, 1:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 26.393543] ================================================================== [ 26.393726] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468 [ 26.393885] Read of size 1 at addr fff00000c64ba000 by task kunit_try_catch/215 [ 26.394004] [ 26.394089] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT [ 26.394284] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.394347] Hardware name: linux,dummy-virt (DT) [ 26.394920] Call trace: [ 26.395354] show_stack+0x20/0x38 (C) [ 26.395607] dump_stack_lvl+0x8c/0xd0 [ 26.395940] print_report+0x118/0x608 [ 26.396081] kasan_report+0xdc/0x128 [ 26.396219] __asan_report_load1_noabort+0x20/0x30 [ 26.396606] kmem_cache_rcu_uaf+0x388/0x468 [ 26.396856] kunit_try_run_case+0x170/0x3f0 [ 26.397008] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.397414] kthread+0x328/0x630 [ 26.397578] ret_from_fork+0x10/0x20 [ 26.398007] [ 26.398073] Allocated by task 215: [ 26.398573] kasan_save_stack+0x3c/0x68 [ 26.398755] kasan_save_track+0x20/0x40 [ 26.398918] kasan_save_alloc_info+0x40/0x58 [ 26.399133] __kasan_slab_alloc+0xa8/0xb0 [ 26.399235] kmem_cache_alloc_noprof+0x10c/0x398 [ 26.399768] kmem_cache_rcu_uaf+0x12c/0x468 [ 26.399953] kunit_try_run_case+0x170/0x3f0 [ 26.400107] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.400237] kthread+0x328/0x630 [ 26.400455] ret_from_fork+0x10/0x20 [ 26.400757] [ 26.401087] Freed by task 0: [ 26.401267] kasan_save_stack+0x3c/0x68 [ 26.401637] kasan_save_track+0x20/0x40 [ 26.401739] kasan_save_free_info+0x4c/0x78 [ 26.401833] __kasan_slab_free+0x6c/0x98 [ 26.401922] slab_free_after_rcu_debug+0xd4/0x2f8 [ 26.402014] rcu_core+0x9f4/0x1e20 [ 26.402103] rcu_core_si+0x18/0x30 [ 26.402184] handle_softirqs+0x374/0xb28 [ 26.402278] __do_softirq+0x1c/0x28 [ 26.402365] [ 26.403077] Last potentially related work creation: [ 26.403151] kasan_save_stack+0x3c/0x68 [ 26.404261] kasan_record_aux_stack+0xb4/0xc8 [ 26.404380] kmem_cache_free+0x120/0x468 [ 26.404505] kmem_cache_rcu_uaf+0x16c/0x468 [ 26.404621] kunit_try_run_case+0x170/0x3f0 [ 26.404727] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.404840] kthread+0x328/0x630 [ 26.405268] ret_from_fork+0x10/0x20 [ 26.405492] [ 26.405571] The buggy address belongs to the object at fff00000c64ba000 [ 26.405571] which belongs to the cache test_cache of size 200 [ 26.406050] The buggy address is located 0 bytes inside of [ 26.406050] freed 200-byte region [fff00000c64ba000, fff00000c64ba0c8) [ 26.406585] [ 26.406790] The buggy address belongs to the physical page: [ 26.406895] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064ba [ 26.407469] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.407696] page_type: f5(slab) [ 26.407817] raw: 0bfffe0000000000 fff00000c59ebdc0 dead000000000122 0000000000000000 [ 26.407939] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 26.408036] page dumped because: kasan: bad access detected [ 26.408113] [ 26.408156] Memory state around the buggy address: [ 26.408230] fff00000c64b9f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 26.408351] fff00000c64b9f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff [ 26.408498] >fff00000c64ba000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 26.408589] ^ [ 26.408657] fff00000c64ba080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 26.408770] fff00000c64ba100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.408862] ==================================================================
[ 18.520031] ================================================================== [ 18.520748] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510 [ 18.521473] Read of size 1 at addr ffff88810a085000 by task kunit_try_catch/234 [ 18.522068] [ 18.522403] CPU: 1 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc1 #1 PREEMPT(voluntary) [ 18.522573] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.522624] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 18.522684] Call Trace: [ 18.522731] <TASK> [ 18.522783] dump_stack_lvl+0x73/0xb0 [ 18.522903] print_report+0xd1/0x650 [ 18.522982] ? __virt_addr_valid+0x1db/0x2d0 [ 18.523057] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 18.523123] ? kasan_complete_mode_report_info+0x64/0x200 [ 18.523237] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 18.523310] kasan_report+0x141/0x180 [ 18.523383] ? kmem_cache_rcu_uaf+0x3e3/0x510 [ 18.523427] __asan_report_load1_noabort+0x18/0x20 [ 18.523459] kmem_cache_rcu_uaf+0x3e3/0x510 [ 18.523488] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 18.523515] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 18.523601] ? __pfx_kmem_cache_rcu_uaf+0x10/0x10 [ 18.523698] kunit_try_run_case+0x1a5/0x480 [ 18.523827] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.523901] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 18.523978] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 18.524056] ? __kthread_parkme+0x82/0x180 [ 18.524173] ? preempt_count_sub+0x50/0x80 [ 18.524257] ? __pfx_kunit_try_run_case+0x10/0x10 [ 18.524331] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.524391] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 18.524426] kthread+0x337/0x6f0 [ 18.524451] ? trace_preempt_on+0x20/0xc0 [ 18.524486] ? __pfx_kthread+0x10/0x10 [ 18.524510] ? _raw_spin_unlock_irq+0x47/0x80 [ 18.524540] ? calculate_sigpending+0x7b/0xa0 [ 18.524864] ? __pfx_kthread+0x10/0x10 [ 18.524895] ret_from_fork+0x41/0x80 [ 18.524929] ? __pfx_kthread+0x10/0x10 [ 18.524954] ret_from_fork_asm+0x1a/0x30 [ 18.524997] </TASK> [ 18.525011] [ 18.542644] Allocated by task 234: [ 18.543502] kasan_save_stack+0x45/0x70 [ 18.544084] kasan_save_track+0x18/0x40 [ 18.544696] kasan_save_alloc_info+0x3b/0x50 [ 18.545190] __kasan_slab_alloc+0x91/0xa0 [ 18.545672] kmem_cache_alloc_noprof+0x123/0x3f0 [ 18.546099] kmem_cache_rcu_uaf+0x155/0x510 [ 18.546530] kunit_try_run_case+0x1a5/0x480 [ 18.546976] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.547547] kthread+0x337/0x6f0 [ 18.548021] ret_from_fork+0x41/0x80 [ 18.548624] ret_from_fork_asm+0x1a/0x30 [ 18.549301] [ 18.549654] Freed by task 0: [ 18.550290] kasan_save_stack+0x45/0x70 [ 18.550835] kasan_save_track+0x18/0x40 [ 18.551428] kasan_save_free_info+0x3f/0x60 [ 18.551741] __kasan_slab_free+0x56/0x70 [ 18.552129] slab_free_after_rcu_debug+0xe4/0x310 [ 18.552982] rcu_core+0x66c/0x1c30 [ 18.553384] rcu_core_si+0x12/0x20 [ 18.553723] handle_softirqs+0x209/0x730 [ 18.554148] __irq_exit_rcu+0xc9/0x110 [ 18.554655] irq_exit_rcu+0x12/0x20 [ 18.555486] sysvec_apic_timer_interrupt+0x81/0x90 [ 18.556011] asm_sysvec_apic_timer_interrupt+0x1f/0x30 [ 18.556475] [ 18.556690] Last potentially related work creation: [ 18.557176] kasan_save_stack+0x45/0x70 [ 18.557643] kasan_record_aux_stack+0xb2/0xc0 [ 18.558321] kmem_cache_free+0x131/0x420 [ 18.558724] kmem_cache_rcu_uaf+0x194/0x510 [ 18.559216] kunit_try_run_case+0x1a5/0x480 [ 18.559633] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 18.560123] kthread+0x337/0x6f0 [ 18.560463] ret_from_fork+0x41/0x80 [ 18.560902] ret_from_fork_asm+0x1a/0x30 [ 18.561590] [ 18.562363] The buggy address belongs to the object at ffff88810a085000 [ 18.562363] which belongs to the cache test_cache of size 200 [ 18.563218] The buggy address is located 0 bytes inside of [ 18.563218] freed 200-byte region [ffff88810a085000, ffff88810a0850c8) [ 18.564030] [ 18.564262] The buggy address belongs to the physical page: [ 18.565156] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a085 [ 18.565790] flags: 0x200000000000000(node=0|zone=2) [ 18.566257] page_type: f5(slab) [ 18.566765] raw: 0200000000000000 ffff888101611a00 dead000000000122 0000000000000000 [ 18.567584] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000 [ 18.568158] page dumped because: kasan: bad access detected [ 18.568767] [ 18.568970] Memory state around the buggy address: [ 18.569344] ffff88810a084f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.570452] ffff88810a084f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.570985] >ffff88810a085000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.571541] ^ [ 18.571896] ffff88810a085080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc [ 18.572495] ffff88810a085100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.573055] ==================================================================