Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.243241] ================================================================== [ 21.244227] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 21.245008] Read of size 16 at addr fff00000c662ad60 by task kunit_try_catch/156 [ 21.245846] [ 21.246252] CPU: 1 UID: 0 PID: 156 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 21.246513] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.246606] Hardware name: linux,dummy-virt (DT) [ 21.246719] Call trace: [ 21.246787] dump_backtrace+0x9c/0x128 [ 21.246902] show_stack+0x20/0x38 [ 21.247024] dump_stack_lvl+0x8c/0xd0 [ 21.247092] print_report+0x118/0x5f0 [ 21.247137] kasan_report+0xdc/0x128 [ 21.247181] __asan_report_load16_noabort+0x20/0x30 [ 21.247231] kmalloc_uaf_16+0x3bc/0x438 [ 21.247276] kunit_try_run_case+0x170/0x3f0 [ 21.247321] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.247373] kthread+0x24c/0x2d0 [ 21.247415] ret_from_fork+0x10/0x20 [ 21.247462] [ 21.253872] Allocated by task 156: [ 21.254400] kasan_save_stack+0x3c/0x68 [ 21.254887] kasan_save_track+0x20/0x40 [ 21.255547] kasan_save_alloc_info+0x40/0x58 [ 21.256168] __kasan_kmalloc+0xd4/0xd8 [ 21.256740] __kmalloc_cache_noprof+0x154/0x320 [ 21.257363] kmalloc_uaf_16+0x144/0x438 [ 21.257911] kunit_try_run_case+0x170/0x3f0 [ 21.258607] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.259223] kthread+0x24c/0x2d0 [ 21.259783] ret_from_fork+0x10/0x20 [ 21.260353] [ 21.260690] Freed by task 156: [ 21.261114] kasan_save_stack+0x3c/0x68 [ 21.261713] kasan_save_track+0x20/0x40 [ 21.262289] kasan_save_free_info+0x4c/0x78 [ 21.262880] __kasan_slab_free+0x6c/0x98 [ 21.263438] kfree+0x110/0x3b8 [ 21.263999] kmalloc_uaf_16+0x198/0x438 [ 21.264562] kunit_try_run_case+0x170/0x3f0 [ 21.265166] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.265772] kthread+0x24c/0x2d0 [ 21.266323] ret_from_fork+0x10/0x20 [ 21.266820] [ 21.267207] The buggy address belongs to the object at fff00000c662ad60 [ 21.267207] which belongs to the cache kmalloc-16 of size 16 [ 21.268294] The buggy address is located 0 bytes inside of [ 21.268294] freed 16-byte region [fff00000c662ad60, fff00000c662ad70) [ 21.269406] [ 21.269810] The buggy address belongs to the physical page: [ 21.270489] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10662a [ 21.271345] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.272115] page_type: f5(slab) [ 21.272605] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 21.273457] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 [ 21.274223] page dumped because: kasan: bad access detected [ 21.274844] [ 21.275204] Memory state around the buggy address: [ 21.275820] fff00000c662ac00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 21.276533] fff00000c662ac80: fa fb fc fc 00 04 fc fc 00 05 fc fc fa fb fc fc [ 21.277382] >fff00000c662ad00: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 21.278145] ^ [ 21.278804] fff00000c662ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.279579] fff00000c662ae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.280328] ==================================================================
[ 17.542166] ================================================================== [ 17.543671] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47d/0x4c0 [ 17.544101] Read of size 16 at addr ffff8881025abd40 by task kunit_try_catch/173 [ 17.545302] [ 17.546138] CPU: 0 UID: 0 PID: 173 Comm: kunit_try_catch Tainted: G B N 6.12.33-rc1 #1 [ 17.546269] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.546287] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 17.546318] Call Trace: [ 17.546336] <TASK> [ 17.546359] dump_stack_lvl+0x73/0xb0 [ 17.546403] print_report+0xd1/0x640 [ 17.546441] ? __virt_addr_valid+0x1db/0x2d0 [ 17.546666] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.546737] ? kasan_complete_mode_report_info+0x64/0x200 [ 17.546831] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.546904] kasan_report+0x140/0x180 [ 17.546982] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.547068] __asan_report_load16_noabort+0x18/0x20 [ 17.547142] kmalloc_uaf_16+0x47d/0x4c0 [ 17.547231] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 17.547318] ? __schedule+0xc49/0x27a0 [ 17.547390] ? __pfx_read_tsc+0x10/0x10 [ 17.547460] ? ktime_get_ts64+0x84/0x230 [ 17.547543] kunit_try_run_case+0x1a6/0x480 [ 17.547626] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.547698] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 17.547768] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 17.547843] ? __kthread_parkme+0x82/0x160 [ 17.547911] ? preempt_count_sub+0x50/0x80 [ 17.548103] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.548138] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 17.548177] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.548241] kthread+0x257/0x310 [ 17.548272] ? __pfx_kthread+0x10/0x10 [ 17.548300] ret_from_fork+0x41/0x80 [ 17.548332] ? __pfx_kthread+0x10/0x10 [ 17.548358] ret_from_fork_asm+0x1a/0x30 [ 17.548400] </TASK> [ 17.548414] [ 17.568378] Allocated by task 173: [ 17.568894] kasan_save_stack+0x45/0x70 [ 17.569472] kasan_save_track+0x18/0x40 [ 17.571383] kasan_save_alloc_info+0x3b/0x50 [ 17.572041] __kasan_kmalloc+0xb7/0xc0 [ 17.572718] __kmalloc_cache_noprof+0x168/0x350 [ 17.573468] kmalloc_uaf_16+0x15c/0x4c0 [ 17.574201] kunit_try_run_case+0x1a6/0x480 [ 17.574681] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.575824] kthread+0x257/0x310 [ 17.576184] ret_from_fork+0x41/0x80 [ 17.576845] ret_from_fork_asm+0x1a/0x30 [ 17.577264] [ 17.577477] Freed by task 173: [ 17.577775] kasan_save_stack+0x45/0x70 [ 17.578835] kasan_save_track+0x18/0x40 [ 17.579681] kasan_save_free_info+0x3f/0x60 [ 17.580451] __kasan_slab_free+0x56/0x70 [ 17.580936] kfree+0x123/0x3d0 [ 17.581269] kmalloc_uaf_16+0x1d7/0x4c0 [ 17.581800] kunit_try_run_case+0x1a6/0x480 [ 17.583095] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.583609] kthread+0x257/0x310 [ 17.584186] ret_from_fork+0x41/0x80 [ 17.584714] ret_from_fork_asm+0x1a/0x30 [ 17.585605] [ 17.585805] The buggy address belongs to the object at ffff8881025abd40 [ 17.585805] which belongs to the cache kmalloc-16 of size 16 [ 17.586724] The buggy address is located 0 bytes inside of [ 17.586724] freed 16-byte region [ffff8881025abd40, ffff8881025abd50) [ 17.588315] [ 17.588550] The buggy address belongs to the physical page: [ 17.589489] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025ab [ 17.590620] flags: 0x200000000000000(node=0|zone=2) [ 17.591280] page_type: f5(slab) [ 17.591663] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 17.592281] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000 [ 17.592828] page dumped because: kasan: bad access detected [ 17.593698] [ 17.593932] Memory state around the buggy address: [ 17.594434] ffff8881025abc00: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 17.594966] ffff8881025abc80: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc [ 17.596001] >ffff8881025abd00: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 17.596462] ^ [ 17.597444] ffff8881025abd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.598582] ffff8881025abe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.599081] ==================================================================