Date
July 20, 2025, 8:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.175587] ================================================================== [ 15.175651] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 15.175891] Read of size 16 at addr fff00000c6086740 by task kunit_try_catch/169 [ 15.175957] [ 15.176074] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.176321] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.176365] Hardware name: linux,dummy-virt (DT) [ 15.176534] Call trace: [ 15.176565] show_stack+0x20/0x38 (C) [ 15.176661] dump_stack_lvl+0x8c/0xd0 [ 15.176861] print_report+0x118/0x5d0 [ 15.176917] kasan_report+0xdc/0x128 [ 15.176962] __asan_report_load16_noabort+0x20/0x30 [ 15.177175] kmalloc_uaf_16+0x3bc/0x438 [ 15.177331] kunit_try_run_case+0x170/0x3f0 [ 15.177428] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.177778] kthread+0x328/0x630 [ 15.177935] ret_from_fork+0x10/0x20 [ 15.178043] [ 15.178154] Allocated by task 169: [ 15.178240] kasan_save_stack+0x3c/0x68 [ 15.178372] kasan_save_track+0x20/0x40 [ 15.178500] kasan_save_alloc_info+0x40/0x58 [ 15.178571] __kasan_kmalloc+0xd4/0xd8 [ 15.178772] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.178842] kmalloc_uaf_16+0x140/0x438 [ 15.178918] kunit_try_run_case+0x170/0x3f0 [ 15.178959] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.179011] kthread+0x328/0x630 [ 15.179043] ret_from_fork+0x10/0x20 [ 15.179077] [ 15.179097] Freed by task 169: [ 15.179140] kasan_save_stack+0x3c/0x68 [ 15.179177] kasan_save_track+0x20/0x40 [ 15.179226] kasan_save_free_info+0x4c/0x78 [ 15.179274] __kasan_slab_free+0x6c/0x98 [ 15.179310] kfree+0x214/0x3c8 [ 15.179342] kmalloc_uaf_16+0x190/0x438 [ 15.179376] kunit_try_run_case+0x170/0x3f0 [ 15.179420] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.179461] kthread+0x328/0x630 [ 15.179492] ret_from_fork+0x10/0x20 [ 15.179535] [ 15.179554] The buggy address belongs to the object at fff00000c6086740 [ 15.179554] which belongs to the cache kmalloc-16 of size 16 [ 15.179618] The buggy address is located 0 bytes inside of [ 15.179618] freed 16-byte region [fff00000c6086740, fff00000c6086750) [ 15.179677] [ 15.179697] The buggy address belongs to the physical page: [ 15.179738] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106086 [ 15.179791] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.179838] page_type: f5(slab) [ 15.179876] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.179936] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.179993] page dumped because: kasan: bad access detected [ 15.180024] [ 15.180042] Memory state around the buggy address: [ 15.180090] fff00000c6086600: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc [ 15.180131] fff00000c6086680: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.180173] >fff00000c6086700: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 15.180504] ^ [ 15.180852] fff00000c6086780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.181223] fff00000c6086800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.181306] ==================================================================
[ 12.957891] ================================================================== [ 12.958317] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.958719] Read of size 16 at addr ffff888101c73560 by task kunit_try_catch/186 [ 12.959249] [ 12.959405] CPU: 0 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.959491] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.959504] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.959541] Call Trace: [ 12.959555] <TASK> [ 12.959570] dump_stack_lvl+0x73/0xb0 [ 12.959618] print_report+0xd1/0x610 [ 12.959642] ? __virt_addr_valid+0x1db/0x2d0 [ 12.959665] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.959686] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.959708] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.959730] kasan_report+0x141/0x180 [ 12.959752] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.959778] __asan_report_load16_noabort+0x18/0x20 [ 12.959804] kmalloc_uaf_16+0x47b/0x4c0 [ 12.959825] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.959859] ? __schedule+0x10c6/0x2b60 [ 12.959882] ? __pfx_read_tsc+0x10/0x10 [ 12.959904] ? ktime_get_ts64+0x86/0x230 [ 12.959929] kunit_try_run_case+0x1a5/0x480 [ 12.959974] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.959997] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.960021] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.960045] ? __kthread_parkme+0x82/0x180 [ 12.960066] ? preempt_count_sub+0x50/0x80 [ 12.960090] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.960116] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.960140] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.960224] kthread+0x337/0x6f0 [ 12.960250] ? trace_preempt_on+0x20/0xc0 [ 12.960274] ? __pfx_kthread+0x10/0x10 [ 12.960295] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.960318] ? calculate_sigpending+0x7b/0xa0 [ 12.960342] ? __pfx_kthread+0x10/0x10 [ 12.960364] ret_from_fork+0x116/0x1d0 [ 12.960383] ? __pfx_kthread+0x10/0x10 [ 12.960404] ret_from_fork_asm+0x1a/0x30 [ 12.960435] </TASK> [ 12.960446] [ 12.971317] Allocated by task 186: [ 12.971697] kasan_save_stack+0x45/0x70 [ 12.972099] kasan_save_track+0x18/0x40 [ 12.972272] kasan_save_alloc_info+0x3b/0x50 [ 12.972697] __kasan_kmalloc+0xb7/0xc0 [ 12.973045] __kmalloc_cache_noprof+0x189/0x420 [ 12.973378] kmalloc_uaf_16+0x15b/0x4c0 [ 12.973584] kunit_try_run_case+0x1a5/0x480 [ 12.974084] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.974370] kthread+0x337/0x6f0 [ 12.974536] ret_from_fork+0x116/0x1d0 [ 12.974739] ret_from_fork_asm+0x1a/0x30 [ 12.975339] [ 12.975424] Freed by task 186: [ 12.975785] kasan_save_stack+0x45/0x70 [ 12.976112] kasan_save_track+0x18/0x40 [ 12.976315] kasan_save_free_info+0x3f/0x60 [ 12.976814] __kasan_slab_free+0x56/0x70 [ 12.976991] kfree+0x222/0x3f0 [ 12.977377] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.977605] kunit_try_run_case+0x1a5/0x480 [ 12.977873] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.978279] kthread+0x337/0x6f0 [ 12.978446] ret_from_fork+0x116/0x1d0 [ 12.978655] ret_from_fork_asm+0x1a/0x30 [ 12.979215] [ 12.979536] The buggy address belongs to the object at ffff888101c73560 [ 12.979536] which belongs to the cache kmalloc-16 of size 16 [ 12.980286] The buggy address is located 0 bytes inside of [ 12.980286] freed 16-byte region [ffff888101c73560, ffff888101c73570) [ 12.981340] [ 12.981455] The buggy address belongs to the physical page: [ 12.981781] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c73 [ 12.982191] flags: 0x200000000000000(node=0|zone=2) [ 12.982454] page_type: f5(slab) [ 12.982635] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.982989] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.983329] page dumped because: kasan: bad access detected [ 12.984187] [ 12.984292] Memory state around the buggy address: [ 12.984741] ffff888101c73400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.985367] ffff888101c73480: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc [ 12.985729] >ffff888101c73500: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 12.986304] ^ [ 12.986729] ffff888101c73580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.987284] ffff888101c73600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.987740] ==================================================================