Date
July 3, 2025, 6:13 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.929740] ================================================================== [ 16.930093] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 16.930178] Read of size 1 at addr fff00000c3fbdd88 by task kunit_try_catch/184 [ 16.930232] [ 16.930266] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 16.930348] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.930376] Hardware name: linux,dummy-virt (DT) [ 16.930477] Call trace: [ 16.930503] show_stack+0x20/0x38 (C) [ 16.930591] dump_stack_lvl+0x8c/0xd0 [ 16.931049] print_report+0x118/0x608 [ 16.931118] kasan_report+0xdc/0x128 [ 16.931215] __asan_report_load1_noabort+0x20/0x30 [ 16.931300] kmalloc_uaf+0x300/0x338 [ 16.931343] kunit_try_run_case+0x170/0x3f0 [ 16.931449] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.931501] kthread+0x328/0x630 [ 16.931553] ret_from_fork+0x10/0x20 [ 16.931603] [ 16.931621] Allocated by task 184: [ 16.931648] kasan_save_stack+0x3c/0x68 [ 16.931689] kasan_save_track+0x20/0x40 [ 16.931726] kasan_save_alloc_info+0x40/0x58 [ 16.931766] __kasan_kmalloc+0xd4/0xd8 [ 16.931810] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.931856] kmalloc_uaf+0xb8/0x338 [ 16.931898] kunit_try_run_case+0x170/0x3f0 [ 16.931937] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.931978] kthread+0x328/0x630 [ 16.932010] ret_from_fork+0x10/0x20 [ 16.932057] [ 16.932077] Freed by task 184: [ 16.932104] kasan_save_stack+0x3c/0x68 [ 16.932148] kasan_save_track+0x20/0x40 [ 16.932188] kasan_save_free_info+0x4c/0x78 [ 16.932227] __kasan_slab_free+0x6c/0x98 [ 16.932264] kfree+0x214/0x3c8 [ 16.932297] kmalloc_uaf+0x11c/0x338 [ 16.932334] kunit_try_run_case+0x170/0x3f0 [ 16.932371] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.932423] kthread+0x328/0x630 [ 16.932461] ret_from_fork+0x10/0x20 [ 16.932496] [ 16.932514] The buggy address belongs to the object at fff00000c3fbdd80 [ 16.932514] which belongs to the cache kmalloc-16 of size 16 [ 16.932577] The buggy address is located 8 bytes inside of [ 16.932577] freed 16-byte region [fff00000c3fbdd80, fff00000c3fbdd90) [ 16.932637] [ 16.932661] The buggy address belongs to the physical page: [ 16.932699] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fbd [ 16.932750] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.932798] page_type: f5(slab) [ 16.932837] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.932885] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.932935] page dumped because: kasan: bad access detected [ 16.932966] [ 16.932983] Memory state around the buggy address: [ 16.933016] fff00000c3fbdc80: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 16.933662] fff00000c3fbdd00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.933711] >fff00000c3fbdd80: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.933751] ^ [ 16.933781] fff00000c3fbde00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.933825] fff00000c3fbde80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.933864] ==================================================================
[ 11.714584] ================================================================== [ 11.715081] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.715730] Read of size 1 at addr ffff888101745ea8 by task kunit_try_catch/202 [ 11.716408] [ 11.716541] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.716592] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.716604] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.716626] Call Trace: [ 11.716639] <TASK> [ 11.716659] dump_stack_lvl+0x73/0xb0 [ 11.716692] print_report+0xd1/0x650 [ 11.716819] ? __virt_addr_valid+0x1db/0x2d0 [ 11.716845] ? kmalloc_uaf+0x320/0x380 [ 11.716864] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.716885] ? kmalloc_uaf+0x320/0x380 [ 11.716904] kasan_report+0x141/0x180 [ 11.716925] ? kmalloc_uaf+0x320/0x380 [ 11.716948] __asan_report_load1_noabort+0x18/0x20 [ 11.716971] kmalloc_uaf+0x320/0x380 [ 11.716991] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.717011] ? __schedule+0x10cc/0x2b60 [ 11.717034] ? __pfx_read_tsc+0x10/0x10 [ 11.717055] ? ktime_get_ts64+0x86/0x230 [ 11.717080] kunit_try_run_case+0x1a5/0x480 [ 11.717119] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.717140] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.717353] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.717378] ? __kthread_parkme+0x82/0x180 [ 11.717400] ? preempt_count_sub+0x50/0x80 [ 11.717424] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.717447] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.717469] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.717491] kthread+0x337/0x6f0 [ 11.717509] ? trace_preempt_on+0x20/0xc0 [ 11.717533] ? __pfx_kthread+0x10/0x10 [ 11.717552] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.717572] ? calculate_sigpending+0x7b/0xa0 [ 11.717596] ? __pfx_kthread+0x10/0x10 [ 11.717616] ret_from_fork+0x116/0x1d0 [ 11.717634] ? __pfx_kthread+0x10/0x10 [ 11.717653] ret_from_fork_asm+0x1a/0x30 [ 11.717683] </TASK> [ 11.717695] [ 11.728305] Allocated by task 202: [ 11.728691] kasan_save_stack+0x45/0x70 [ 11.728980] kasan_save_track+0x18/0x40 [ 11.729416] kasan_save_alloc_info+0x3b/0x50 [ 11.729760] __kasan_kmalloc+0xb7/0xc0 [ 11.730029] __kmalloc_cache_noprof+0x189/0x420 [ 11.730258] kmalloc_uaf+0xaa/0x380 [ 11.730512] kunit_try_run_case+0x1a5/0x480 [ 11.730695] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.730950] kthread+0x337/0x6f0 [ 11.731122] ret_from_fork+0x116/0x1d0 [ 11.731744] ret_from_fork_asm+0x1a/0x30 [ 11.732012] [ 11.732127] Freed by task 202: [ 11.732552] kasan_save_stack+0x45/0x70 [ 11.732704] kasan_save_track+0x18/0x40 [ 11.733020] kasan_save_free_info+0x3f/0x60 [ 11.733399] __kasan_slab_free+0x56/0x70 [ 11.733591] kfree+0x222/0x3f0 [ 11.733757] kmalloc_uaf+0x12c/0x380 [ 11.733925] kunit_try_run_case+0x1a5/0x480 [ 11.734147] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.734784] kthread+0x337/0x6f0 [ 11.734950] ret_from_fork+0x116/0x1d0 [ 11.735389] ret_from_fork_asm+0x1a/0x30 [ 11.735785] [ 11.735875] The buggy address belongs to the object at ffff888101745ea0 [ 11.735875] which belongs to the cache kmalloc-16 of size 16 [ 11.736817] The buggy address is located 8 bytes inside of [ 11.736817] freed 16-byte region [ffff888101745ea0, ffff888101745eb0) [ 11.737595] [ 11.737698] The buggy address belongs to the physical page: [ 11.737945] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101745 [ 11.738312] flags: 0x200000000000000(node=0|zone=2) [ 11.738959] page_type: f5(slab) [ 11.739333] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.739703] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.740092] page dumped because: kasan: bad access detected [ 11.740525] [ 11.740628] Memory state around the buggy address: [ 11.740834] ffff888101745d80: 00 01 fc fc 00 04 fc fc 00 04 fc fc 00 05 fc fc [ 11.741177] ffff888101745e00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.741806] >ffff888101745e80: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 11.742324] ^ [ 11.742648] ffff888101745f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.743048] ffff888101745f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.743636] ==================================================================