Date
July 4, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.052350] ================================================================== [ 18.052856] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 18.052936] Read of size 16 at addr fff00000c61737e0 by task kunit_try_catch/168 [ 18.053058] [ 18.053104] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.053426] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.053487] Hardware name: linux,dummy-virt (DT) [ 18.053522] Call trace: [ 18.053555] show_stack+0x20/0x38 (C) [ 18.053735] dump_stack_lvl+0x8c/0xd0 [ 18.053966] print_report+0x118/0x608 [ 18.054027] kasan_report+0xdc/0x128 [ 18.054072] __asan_report_load16_noabort+0x20/0x30 [ 18.054118] kmalloc_uaf_16+0x3bc/0x438 [ 18.054231] kunit_try_run_case+0x170/0x3f0 [ 18.054285] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.054431] kthread+0x328/0x630 [ 18.054480] ret_from_fork+0x10/0x20 [ 18.054749] [ 18.054839] Allocated by task 168: [ 18.054875] kasan_save_stack+0x3c/0x68 [ 18.055048] kasan_save_track+0x20/0x40 [ 18.055235] kasan_save_alloc_info+0x40/0x58 [ 18.055374] __kasan_kmalloc+0xd4/0xd8 [ 18.055495] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.055536] kmalloc_uaf_16+0x140/0x438 [ 18.055570] kunit_try_run_case+0x170/0x3f0 [ 18.055717] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.055767] kthread+0x328/0x630 [ 18.055909] ret_from_fork+0x10/0x20 [ 18.056053] [ 18.056079] Freed by task 168: [ 18.056174] kasan_save_stack+0x3c/0x68 [ 18.056638] kasan_save_track+0x20/0x40 [ 18.056723] kasan_save_free_info+0x4c/0x78 [ 18.056797] __kasan_slab_free+0x6c/0x98 [ 18.056860] kfree+0x214/0x3c8 [ 18.056903] kmalloc_uaf_16+0x190/0x438 [ 18.056938] kunit_try_run_case+0x170/0x3f0 [ 18.056975] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.057016] kthread+0x328/0x630 [ 18.057047] ret_from_fork+0x10/0x20 [ 18.057093] [ 18.057122] The buggy address belongs to the object at fff00000c61737e0 [ 18.057122] which belongs to the cache kmalloc-16 of size 16 [ 18.057185] The buggy address is located 0 bytes inside of [ 18.057185] freed 16-byte region [fff00000c61737e0, fff00000c61737f0) [ 18.057259] [ 18.057281] The buggy address belongs to the physical page: [ 18.057312] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106173 [ 18.057391] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.057453] page_type: f5(slab) [ 18.057495] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.057559] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.057613] page dumped because: kasan: bad access detected [ 18.057651] [ 18.057668] Memory state around the buggy address: [ 18.057701] fff00000c6173680: 00 02 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.057741] fff00000c6173700: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 18.057782] >fff00000c6173780: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 18.057828] ^ [ 18.057863] fff00000c6173800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.057912] fff00000c6173880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.057949] ==================================================================
[ 11.889802] ================================================================== [ 11.891378] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.891643] Read of size 16 at addr ffff88810253eee0 by task kunit_try_catch/185 [ 11.891869] [ 11.891967] CPU: 0 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.892017] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.892029] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.892053] Call Trace: [ 11.892069] <TASK> [ 11.892090] dump_stack_lvl+0x73/0xb0 [ 11.892121] print_report+0xd1/0x650 [ 11.892144] ? __virt_addr_valid+0x1db/0x2d0 [ 11.892168] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.892187] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.892209] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.892278] kasan_report+0x141/0x180 [ 11.892299] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.892323] __asan_report_load16_noabort+0x18/0x20 [ 11.892361] kmalloc_uaf_16+0x47b/0x4c0 [ 11.892381] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.892401] ? __schedule+0x10cc/0x2b60 [ 11.892423] ? __pfx_read_tsc+0x10/0x10 [ 11.892444] ? ktime_get_ts64+0x86/0x230 [ 11.892469] kunit_try_run_case+0x1a5/0x480 [ 11.892494] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.892514] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.892537] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.892589] ? __kthread_parkme+0x82/0x180 [ 11.892610] ? preempt_count_sub+0x50/0x80 [ 11.892633] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.892687] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.892709] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.892770] kthread+0x337/0x6f0 [ 11.892797] ? trace_preempt_on+0x20/0xc0 [ 11.892821] ? __pfx_kthread+0x10/0x10 [ 11.892852] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.892871] ? calculate_sigpending+0x7b/0xa0 [ 11.892895] ? __pfx_kthread+0x10/0x10 [ 11.892914] ret_from_fork+0x116/0x1d0 [ 11.892932] ? __pfx_kthread+0x10/0x10 [ 11.892950] ret_from_fork_asm+0x1a/0x30 [ 11.892981] </TASK> [ 11.892992] [ 11.908053] Allocated by task 185: [ 11.908232] kasan_save_stack+0x45/0x70 [ 11.908676] kasan_save_track+0x18/0x40 [ 11.909123] kasan_save_alloc_info+0x3b/0x50 [ 11.909627] __kasan_kmalloc+0xb7/0xc0 [ 11.910046] __kmalloc_cache_noprof+0x189/0x420 [ 11.910567] kmalloc_uaf_16+0x15b/0x4c0 [ 11.910936] kunit_try_run_case+0x1a5/0x480 [ 11.911363] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.911933] kthread+0x337/0x6f0 [ 11.912177] ret_from_fork+0x116/0x1d0 [ 11.912500] ret_from_fork_asm+0x1a/0x30 [ 11.912724] [ 11.912946] Freed by task 185: [ 11.913248] kasan_save_stack+0x45/0x70 [ 11.913699] kasan_save_track+0x18/0x40 [ 11.914101] kasan_save_free_info+0x3f/0x60 [ 11.914490] __kasan_slab_free+0x56/0x70 [ 11.914952] kfree+0x222/0x3f0 [ 11.915164] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.915610] kunit_try_run_case+0x1a5/0x480 [ 11.915763] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.916118] kthread+0x337/0x6f0 [ 11.916506] ret_from_fork+0x116/0x1d0 [ 11.916956] ret_from_fork_asm+0x1a/0x30 [ 11.917342] [ 11.917505] The buggy address belongs to the object at ffff88810253eee0 [ 11.917505] which belongs to the cache kmalloc-16 of size 16 [ 11.918584] The buggy address is located 0 bytes inside of [ 11.918584] freed 16-byte region [ffff88810253eee0, ffff88810253eef0) [ 11.919695] [ 11.919909] The buggy address belongs to the physical page: [ 11.920428] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10253e [ 11.920965] flags: 0x200000000000000(node=0|zone=2) [ 11.921548] page_type: f5(slab) [ 11.921741] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.922611] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.922831] page dumped because: kasan: bad access detected [ 11.922995] [ 11.923061] Memory state around the buggy address: [ 11.923213] ffff88810253ed80: 00 02 fc fc 00 05 fc fc 00 02 fc fc 00 02 fc fc [ 11.923835] ffff88810253ee00: 00 02 fc fc 00 02 fc fc fa fb fc fc fa fb fc fc [ 11.924630] >ffff88810253ee80: fa fb fc fc 00 05 fc fc 00 00 fc fc fa fb fc fc [ 11.925371] ^ [ 11.925987] ffff88810253ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.926723] ffff88810253ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.927457] ==================================================================