Date
July 5, 2025, 5:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.412715] ================================================================== [ 18.412775] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 18.412825] Read of size 1 at addr fff00000c5cb3708 by task kunit_try_catch/184 [ 18.412893] [ 18.413004] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.413272] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.413411] Hardware name: linux,dummy-virt (DT) [ 18.413463] Call trace: [ 18.413486] show_stack+0x20/0x38 (C) [ 18.413710] dump_stack_lvl+0x8c/0xd0 [ 18.413757] print_report+0x118/0x608 [ 18.413801] kasan_report+0xdc/0x128 [ 18.413844] __asan_report_load1_noabort+0x20/0x30 [ 18.413905] kmalloc_uaf+0x300/0x338 [ 18.413946] kunit_try_run_case+0x170/0x3f0 [ 18.413992] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.414042] kthread+0x328/0x630 [ 18.414083] ret_from_fork+0x10/0x20 [ 18.414130] [ 18.414148] Allocated by task 184: [ 18.414173] kasan_save_stack+0x3c/0x68 [ 18.414212] kasan_save_track+0x20/0x40 [ 18.414250] kasan_save_alloc_info+0x40/0x58 [ 18.414290] __kasan_kmalloc+0xd4/0xd8 [ 18.414327] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.414365] kmalloc_uaf+0xb8/0x338 [ 18.414399] kunit_try_run_case+0x170/0x3f0 [ 18.414435] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.414489] kthread+0x328/0x630 [ 18.414523] ret_from_fork+0x10/0x20 [ 18.414557] [ 18.414576] Freed by task 184: [ 18.414601] kasan_save_stack+0x3c/0x68 [ 18.414638] kasan_save_track+0x20/0x40 [ 18.414674] kasan_save_free_info+0x4c/0x78 [ 18.414713] __kasan_slab_free+0x6c/0x98 [ 18.414750] kfree+0x214/0x3c8 [ 18.414803] kmalloc_uaf+0x11c/0x338 [ 18.414999] kunit_try_run_case+0x170/0x3f0 [ 18.415040] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.415099] kthread+0x328/0x630 [ 18.415132] ret_from_fork+0x10/0x20 [ 18.415169] [ 18.415187] The buggy address belongs to the object at fff00000c5cb3700 [ 18.415187] which belongs to the cache kmalloc-16 of size 16 [ 18.415243] The buggy address is located 8 bytes inside of [ 18.415243] freed 16-byte region [fff00000c5cb3700, fff00000c5cb3710) [ 18.415302] [ 18.415323] The buggy address belongs to the physical page: [ 18.415353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105cb3 [ 18.415402] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.415463] page_type: f5(slab) [ 18.415501] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.415632] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.415672] page dumped because: kasan: bad access detected [ 18.415732] [ 18.415750] Memory state around the buggy address: [ 18.415781] fff00000c5cb3600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.415868] fff00000c5cb3680: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.415954] >fff00000c5cb3700: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.415991] ^ [ 18.416049] fff00000c5cb3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.416090] fff00000c5cb3800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.416128] ==================================================================
[ 11.851434] ================================================================== [ 11.852672] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.853130] Read of size 1 at addr ffff88810274c248 by task kunit_try_catch/202 [ 11.853628] [ 11.853894] CPU: 1 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.853986] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.853998] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.854021] Call Trace: [ 11.854047] <TASK> [ 11.854065] dump_stack_lvl+0x73/0xb0 [ 11.854097] print_report+0xd1/0x650 [ 11.854120] ? __virt_addr_valid+0x1db/0x2d0 [ 11.854143] ? kmalloc_uaf+0x320/0x380 [ 11.854163] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.854184] ? kmalloc_uaf+0x320/0x380 [ 11.854215] kasan_report+0x141/0x180 [ 11.854238] ? kmalloc_uaf+0x320/0x380 [ 11.854262] __asan_report_load1_noabort+0x18/0x20 [ 11.854285] kmalloc_uaf+0x320/0x380 [ 11.854304] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.854324] ? __schedule+0x10cc/0x2b60 [ 11.854345] ? __pfx_read_tsc+0x10/0x10 [ 11.854365] ? ktime_get_ts64+0x86/0x230 [ 11.854390] kunit_try_run_case+0x1a5/0x480 [ 11.854414] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.854436] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.854468] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.854490] ? __kthread_parkme+0x82/0x180 [ 11.854510] ? preempt_count_sub+0x50/0x80 [ 11.854532] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.854555] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.854576] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.854598] kthread+0x337/0x6f0 [ 11.854617] ? trace_preempt_on+0x20/0xc0 [ 11.854639] ? __pfx_kthread+0x10/0x10 [ 11.854659] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.854679] ? calculate_sigpending+0x7b/0xa0 [ 11.854702] ? __pfx_kthread+0x10/0x10 [ 11.854723] ret_from_fork+0x116/0x1d0 [ 11.854740] ? __pfx_kthread+0x10/0x10 [ 11.854759] ret_from_fork_asm+0x1a/0x30 [ 11.854790] </TASK> [ 11.854801] [ 11.868529] Allocated by task 202: [ 11.868672] kasan_save_stack+0x45/0x70 [ 11.868817] kasan_save_track+0x18/0x40 [ 11.868949] kasan_save_alloc_info+0x3b/0x50 [ 11.869092] __kasan_kmalloc+0xb7/0xc0 [ 11.869221] __kmalloc_cache_noprof+0x189/0x420 [ 11.869449] kmalloc_uaf+0xaa/0x380 [ 11.869949] kunit_try_run_case+0x1a5/0x480 [ 11.870555] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.870868] kthread+0x337/0x6f0 [ 11.871182] ret_from_fork+0x116/0x1d0 [ 11.871644] ret_from_fork_asm+0x1a/0x30 [ 11.872178] [ 11.872439] Freed by task 202: [ 11.872568] kasan_save_stack+0x45/0x70 [ 11.873011] kasan_save_track+0x18/0x40 [ 11.873179] kasan_save_free_info+0x3f/0x60 [ 11.873716] __kasan_slab_free+0x56/0x70 [ 11.874094] kfree+0x222/0x3f0 [ 11.874342] kmalloc_uaf+0x12c/0x380 [ 11.874487] kunit_try_run_case+0x1a5/0x480 [ 11.874631] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.875083] kthread+0x337/0x6f0 [ 11.875434] ret_from_fork+0x116/0x1d0 [ 11.875838] ret_from_fork_asm+0x1a/0x30 [ 11.876244] [ 11.876408] The buggy address belongs to the object at ffff88810274c240 [ 11.876408] which belongs to the cache kmalloc-16 of size 16 [ 11.877070] The buggy address is located 8 bytes inside of [ 11.877070] freed 16-byte region [ffff88810274c240, ffff88810274c250) [ 11.878046] [ 11.878429] The buggy address belongs to the physical page: [ 11.878726] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10274c [ 11.878970] flags: 0x200000000000000(node=0|zone=2) [ 11.879133] page_type: f5(slab) [ 11.879269] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.879845] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.880248] page dumped because: kasan: bad access detected [ 11.880530] [ 11.880631] Memory state around the buggy address: [ 11.880894] ffff88810274c100: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 11.881152] ffff88810274c180: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.881712] >ffff88810274c200: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 11.882102] ^ [ 11.882319] ffff88810274c280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.882659] ffff88810274c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.883001] ==================================================================