Date
July 15, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.864806] ================================================================== [ 17.864868] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 17.865571] Read of size 16 at addr fff00000c45d8b20 by task kunit_try_catch/170 [ 17.865708] [ 17.865933] CPU: 0 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT [ 17.866451] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.866487] Hardware name: linux,dummy-virt (DT) [ 17.866520] Call trace: [ 17.866556] show_stack+0x20/0x38 (C) [ 17.866633] dump_stack_lvl+0x8c/0xd0 [ 17.866688] print_report+0x118/0x5d0 [ 17.866744] kasan_report+0xdc/0x128 [ 17.866788] __asan_report_load16_noabort+0x20/0x30 [ 17.866855] kmalloc_uaf_16+0x3bc/0x438 [ 17.866902] kunit_try_run_case+0x170/0x3f0 [ 17.866949] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.867013] kthread+0x328/0x630 [ 17.867059] ret_from_fork+0x10/0x20 [ 17.867124] [ 17.867143] Allocated by task 170: [ 17.867170] kasan_save_stack+0x3c/0x68 [ 17.867390] kasan_save_track+0x20/0x40 [ 17.867787] kasan_save_alloc_info+0x40/0x58 [ 17.867971] __kasan_kmalloc+0xd4/0xd8 [ 17.868305] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.868389] kmalloc_uaf_16+0x140/0x438 [ 17.868922] kunit_try_run_case+0x170/0x3f0 [ 17.869016] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.869353] kthread+0x328/0x630 [ 17.869447] ret_from_fork+0x10/0x20 [ 17.869532] [ 17.869700] Freed by task 170: [ 17.869728] kasan_save_stack+0x3c/0x68 [ 17.869939] kasan_save_track+0x20/0x40 [ 17.870024] kasan_save_free_info+0x4c/0x78 [ 17.870064] __kasan_slab_free+0x6c/0x98 [ 17.870100] kfree+0x214/0x3c8 [ 17.870132] kmalloc_uaf_16+0x190/0x438 [ 17.870170] kunit_try_run_case+0x170/0x3f0 [ 17.870218] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.870631] kthread+0x328/0x630 [ 17.870718] ret_from_fork+0x10/0x20 [ 17.870972] [ 17.871095] The buggy address belongs to the object at fff00000c45d8b20 [ 17.871095] which belongs to the cache kmalloc-16 of size 16 [ 17.871570] The buggy address is located 0 bytes inside of [ 17.871570] freed 16-byte region [fff00000c45d8b20, fff00000c45d8b30) [ 17.871694] [ 17.871753] The buggy address belongs to the physical page: [ 17.871785] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1045d8 [ 17.872019] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.872330] page_type: f5(slab) [ 17.872398] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.872787] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.872880] page dumped because: kasan: bad access detected [ 17.872961] [ 17.873152] Memory state around the buggy address: [ 17.873449] fff00000c45d8a00: fa fb fc fc fa fb fc fc 00 01 fc fc fa fb fc fc [ 17.873626] fff00000c45d8a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.873751] >fff00000c45d8b00: 00 00 fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 17.873793] ^ [ 17.873825] fff00000c45d8b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.873988] fff00000c45d8c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.874059] ==================================================================
[ 11.013409] ================================================================== [ 11.013929] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.014675] Read of size 16 at addr ffff8881027e7480 by task kunit_try_catch/187 [ 11.015465] [ 11.015568] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT(voluntary) [ 11.015643] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.015655] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.015674] Call Trace: [ 11.015685] <TASK> [ 11.015699] dump_stack_lvl+0x73/0xb0 [ 11.015725] print_report+0xd1/0x610 [ 11.015748] ? __virt_addr_valid+0x1db/0x2d0 [ 11.015769] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.015789] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.015810] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.015831] kasan_report+0x141/0x180 [ 11.015852] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.015889] __asan_report_load16_noabort+0x18/0x20 [ 11.015909] kmalloc_uaf_16+0x47b/0x4c0 [ 11.015930] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.015952] ? __schedule+0x10cc/0x2b60 [ 11.015974] ? __pfx_read_tsc+0x10/0x10 [ 11.015993] ? ktime_get_ts64+0x86/0x230 [ 11.016018] kunit_try_run_case+0x1a5/0x480 [ 11.016038] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.016056] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.016079] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.016102] ? __kthread_parkme+0x82/0x180 [ 11.016123] ? preempt_count_sub+0x50/0x80 [ 11.016147] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.016166] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.016188] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.016210] kthread+0x337/0x6f0 [ 11.016226] ? trace_preempt_on+0x20/0xc0 [ 11.016248] ? __pfx_kthread+0x10/0x10 [ 11.016265] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.016285] ? calculate_sigpending+0x7b/0xa0 [ 11.016306] ? __pfx_kthread+0x10/0x10 [ 11.016322] ret_from_fork+0x41/0x80 [ 11.016342] ? __pfx_kthread+0x10/0x10 [ 11.016358] ret_from_fork_asm+0x1a/0x30 [ 11.016388] </TASK> [ 11.016397] [ 11.029328] Allocated by task 187: [ 11.029470] kasan_save_stack+0x45/0x70 [ 11.029617] kasan_save_track+0x18/0x40 [ 11.030135] kasan_save_alloc_info+0x3b/0x50 [ 11.030650] __kasan_kmalloc+0xb7/0xc0 [ 11.031208] __kmalloc_cache_noprof+0x189/0x420 [ 11.031645] kmalloc_uaf_16+0x15b/0x4c0 [ 11.032120] kunit_try_run_case+0x1a5/0x480 [ 11.032529] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.033115] kthread+0x337/0x6f0 [ 11.033440] ret_from_fork+0x41/0x80 [ 11.033826] ret_from_fork_asm+0x1a/0x30 [ 11.034123] [ 11.034199] Freed by task 187: [ 11.034308] kasan_save_stack+0x45/0x70 [ 11.034443] kasan_save_track+0x18/0x40 [ 11.034575] kasan_save_free_info+0x3f/0x60 [ 11.034800] __kasan_slab_free+0x56/0x70 [ 11.035235] kfree+0x222/0x3f0 [ 11.035525] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.035936] kunit_try_run_case+0x1a5/0x480 [ 11.036389] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.037031] kthread+0x337/0x6f0 [ 11.037410] ret_from_fork+0x41/0x80 [ 11.037744] ret_from_fork_asm+0x1a/0x30 [ 11.038286] [ 11.038450] The buggy address belongs to the object at ffff8881027e7480 [ 11.038450] which belongs to the cache kmalloc-16 of size 16 [ 11.039005] The buggy address is located 0 bytes inside of [ 11.039005] freed 16-byte region [ffff8881027e7480, ffff8881027e7490) [ 11.039348] [ 11.039420] The buggy address belongs to the physical page: [ 11.039591] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e7 [ 11.039833] flags: 0x200000000000000(node=0|zone=2) [ 11.040052] page_type: f5(slab) [ 11.040173] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.040727] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.041061] page dumped because: kasan: bad access detected [ 11.041237] [ 11.041333] Memory state around the buggy address: [ 11.041564] ffff8881027e7380: 00 04 fc fc 00 04 fc fc 00 01 fc fc 00 01 fc fc [ 11.042060] ffff8881027e7400: 00 04 fc fc 00 04 fc fc fa fb fc fc 00 00 fc fc [ 11.042335] >ffff8881027e7480: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.042607] ^ [ 11.042749] ffff8881027e7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.043047] ffff8881027e7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.043328] ==================================================================