Date
July 4, 2025, 11:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.199506] ================================================================== [ 18.199582] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 18.199652] Read of size 1 at addr fff00000c6173808 by task kunit_try_catch/184 [ 18.199701] [ 18.199740] CPU: 0 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.199864] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.199892] Hardware name: linux,dummy-virt (DT) [ 18.200384] Call trace: [ 18.201203] show_stack+0x20/0x38 (C) [ 18.201302] dump_stack_lvl+0x8c/0xd0 [ 18.201944] print_report+0x118/0x608 [ 18.202073] kasan_report+0xdc/0x128 [ 18.202120] __asan_report_load1_noabort+0x20/0x30 [ 18.202425] kmalloc_uaf+0x300/0x338 [ 18.202690] kunit_try_run_case+0x170/0x3f0 [ 18.202905] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.203239] kthread+0x328/0x630 [ 18.203324] ret_from_fork+0x10/0x20 [ 18.203468] [ 18.203489] Allocated by task 184: [ 18.203518] kasan_save_stack+0x3c/0x68 [ 18.203561] kasan_save_track+0x20/0x40 [ 18.203599] kasan_save_alloc_info+0x40/0x58 [ 18.203643] __kasan_kmalloc+0xd4/0xd8 [ 18.203696] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.204213] kmalloc_uaf+0xb8/0x338 [ 18.204252] kunit_try_run_case+0x170/0x3f0 [ 18.204291] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.204334] kthread+0x328/0x630 [ 18.204379] ret_from_fork+0x10/0x20 [ 18.204513] [ 18.204595] Freed by task 184: [ 18.204622] kasan_save_stack+0x3c/0x68 [ 18.204697] kasan_save_track+0x20/0x40 [ 18.204733] kasan_save_free_info+0x4c/0x78 [ 18.204823] __kasan_slab_free+0x6c/0x98 [ 18.204995] kfree+0x214/0x3c8 [ 18.205028] kmalloc_uaf+0x11c/0x338 [ 18.205102] kunit_try_run_case+0x170/0x3f0 [ 18.205157] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.205237] kthread+0x328/0x630 [ 18.205290] ret_from_fork+0x10/0x20 [ 18.205342] [ 18.205388] The buggy address belongs to the object at fff00000c6173800 [ 18.205388] which belongs to the cache kmalloc-16 of size 16 [ 18.205453] The buggy address is located 8 bytes inside of [ 18.205453] freed 16-byte region [fff00000c6173800, fff00000c6173810) [ 18.205672] [ 18.205735] The buggy address belongs to the physical page: [ 18.205813] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106173 [ 18.205898] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.205951] page_type: f5(slab) [ 18.206090] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.206300] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.206403] page dumped because: kasan: bad access detected [ 18.206492] [ 18.206510] Memory state around the buggy address: [ 18.206591] fff00000c6173700: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 18.206640] fff00000c6173780: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.206724] >fff00000c6173800: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.206832] ^ [ 18.206862] fff00000c6173880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.206903] fff00000c6173900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.206965] ==================================================================
[ 12.177878] ================================================================== [ 12.178439] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.178777] Read of size 1 at addr ffff88810298e0e8 by task kunit_try_catch/201 [ 12.179110] [ 12.179212] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 12.179874] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.179888] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.179911] Call Trace: [ 12.179928] <TASK> [ 12.179949] dump_stack_lvl+0x73/0xb0 [ 12.179984] print_report+0xd1/0x650 [ 12.180007] ? __virt_addr_valid+0x1db/0x2d0 [ 12.180029] ? kmalloc_uaf+0x320/0x380 [ 12.180047] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.180068] ? kmalloc_uaf+0x320/0x380 [ 12.180087] kasan_report+0x141/0x180 [ 12.180107] ? kmalloc_uaf+0x320/0x380 [ 12.180130] __asan_report_load1_noabort+0x18/0x20 [ 12.180152] kmalloc_uaf+0x320/0x380 [ 12.180171] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.180216] ? __schedule+0x10cc/0x2b60 [ 12.180278] ? __pfx_read_tsc+0x10/0x10 [ 12.180300] ? ktime_get_ts64+0x86/0x230 [ 12.180324] kunit_try_run_case+0x1a5/0x480 [ 12.180349] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.180370] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.180393] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.180414] ? __kthread_parkme+0x82/0x180 [ 12.180433] ? preempt_count_sub+0x50/0x80 [ 12.180455] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.180476] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.180497] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.180518] kthread+0x337/0x6f0 [ 12.180537] ? trace_preempt_on+0x20/0xc0 [ 12.180559] ? __pfx_kthread+0x10/0x10 [ 12.180578] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.180597] ? calculate_sigpending+0x7b/0xa0 [ 12.180619] ? __pfx_kthread+0x10/0x10 [ 12.180639] ret_from_fork+0x116/0x1d0 [ 12.180655] ? __pfx_kthread+0x10/0x10 [ 12.180675] ret_from_fork_asm+0x1a/0x30 [ 12.180705] </TASK> [ 12.180716] [ 12.191029] Allocated by task 201: [ 12.191374] kasan_save_stack+0x45/0x70 [ 12.191542] kasan_save_track+0x18/0x40 [ 12.191677] kasan_save_alloc_info+0x3b/0x50 [ 12.191893] __kasan_kmalloc+0xb7/0xc0 [ 12.192084] __kmalloc_cache_noprof+0x189/0x420 [ 12.192546] kmalloc_uaf+0xaa/0x380 [ 12.192914] kunit_try_run_case+0x1a5/0x480 [ 12.193346] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.193576] kthread+0x337/0x6f0 [ 12.193880] ret_from_fork+0x116/0x1d0 [ 12.194131] ret_from_fork_asm+0x1a/0x30 [ 12.194295] [ 12.194628] Freed by task 201: [ 12.194749] kasan_save_stack+0x45/0x70 [ 12.195027] kasan_save_track+0x18/0x40 [ 12.195360] kasan_save_free_info+0x3f/0x60 [ 12.195745] __kasan_slab_free+0x56/0x70 [ 12.195953] kfree+0x222/0x3f0 [ 12.196089] kmalloc_uaf+0x12c/0x380 [ 12.196286] kunit_try_run_case+0x1a5/0x480 [ 12.196914] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.197130] kthread+0x337/0x6f0 [ 12.197317] ret_from_fork+0x116/0x1d0 [ 12.197524] ret_from_fork_asm+0x1a/0x30 [ 12.197888] [ 12.197971] The buggy address belongs to the object at ffff88810298e0e0 [ 12.197971] which belongs to the cache kmalloc-16 of size 16 [ 12.198963] The buggy address is located 8 bytes inside of [ 12.198963] freed 16-byte region [ffff88810298e0e0, ffff88810298e0f0) [ 12.199474] [ 12.199644] The buggy address belongs to the physical page: [ 12.199872] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10298e [ 12.200202] flags: 0x200000000000000(node=0|zone=2) [ 12.201117] page_type: f5(slab) [ 12.201290] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.201780] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.202099] page dumped because: kasan: bad access detected [ 12.202648] [ 12.202744] Memory state around the buggy address: [ 12.202940] ffff88810298df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.203491] ffff88810298e000: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc [ 12.203805] >ffff88810298e080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.204097] ^ [ 12.204662] ffff88810298e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.205052] ffff88810298e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.205456] ==================================================================