Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.880758] ================================================================== [ 19.880943] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 19.881113] Read of size 1 at addr fff00000c667a228 by task kunit_try_catch/188 [ 19.881224] [ 19.881380] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.881587] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.881653] Hardware name: linux,dummy-virt (DT) [ 19.881780] Call trace: [ 19.881841] show_stack+0x20/0x38 (C) [ 19.882003] dump_stack_lvl+0x8c/0xd0 [ 19.882159] print_report+0x118/0x608 [ 19.882254] kasan_report+0xdc/0x128 [ 19.882344] __asan_report_load1_noabort+0x20/0x30 [ 19.882455] kmalloc_uaf2+0x3f4/0x468 [ 19.882595] kunit_try_run_case+0x170/0x3f0 [ 19.882712] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.882857] kthread+0x328/0x630 [ 19.882975] ret_from_fork+0x10/0x20 [ 19.883157] [ 19.883257] Allocated by task 188: [ 19.883334] kasan_save_stack+0x3c/0x68 [ 19.883450] kasan_save_track+0x20/0x40 [ 19.883548] kasan_save_alloc_info+0x40/0x58 [ 19.883662] __kasan_kmalloc+0xd4/0xd8 [ 19.883744] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.883850] kmalloc_uaf2+0xc4/0x468 [ 19.883931] kunit_try_run_case+0x170/0x3f0 [ 19.884010] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.884163] kthread+0x328/0x630 [ 19.884277] ret_from_fork+0x10/0x20 [ 19.884372] [ 19.884429] Freed by task 188: [ 19.884501] kasan_save_stack+0x3c/0x68 [ 19.884614] kasan_save_track+0x20/0x40 [ 19.884706] kasan_save_free_info+0x4c/0x78 [ 19.884796] __kasan_slab_free+0x6c/0x98 [ 19.884881] kfree+0x214/0x3c8 [ 19.884961] kmalloc_uaf2+0x134/0x468 [ 19.885066] kunit_try_run_case+0x170/0x3f0 [ 19.885148] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.885241] kthread+0x328/0x630 [ 19.885329] ret_from_fork+0x10/0x20 [ 19.885417] [ 19.885480] The buggy address belongs to the object at fff00000c667a200 [ 19.885480] which belongs to the cache kmalloc-64 of size 64 [ 19.885638] The buggy address is located 40 bytes inside of [ 19.885638] freed 64-byte region [fff00000c667a200, fff00000c667a240) [ 19.885780] [ 19.885830] The buggy address belongs to the physical page: [ 19.885927] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10667a [ 19.886103] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.886284] page_type: f5(slab) [ 19.886394] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 19.886513] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 19.886595] page dumped because: kasan: bad access detected [ 19.886651] [ 19.886706] Memory state around the buggy address: [ 19.886771] fff00000c667a100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 19.886866] fff00000c667a180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 19.886964] >fff00000c667a200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 19.887078] ^ [ 19.887153] fff00000c667a280: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 19.887244] fff00000c667a300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.887358] ==================================================================
[ 11.864593] ================================================================== [ 11.865476] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 11.866048] Read of size 1 at addr ffff8881027afe28 by task kunit_try_catch/205 [ 11.866939] [ 11.867054] CPU: 1 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.867099] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.867110] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.867167] Call Trace: [ 11.867179] <TASK> [ 11.867193] dump_stack_lvl+0x73/0xb0 [ 11.867221] print_report+0xd1/0x650 [ 11.867242] ? __virt_addr_valid+0x1db/0x2d0 [ 11.867264] ? kmalloc_uaf2+0x4a8/0x520 [ 11.867282] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.867324] ? kmalloc_uaf2+0x4a8/0x520 [ 11.867344] kasan_report+0x141/0x180 [ 11.867365] ? kmalloc_uaf2+0x4a8/0x520 [ 11.867388] __asan_report_load1_noabort+0x18/0x20 [ 11.867411] kmalloc_uaf2+0x4a8/0x520 [ 11.867430] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 11.867448] ? finish_task_switch.isra.0+0x153/0x700 [ 11.867470] ? __switch_to+0x47/0xf50 [ 11.867495] ? __schedule+0x10cc/0x2b60 [ 11.867516] ? __pfx_read_tsc+0x10/0x10 [ 11.867535] ? ktime_get_ts64+0x86/0x230 [ 11.867599] kunit_try_run_case+0x1a5/0x480 [ 11.867622] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.867654] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.867676] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.867697] ? __kthread_parkme+0x82/0x180 [ 11.867716] ? preempt_count_sub+0x50/0x80 [ 11.867737] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.867759] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.867780] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.867801] kthread+0x337/0x6f0 [ 11.867819] ? trace_preempt_on+0x20/0xc0 [ 11.867840] ? __pfx_kthread+0x10/0x10 [ 11.867859] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.867878] ? calculate_sigpending+0x7b/0xa0 [ 11.867900] ? __pfx_kthread+0x10/0x10 [ 11.867920] ret_from_fork+0x116/0x1d0 [ 11.867937] ? __pfx_kthread+0x10/0x10 [ 11.867955] ret_from_fork_asm+0x1a/0x30 [ 11.867984] </TASK> [ 11.867995] [ 11.878077] Allocated by task 205: [ 11.878597] kasan_save_stack+0x45/0x70 [ 11.878911] kasan_save_track+0x18/0x40 [ 11.879114] kasan_save_alloc_info+0x3b/0x50 [ 11.879579] __kasan_kmalloc+0xb7/0xc0 [ 11.879862] __kmalloc_cache_noprof+0x189/0x420 [ 11.880200] kmalloc_uaf2+0xc6/0x520 [ 11.880555] kunit_try_run_case+0x1a5/0x480 [ 11.880767] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.881009] kthread+0x337/0x6f0 [ 11.881423] ret_from_fork+0x116/0x1d0 [ 11.881604] ret_from_fork_asm+0x1a/0x30 [ 11.881951] [ 11.882030] Freed by task 205: [ 11.882434] kasan_save_stack+0x45/0x70 [ 11.882802] kasan_save_track+0x18/0x40 [ 11.882986] kasan_save_free_info+0x3f/0x60 [ 11.883221] __kasan_slab_free+0x56/0x70 [ 11.883406] kfree+0x222/0x3f0 [ 11.883566] kmalloc_uaf2+0x14c/0x520 [ 11.883738] kunit_try_run_case+0x1a5/0x480 [ 11.883944] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.884204] kthread+0x337/0x6f0 [ 11.884363] ret_from_fork+0x116/0x1d0 [ 11.884539] ret_from_fork_asm+0x1a/0x30 [ 11.884727] [ 11.884821] The buggy address belongs to the object at ffff8881027afe00 [ 11.884821] which belongs to the cache kmalloc-64 of size 64 [ 11.885967] The buggy address is located 40 bytes inside of [ 11.885967] freed 64-byte region [ffff8881027afe00, ffff8881027afe40) [ 11.886487] [ 11.886615] The buggy address belongs to the physical page: [ 11.887100] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027af [ 11.887575] flags: 0x200000000000000(node=0|zone=2) [ 11.887924] page_type: f5(slab) [ 11.888101] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.888623] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.888922] page dumped because: kasan: bad access detected [ 11.889445] [ 11.889543] Memory state around the buggy address: [ 11.889901] ffff8881027afd00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.890270] ffff8881027afd80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.890825] >ffff8881027afe00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.891276] ^ [ 11.891516] ffff8881027afe80: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 11.891737] ffff8881027aff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.893317] ==================================================================