Date
June 17, 2025, 3:39 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 92.613179] ================================================================== [ 92.614396] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x100/0x258 [ 92.615863] Read of size 16 at addr ffff0000c5c52700 by task kunit_try_catch/147 [ 92.616916] [ 92.617374] CPU: 1 PID: 147 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 92.618595] Hardware name: linux,dummy-virt (DT) [ 92.619346] Call trace: [ 92.620152] dump_backtrace+0x9c/0x128 [ 92.620970] show_stack+0x20/0x38 [ 92.621692] dump_stack_lvl+0x60/0xb0 [ 92.622440] print_report+0xf8/0x5e8 [ 92.623448] kasan_report+0xdc/0x128 [ 92.624260] __asan_load16+0xa4/0xa8 [ 92.625081] kmalloc_uaf_16+0x100/0x258 [ 92.625832] kunit_try_run_case+0x114/0x298 [ 92.626679] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 92.627974] kthread+0x18c/0x1a8 [ 92.628759] ret_from_fork+0x10/0x20 [ 92.629595] [ 92.629933] Allocated by task 147: [ 92.630536] kasan_save_stack+0x3c/0x68 [ 92.631331] kasan_set_track+0x2c/0x40 [ 92.632449] kasan_save_alloc_info+0x24/0x38 [ 92.633336] __kasan_kmalloc+0xd4/0xd8 [ 92.634093] kmalloc_trace+0x68/0x130 [ 92.636212] kmalloc_uaf_16+0xcc/0x258 [ 92.637116] kunit_try_run_case+0x114/0x298 [ 92.637950] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 92.638917] kthread+0x18c/0x1a8 [ 92.639630] ret_from_fork+0x10/0x20 [ 92.640808] [ 92.641143] Freed by task 147: [ 92.641687] kasan_save_stack+0x3c/0x68 [ 92.642550] kasan_set_track+0x2c/0x40 [ 92.643618] kasan_save_free_info+0x38/0x60 [ 92.644461] __kasan_slab_free+0x100/0x170 [ 92.645349] __kmem_cache_free+0x178/0x2c8 [ 92.646245] kfree+0x74/0x138 [ 92.647120] kmalloc_uaf_16+0xe8/0x258 [ 92.647929] kunit_try_run_case+0x114/0x298 [ 92.648893] kunit_generic_run_threadfn_adapter+0x38/0x60 [ 92.649898] kthread+0x18c/0x1a8 [ 92.650520] ret_from_fork+0x10/0x20 [ 92.651495] [ 92.651907] The buggy address belongs to the object at ffff0000c5c52700 [ 92.651907] which belongs to the cache kmalloc-16 of size 16 [ 92.653511] The buggy address is located 0 bytes inside of [ 92.653511] freed 16-byte region [ffff0000c5c52700, ffff0000c5c52710) [ 92.656846] [ 92.657168] The buggy address belongs to the physical page: [ 92.658044] page:00000000fbf36b17 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105c52 [ 92.659284] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff) [ 92.660801] page_type: 0xffffffff() [ 92.661514] raw: 0bfffc0000000800 ffff0000c00013c0 dead000000000122 0000000000000000 [ 92.662650] raw: 0000000000000000 0000000080800080 00000001ffffffff 0000000000000000 [ 92.663892] page dumped because: kasan: bad access detected [ 92.664793] [ 92.665075] Memory state around the buggy address: [ 92.666012] ffff0000c5c52600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 92.667226] ffff0000c5c52680: 00 04 fc fc 00 05 fc fc fa fb fc fc 00 00 fc fc [ 92.668161] >ffff0000c5c52700: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 92.669301] ^ [ 92.669949] ffff0000c5c52780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 92.671209] ffff0000c5c52800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 92.672381] ==================================================================
[ 33.865166] ================================================================== [ 33.866130] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x108/0x250 [ 33.866515] Read of size 16 at addr ffff88810214e6c0 by task kunit_try_catch/162 [ 33.867202] [ 33.867530] CPU: 0 PID: 162 Comm: kunit_try_catch Tainted: G B N 6.6.94-rc1 #1 [ 33.868105] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 33.868720] Call Trace: [ 33.869057] <TASK> [ 33.869237] dump_stack_lvl+0x4e/0x90 [ 33.869517] print_report+0xd2/0x650 [ 33.870336] ? __virt_addr_valid+0x156/0x1e0 [ 33.870644] ? kmalloc_uaf_16+0x108/0x250 [ 33.870985] ? kasan_complete_mode_report_info+0x64/0x200 [ 33.871357] ? kmalloc_uaf_16+0x108/0x250 [ 33.871620] kasan_report+0x147/0x180 [ 33.871902] ? kmalloc_uaf_16+0x108/0x250 [ 33.872159] __asan_load16+0x69/0x90 [ 33.872458] kmalloc_uaf_16+0x108/0x250 [ 33.872732] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 33.873118] ? __schedule+0x715/0x11a0 [ 33.873394] ? ktime_get_ts64+0x118/0x140 [ 33.873852] kunit_try_run_case+0x120/0x290 [ 33.874719] ? __pfx_kunit_try_run_case+0x10/0x10 [ 33.875107] ? __kasan_check_write+0x18/0x20 [ 33.875412] ? trace_preempt_on+0x20/0xa0 [ 33.875698] ? __kthread_parkme+0x4f/0xd0 [ 33.876036] ? preempt_count_sub+0x50/0x80 [ 33.876316] ? __pfx_kunit_try_run_case+0x10/0x10 [ 33.876634] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 33.877035] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 33.877381] kthread+0x19e/0x1e0 [ 33.877631] ? __pfx_kthread+0x10/0x10 [ 33.878008] ret_from_fork+0x41/0x70 [ 33.878281] ? __pfx_kthread+0x10/0x10 [ 33.878539] ret_from_fork_asm+0x1b/0x30 [ 33.879220] </TASK> [ 33.879412] [ 33.879530] Allocated by task 162: [ 33.879769] kasan_save_stack+0x44/0x70 [ 33.880076] kasan_set_track+0x29/0x40 [ 33.880340] kasan_save_alloc_info+0x22/0x30 [ 33.880630] __kasan_kmalloc+0xb7/0xc0 [ 33.880983] kmalloc_trace+0x4c/0xb0 [ 33.881200] kmalloc_uaf_16+0xc9/0x250 [ 33.881444] kunit_try_run_case+0x120/0x290 [ 33.881743] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 33.882082] kthread+0x19e/0x1e0 [ 33.882292] ret_from_fork+0x41/0x70 [ 33.882540] ret_from_fork_asm+0x1b/0x30 [ 33.883269] [ 33.883389] Freed by task 162: [ 33.883605] kasan_save_stack+0x44/0x70 [ 33.883856] kasan_set_track+0x29/0x40 [ 33.884130] kasan_save_free_info+0x2f/0x50 [ 33.884417] ____kasan_slab_free+0x172/0x1d0 [ 33.884689] __kasan_slab_free+0x16/0x20 [ 33.884977] __kmem_cache_free+0x190/0x310 [ 33.885227] kfree+0x7c/0x120 [ 33.885426] kmalloc_uaf_16+0xe9/0x250 [ 33.885700] kunit_try_run_case+0x120/0x290 [ 33.886087] kunit_generic_run_threadfn_adapter+0x33/0x50 [ 33.886395] kthread+0x19e/0x1e0 [ 33.887007] ret_from_fork+0x41/0x70 [ 33.887239] ret_from_fork_asm+0x1b/0x30 [ 33.887530] [ 33.887658] The buggy address belongs to the object at ffff88810214e6c0 [ 33.887658] which belongs to the cache kmalloc-16 of size 16 [ 33.888332] The buggy address is located 0 bytes inside of [ 33.888332] freed 16-byte region [ffff88810214e6c0, ffff88810214e6d0) [ 33.889020] [ 33.889134] The buggy address belongs to the physical page: [ 33.889414] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10214e [ 33.889971] flags: 0x200000000000800(slab|node=0|zone=2) [ 33.890282] page_type: 0xffffffff() [ 33.891043] raw: 0200000000000800 ffff8881000413c0 dead000000000122 0000000000000000 [ 33.891496] raw: 0000000000000000 0000000080800080 00000001ffffffff 0000000000000000 [ 33.892091] page dumped because: kasan: bad access detected [ 33.892417] [ 33.892534] Memory state around the buggy address: [ 33.892812] ffff88810214e580: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 33.893219] ffff88810214e600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 33.893595] >ffff88810214e680: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 33.894323] ^ [ 33.895354] ffff88810214e700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.895940] ffff88810214e780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.896436] ==================================================================