Date
June 19, 2025, 12:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.420541] ================================================================== [ 30.420920] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 30.421314] Read of size 16 at addr fff00000c4726ce0 by task kunit_try_catch/179 [ 30.421517] [ 30.421690] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT [ 30.421947] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.422060] Hardware name: linux,dummy-virt (DT) [ 30.422401] Call trace: [ 30.422464] show_stack+0x20/0x38 (C) [ 30.422848] dump_stack_lvl+0x8c/0xd0 [ 30.423105] print_report+0x118/0x608 [ 30.423414] kasan_report+0xdc/0x128 [ 30.423609] __asan_report_load16_noabort+0x20/0x30 [ 30.423721] kmalloc_uaf_16+0x3bc/0x438 [ 30.423829] kunit_try_run_case+0x170/0x3f0 [ 30.423945] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.424121] kthread+0x328/0x630 [ 30.424433] ret_from_fork+0x10/0x20 [ 30.424692] [ 30.424837] Allocated by task 179: [ 30.424962] kasan_save_stack+0x3c/0x68 [ 30.425339] kasan_save_track+0x20/0x40 [ 30.425626] kasan_save_alloc_info+0x40/0x58 [ 30.425803] __kasan_kmalloc+0xd4/0xd8 [ 30.425920] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.426019] kmalloc_uaf_16+0x140/0x438 [ 30.426094] kunit_try_run_case+0x170/0x3f0 [ 30.426168] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.426263] kthread+0x328/0x630 [ 30.426342] ret_from_fork+0x10/0x20 [ 30.426432] [ 30.426480] Freed by task 179: [ 30.426548] kasan_save_stack+0x3c/0x68 [ 30.426645] kasan_save_track+0x20/0x40 [ 30.427342] kasan_save_free_info+0x4c/0x78 [ 30.427451] __kasan_slab_free+0x6c/0x98 [ 30.428135] kfree+0x214/0x3c8 [ 30.428275] kmalloc_uaf_16+0x190/0x438 [ 30.428488] kunit_try_run_case+0x170/0x3f0 [ 30.428662] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.428853] kthread+0x328/0x630 [ 30.429077] ret_from_fork+0x10/0x20 [ 30.429177] [ 30.429303] The buggy address belongs to the object at fff00000c4726ce0 [ 30.429303] which belongs to the cache kmalloc-16 of size 16 [ 30.429751] The buggy address is located 0 bytes inside of [ 30.429751] freed 16-byte region [fff00000c4726ce0, fff00000c4726cf0) [ 30.429971] [ 30.430025] The buggy address belongs to the physical page: [ 30.430215] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104726 [ 30.430458] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.430781] page_type: f5(slab) [ 30.431090] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 30.431350] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 30.431575] page dumped because: kasan: bad access detected [ 30.431667] [ 30.431713] Memory state around the buggy address: [ 30.432027] fff00000c4726b80: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.432187] fff00000c4726c00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.432448] >fff00000c4726c80: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 30.432663] ^ [ 30.433000] fff00000c4726d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.433278] fff00000c4726d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.433490] ==================================================================
[ 26.876265] ================================================================== [ 26.876727] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 26.877555] Read of size 16 at addr ffff8881022a2680 by task kunit_try_catch/197 [ 26.878052] [ 26.878664] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) [ 26.878916] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.878944] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.878977] Call Trace: [ 26.878995] <TASK> [ 26.879020] dump_stack_lvl+0x73/0xb0 [ 26.879068] print_report+0xd1/0x650 [ 26.879094] ? __virt_addr_valid+0x1db/0x2d0 [ 26.879142] ? kmalloc_uaf_16+0x47b/0x4c0 [ 26.879164] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.879191] ? kmalloc_uaf_16+0x47b/0x4c0 [ 26.879213] kasan_report+0x141/0x180 [ 26.879236] ? kmalloc_uaf_16+0x47b/0x4c0 [ 26.879262] __asan_report_load16_noabort+0x18/0x20 [ 26.879287] kmalloc_uaf_16+0x47b/0x4c0 [ 26.879309] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 26.879332] ? __schedule+0x10cc/0x2b60 [ 26.879356] ? __pfx_read_tsc+0x10/0x10 [ 26.879379] ? ktime_get_ts64+0x86/0x230 [ 26.879406] kunit_try_run_case+0x1a5/0x480 [ 26.879433] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.879456] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 26.879479] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.879503] ? __kthread_parkme+0x82/0x180 [ 26.879525] ? preempt_count_sub+0x50/0x80 [ 26.879551] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.879574] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.879598] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.879622] kthread+0x337/0x6f0 [ 26.879642] ? trace_preempt_on+0x20/0xc0 [ 26.879667] ? __pfx_kthread+0x10/0x10 [ 26.879689] ? _raw_spin_unlock_irq+0x47/0x80 [ 26.879711] ? calculate_sigpending+0x7b/0xa0 [ 26.879736] ? __pfx_kthread+0x10/0x10 [ 26.879758] ret_from_fork+0x116/0x1d0 [ 26.879779] ? __pfx_kthread+0x10/0x10 [ 26.879800] ret_from_fork_asm+0x1a/0x30 [ 26.879831] </TASK> [ 26.879844] [ 26.889383] Allocated by task 197: [ 26.889703] kasan_save_stack+0x45/0x70 [ 26.890509] kasan_save_track+0x18/0x40 [ 26.890770] kasan_save_alloc_info+0x3b/0x50 [ 26.891144] __kasan_kmalloc+0xb7/0xc0 [ 26.891684] __kmalloc_cache_noprof+0x189/0x420 [ 26.891891] kmalloc_uaf_16+0x15b/0x4c0 [ 26.892325] kunit_try_run_case+0x1a5/0x480 [ 26.892717] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.892990] kthread+0x337/0x6f0 [ 26.893181] ret_from_fork+0x116/0x1d0 [ 26.893503] ret_from_fork_asm+0x1a/0x30 [ 26.893844] [ 26.894021] Freed by task 197: [ 26.894351] kasan_save_stack+0x45/0x70 [ 26.894590] kasan_save_track+0x18/0x40 [ 26.894777] kasan_save_free_info+0x3f/0x60 [ 26.895036] __kasan_slab_free+0x56/0x70 [ 26.895389] kfree+0x222/0x3f0 [ 26.895669] kmalloc_uaf_16+0x1d6/0x4c0 [ 26.896038] kunit_try_run_case+0x1a5/0x480 [ 26.896431] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.896726] kthread+0x337/0x6f0 [ 26.896934] ret_from_fork+0x116/0x1d0 [ 26.897282] ret_from_fork_asm+0x1a/0x30 [ 26.897612] [ 26.897792] The buggy address belongs to the object at ffff8881022a2680 [ 26.897792] which belongs to the cache kmalloc-16 of size 16 [ 26.898785] The buggy address is located 0 bytes inside of [ 26.898785] freed 16-byte region [ffff8881022a2680, ffff8881022a2690) [ 26.899770] [ 26.900011] The buggy address belongs to the physical page: [ 26.900516] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1022a2 [ 26.901122] flags: 0x200000000000000(node=0|zone=2) [ 26.901572] page_type: f5(slab) [ 26.901886] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 26.902335] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 26.902734] page dumped because: kasan: bad access detected [ 26.903554] [ 26.903675] Memory state around the buggy address: [ 26.904552] ffff8881022a2580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 26.904917] ffff8881022a2600: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 26.905174] >ffff8881022a2680: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.905505] ^ [ 26.905691] ffff8881022a2700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.906895] ffff8881022a2780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.907163] ==================================================================