Date
July 22, 2025, 5:13 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.462642] ================================================================== [ 30.462952] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 30.463280] Read of size 1 at addr fff00000c7b7a928 by task kunit_try_catch/215 [ 30.463357] [ 30.463391] CPU: 1 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B W N 6.16.0-rc7-next-20250722 #1 PREEMPT [ 30.463484] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST [ 30.463734] Hardware name: linux,dummy-virt (DT) [ 30.463807] Call trace: [ 30.463843] show_stack+0x20/0x38 (C) [ 30.463896] dump_stack_lvl+0x8c/0xd0 [ 30.463943] print_report+0x118/0x5e8 [ 30.463987] kasan_report+0xdc/0x128 [ 30.464031] __asan_report_load1_noabort+0x20/0x30 [ 30.464077] kmalloc_uaf+0x300/0x338 [ 30.464121] kunit_try_run_case+0x170/0x3f0 [ 30.464397] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.464753] kthread+0x328/0x630 [ 30.464865] ret_from_fork+0x10/0x20 [ 30.464962] [ 30.465000] Allocated by task 215: [ 30.465288] kasan_save_stack+0x3c/0x68 [ 30.465360] kasan_save_track+0x20/0x40 [ 30.465491] kasan_save_alloc_info+0x40/0x58 [ 30.465590] __kasan_kmalloc+0xd4/0xd8 [ 30.465705] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.465779] kmalloc_uaf+0xb8/0x338 [ 30.466139] kunit_try_run_case+0x170/0x3f0 [ 30.466251] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.466332] kthread+0x328/0x630 [ 30.466408] ret_from_fork+0x10/0x20 [ 30.466680] [ 30.466766] Freed by task 215: [ 30.466798] kasan_save_stack+0x3c/0x68 [ 30.466852] kasan_save_track+0x20/0x40 [ 30.466888] kasan_save_free_info+0x4c/0x78 [ 30.466984] __kasan_slab_free+0x6c/0x98 [ 30.467022] kfree+0x214/0x3c8 [ 30.467057] kmalloc_uaf+0x11c/0x338 [ 30.467101] kunit_try_run_case+0x170/0x3f0 [ 30.467139] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.467182] kthread+0x328/0x630 [ 30.467216] ret_from_fork+0x10/0x20 [ 30.467268] [ 30.467296] The buggy address belongs to the object at fff00000c7b7a920 [ 30.467296] which belongs to the cache kmalloc-16 of size 16 [ 30.467353] The buggy address is located 8 bytes inside of [ 30.467353] freed 16-byte region [fff00000c7b7a920, fff00000c7b7a930) [ 30.467412] [ 30.467438] The buggy address belongs to the physical page: [ 30.467482] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107b7a [ 30.467535] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 30.467585] page_type: f5(slab) [ 30.467628] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 30.467684] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 30.467724] page dumped because: kasan: bad access detected [ 30.467754] [ 30.467791] Memory state around the buggy address: [ 30.468385] fff00000c7b7a800: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 30.468465] fff00000c7b7a880: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc [ 30.468527] >fff00000c7b7a900: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 30.468580] ^ [ 30.468627] fff00000c7b7a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.469036] fff00000c7b7aa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.469092] ==================================================================
[ 25.352050] ================================================================== [ 25.353488] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 25.353814] Read of size 1 at addr ffff888104919c48 by task kunit_try_catch/232 [ 25.355739] [ 25.355853] CPU: 0 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) [ 25.355905] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.355918] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.355940] Call Trace: [ 25.355954] <TASK> [ 25.355972] dump_stack_lvl+0x73/0xb0 [ 25.356006] print_report+0xd1/0x640 [ 25.356031] ? __virt_addr_valid+0x1db/0x2d0 [ 25.356056] ? kmalloc_uaf+0x320/0x380 [ 25.356077] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.356103] ? kmalloc_uaf+0x320/0x380 [ 25.356123] kasan_report+0x141/0x180 [ 25.356146] ? kmalloc_uaf+0x320/0x380 [ 25.356170] __asan_report_load1_noabort+0x18/0x20 [ 25.356195] kmalloc_uaf+0x320/0x380 [ 25.356234] ? __pfx_kmalloc_uaf+0x10/0x10 [ 25.356255] ? __schedule+0x10da/0x2b60 [ 25.356282] ? __pfx_read_tsc+0x10/0x10 [ 25.356305] ? ktime_get_ts64+0x86/0x230 [ 25.356331] kunit_try_run_case+0x1a5/0x480 [ 25.356357] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.356380] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.356405] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.356430] ? __kthread_parkme+0x82/0x180 [ 25.356451] ? preempt_count_sub+0x50/0x80 [ 25.356475] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.356499] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.356522] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.356546] kthread+0x337/0x6f0 [ 25.356566] ? trace_preempt_on+0x20/0xc0 [ 25.356590] ? __pfx_kthread+0x10/0x10 [ 25.356611] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.356636] ? calculate_sigpending+0x7b/0xa0 [ 25.356660] ? __pfx_kthread+0x10/0x10 [ 25.356682] ret_from_fork+0x116/0x1d0 [ 25.356701] ? __pfx_kthread+0x10/0x10 [ 25.356722] ret_from_fork_asm+0x1a/0x30 [ 25.356754] </TASK> [ 25.356766] [ 25.367360] Allocated by task 232: [ 25.367505] kasan_save_stack+0x45/0x70 [ 25.367713] kasan_save_track+0x18/0x40 [ 25.367922] kasan_save_alloc_info+0x3b/0x50 [ 25.368098] __kasan_kmalloc+0xb7/0xc0 [ 25.369508] __kmalloc_cache_noprof+0x189/0x420 [ 25.369724] kmalloc_uaf+0xaa/0x380 [ 25.369888] kunit_try_run_case+0x1a5/0x480 [ 25.370095] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.371330] kthread+0x337/0x6f0 [ 25.371470] ret_from_fork+0x116/0x1d0 [ 25.371846] ret_from_fork_asm+0x1a/0x30 [ 25.372181] [ 25.372299] Freed by task 232: [ 25.372436] kasan_save_stack+0x45/0x70 [ 25.373526] kasan_save_track+0x18/0x40 [ 25.373733] kasan_save_free_info+0x3f/0x60 [ 25.373932] __kasan_slab_free+0x56/0x70 [ 25.374112] kfree+0x222/0x3f0 [ 25.374259] kmalloc_uaf+0x12c/0x380 [ 25.374419] kunit_try_run_case+0x1a5/0x480 [ 25.374604] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.375357] kthread+0x337/0x6f0 [ 25.375916] ret_from_fork+0x116/0x1d0 [ 25.376665] ret_from_fork_asm+0x1a/0x30 [ 25.377328] [ 25.377810] The buggy address belongs to the object at ffff888104919c40 [ 25.377810] which belongs to the cache kmalloc-16 of size 16 [ 25.379810] The buggy address is located 8 bytes inside of [ 25.379810] freed 16-byte region [ffff888104919c40, ffff888104919c50) [ 25.380917] [ 25.381034] The buggy address belongs to the physical page: [ 25.382043] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104919 [ 25.383011] flags: 0x200000000000000(node=0|zone=2) [ 25.384049] page_type: f5(slab) [ 25.384679] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 25.385849] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 25.386720] page dumped because: kasan: bad access detected [ 25.387397] [ 25.387497] Memory state around the buggy address: [ 25.388010] ffff888104919b00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.389004] ffff888104919b80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 25.390138] >ffff888104919c00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 25.390775] ^ [ 25.391261] ffff888104919c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.392380] ffff888104919d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.393522] ==================================================================