Date
July 19, 2025, 11:12 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.314081] ================================================================== [ 15.314143] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 15.314511] Read of size 1 at addr fff00000c5eb7c48 by task kunit_try_catch/184 [ 15.314856] [ 15.315342] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.315448] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.315474] Hardware name: linux,dummy-virt (DT) [ 15.315959] Call trace: [ 15.316113] show_stack+0x20/0x38 (C) [ 15.316221] dump_stack_lvl+0x8c/0xd0 [ 15.316380] print_report+0x118/0x5d0 [ 15.316508] kasan_report+0xdc/0x128 [ 15.317159] __asan_report_load1_noabort+0x20/0x30 [ 15.317272] kmalloc_uaf+0x300/0x338 [ 15.317478] kunit_try_run_case+0x170/0x3f0 [ 15.317623] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.317985] kthread+0x328/0x630 [ 15.318132] ret_from_fork+0x10/0x20 [ 15.318260] [ 15.318385] Allocated by task 184: [ 15.318539] kasan_save_stack+0x3c/0x68 [ 15.318598] kasan_save_track+0x20/0x40 [ 15.318698] kasan_save_alloc_info+0x40/0x58 [ 15.319048] __kasan_kmalloc+0xd4/0xd8 [ 15.319121] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.319449] kmalloc_uaf+0xb8/0x338 [ 15.319625] kunit_try_run_case+0x170/0x3f0 [ 15.319803] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.319941] kthread+0x328/0x630 [ 15.320051] ret_from_fork+0x10/0x20 [ 15.320217] [ 15.320438] Freed by task 184: [ 15.320525] kasan_save_stack+0x3c/0x68 [ 15.320588] kasan_save_track+0x20/0x40 [ 15.320638] kasan_save_free_info+0x4c/0x78 [ 15.320678] __kasan_slab_free+0x6c/0x98 [ 15.320743] kfree+0x214/0x3c8 [ 15.320795] kmalloc_uaf+0x11c/0x338 [ 15.320829] kunit_try_run_case+0x170/0x3f0 [ 15.320868] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.320911] kthread+0x328/0x630 [ 15.320971] ret_from_fork+0x10/0x20 [ 15.321015] [ 15.321035] The buggy address belongs to the object at fff00000c5eb7c40 [ 15.321035] which belongs to the cache kmalloc-16 of size 16 [ 15.321101] The buggy address is located 8 bytes inside of [ 15.321101] freed 16-byte region [fff00000c5eb7c40, fff00000c5eb7c50) [ 15.321162] [ 15.321184] The buggy address belongs to the physical page: [ 15.321230] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105eb7 [ 15.321286] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.321336] page_type: f5(slab) [ 15.321384] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.321449] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.321499] page dumped because: kasan: bad access detected [ 15.321531] [ 15.321550] Memory state around the buggy address: [ 15.321591] fff00000c5eb7b00: fa fb fc fc 00 01 fc fc 00 01 fc fc fa fb fc fc [ 15.321656] fff00000c5eb7b80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.321726] >fff00000c5eb7c00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 15.321775] ^ [ 15.321818] fff00000c5eb7c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.321870] fff00000c5eb7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.321908] ==================================================================
[ 12.270582] ================================================================== [ 12.271635] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.271858] Read of size 1 at addr ffff888101df6d28 by task kunit_try_catch/201 [ 12.272097] [ 12.272185] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.272228] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.272239] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.272259] Call Trace: [ 12.272271] <TASK> [ 12.272287] dump_stack_lvl+0x73/0xb0 [ 12.272314] print_report+0xd1/0x610 [ 12.272335] ? __virt_addr_valid+0x1db/0x2d0 [ 12.272356] ? kmalloc_uaf+0x320/0x380 [ 12.272385] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.272406] ? kmalloc_uaf+0x320/0x380 [ 12.272425] kasan_report+0x141/0x180 [ 12.272446] ? kmalloc_uaf+0x320/0x380 [ 12.272469] __asan_report_load1_noabort+0x18/0x20 [ 12.272492] kmalloc_uaf+0x320/0x380 [ 12.272510] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.272530] ? __schedule+0x10cc/0x2b60 [ 12.272551] ? __pfx_read_tsc+0x10/0x10 [ 12.272571] ? ktime_get_ts64+0x86/0x230 [ 12.272594] kunit_try_run_case+0x1a5/0x480 [ 12.272618] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.272698] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.272721] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.272743] ? __kthread_parkme+0x82/0x180 [ 12.272763] ? preempt_count_sub+0x50/0x80 [ 12.272786] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.272809] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.272831] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.272853] kthread+0x337/0x6f0 [ 12.272872] ? trace_preempt_on+0x20/0xc0 [ 12.272893] ? __pfx_kthread+0x10/0x10 [ 12.272913] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.272933] ? calculate_sigpending+0x7b/0xa0 [ 12.272955] ? __pfx_kthread+0x10/0x10 [ 12.272982] ret_from_fork+0x116/0x1d0 [ 12.273000] ? __pfx_kthread+0x10/0x10 [ 12.273030] ret_from_fork_asm+0x1a/0x30 [ 12.273059] </TASK> [ 12.273069] [ 12.286040] Allocated by task 201: [ 12.286501] kasan_save_stack+0x45/0x70 [ 12.286872] kasan_save_track+0x18/0x40 [ 12.287036] kasan_save_alloc_info+0x3b/0x50 [ 12.287189] __kasan_kmalloc+0xb7/0xc0 [ 12.287322] __kmalloc_cache_noprof+0x189/0x420 [ 12.287759] kmalloc_uaf+0xaa/0x380 [ 12.288204] kunit_try_run_case+0x1a5/0x480 [ 12.288686] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.289175] kthread+0x337/0x6f0 [ 12.289514] ret_from_fork+0x116/0x1d0 [ 12.289890] ret_from_fork_asm+0x1a/0x30 [ 12.290261] [ 12.290368] Freed by task 201: [ 12.290528] kasan_save_stack+0x45/0x70 [ 12.290891] kasan_save_track+0x18/0x40 [ 12.291241] kasan_save_free_info+0x3f/0x60 [ 12.291591] __kasan_slab_free+0x56/0x70 [ 12.291738] kfree+0x222/0x3f0 [ 12.291855] kmalloc_uaf+0x12c/0x380 [ 12.291983] kunit_try_run_case+0x1a5/0x480 [ 12.292144] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.292319] kthread+0x337/0x6f0 [ 12.292467] ret_from_fork+0x116/0x1d0 [ 12.292599] ret_from_fork_asm+0x1a/0x30 [ 12.292877] [ 12.292980] The buggy address belongs to the object at ffff888101df6d20 [ 12.292980] which belongs to the cache kmalloc-16 of size 16 [ 12.293482] The buggy address is located 8 bytes inside of [ 12.293482] freed 16-byte region [ffff888101df6d20, ffff888101df6d30) [ 12.293869] [ 12.293968] The buggy address belongs to the physical page: [ 12.294230] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101df6 [ 12.294624] flags: 0x200000000000000(node=0|zone=2) [ 12.294788] page_type: f5(slab) [ 12.294907] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.295257] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.295669] page dumped because: kasan: bad access detected [ 12.295893] [ 12.295985] Memory state around the buggy address: [ 12.296195] ffff888101df6c00: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 12.296473] ffff888101df6c80: fa fb fc fc fa fb fc fc 00 05 fc fc fa fb fc fc [ 12.296765] >ffff888101df6d00: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 12.297018] ^ [ 12.297166] ffff888101df6d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.297418] ffff888101df6e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.297824] ==================================================================