Date
July 22, 2025, 2:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.190074] ================================================================== [ 17.190135] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 17.190190] Read of size 16 at addr fff00000c16d06a0 by task kunit_try_catch/170 [ 17.190239] [ 17.190270] CPU: 0 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT [ 17.190373] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.190399] Hardware name: linux,dummy-virt (DT) [ 17.190429] Call trace: [ 17.190462] show_stack+0x20/0x38 (C) [ 17.190519] dump_stack_lvl+0x8c/0xd0 [ 17.190567] print_report+0x118/0x5d0 [ 17.190616] kasan_report+0xdc/0x128 [ 17.190668] __asan_report_load16_noabort+0x20/0x30 [ 17.191454] kmalloc_uaf_16+0x3bc/0x438 [ 17.191668] kunit_try_run_case+0x170/0x3f0 [ 17.191741] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.191953] kthread+0x328/0x630 [ 17.192084] ret_from_fork+0x10/0x20 [ 17.192380] [ 17.192403] Allocated by task 170: [ 17.192784] kasan_save_stack+0x3c/0x68 [ 17.192900] kasan_save_track+0x20/0x40 [ 17.192987] kasan_save_alloc_info+0x40/0x58 [ 17.193026] __kasan_kmalloc+0xd4/0xd8 [ 17.193322] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.193494] kmalloc_uaf_16+0x140/0x438 [ 17.193790] kunit_try_run_case+0x170/0x3f0 [ 17.193953] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.194062] kthread+0x328/0x630 [ 17.194254] ret_from_fork+0x10/0x20 [ 17.194509] [ 17.194684] Freed by task 170: [ 17.194814] kasan_save_stack+0x3c/0x68 [ 17.194856] kasan_save_track+0x20/0x40 [ 17.194890] kasan_save_free_info+0x4c/0x78 [ 17.194927] __kasan_slab_free+0x6c/0x98 [ 17.195225] kfree+0x214/0x3c8 [ 17.195355] kmalloc_uaf_16+0x190/0x438 [ 17.195564] kunit_try_run_case+0x170/0x3f0 [ 17.195747] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.195805] kthread+0x328/0x630 [ 17.195839] ret_from_fork+0x10/0x20 [ 17.196052] [ 17.196218] The buggy address belongs to the object at fff00000c16d06a0 [ 17.196218] which belongs to the cache kmalloc-16 of size 16 [ 17.196653] The buggy address is located 0 bytes inside of [ 17.196653] freed 16-byte region [fff00000c16d06a0, fff00000c16d06b0) [ 17.196946] [ 17.196999] The buggy address belongs to the physical page: [ 17.197028] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1016d0 [ 17.197499] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.197591] page_type: f5(slab) [ 17.197657] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.197959] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.198088] page dumped because: kasan: bad access detected [ 17.198251] [ 17.198509] Memory state around the buggy address: [ 17.198618] fff00000c16d0580: 00 05 fc fc 00 05 fc fc fa fb fc fc fa fb fc fc [ 17.198807] fff00000c16d0600: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.198910] >fff00000c16d0680: 00 00 fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 17.199068] ^ [ 17.199254] fff00000c16d0700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.199352] fff00000c16d0780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.199565] ==================================================================
[ 11.120759] ================================================================== [ 11.121589] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.122030] Read of size 16 at addr ffff888102219640 by task kunit_try_catch/188 [ 11.122352] [ 11.122462] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT(voluntary) [ 11.122508] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.122519] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.122539] Call Trace: [ 11.122551] <TASK> [ 11.122568] dump_stack_lvl+0x73/0xb0 [ 11.122595] print_report+0xd1/0x610 [ 11.122617] ? __virt_addr_valid+0x1db/0x2d0 [ 11.122638] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.122658] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.122679] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.122700] kasan_report+0x141/0x180 [ 11.122721] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.122747] __asan_report_load16_noabort+0x18/0x20 [ 11.122767] kmalloc_uaf_16+0x47b/0x4c0 [ 11.122788] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.122809] ? __schedule+0x10c6/0x2b60 [ 11.122832] ? __pfx_read_tsc+0x10/0x10 [ 11.122851] ? ktime_get_ts64+0x86/0x230 [ 11.122875] kunit_try_run_case+0x1a5/0x480 [ 11.122896] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.122913] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.122933] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.122956] ? __kthread_parkme+0x82/0x180 [ 11.122977] ? preempt_count_sub+0x50/0x80 [ 11.123002] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.123021] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.123044] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.123066] kthread+0x337/0x6f0 [ 11.123082] ? trace_preempt_on+0x20/0xc0 [ 11.123106] ? __pfx_kthread+0x10/0x10 [ 11.123123] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.123144] ? calculate_sigpending+0x7b/0xa0 [ 11.123164] ? __pfx_kthread+0x10/0x10 [ 11.123182] ret_from_fork+0x41/0x80 [ 11.123201] ? __pfx_kthread+0x10/0x10 [ 11.123218] ret_from_fork_asm+0x1a/0x30 [ 11.123261] </TASK> [ 11.123271] [ 11.130522] Allocated by task 188: [ 11.130724] kasan_save_stack+0x45/0x70 [ 11.130946] kasan_save_track+0x18/0x40 [ 11.131130] kasan_save_alloc_info+0x3b/0x50 [ 11.131358] __kasan_kmalloc+0xb7/0xc0 [ 11.131535] __kmalloc_cache_noprof+0x189/0x420 [ 11.131765] kmalloc_uaf_16+0x15b/0x4c0 [ 11.131976] kunit_try_run_case+0x1a5/0x480 [ 11.132179] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.132356] kthread+0x337/0x6f0 [ 11.132471] ret_from_fork+0x41/0x80 [ 11.132719] ret_from_fork_asm+0x1a/0x30 [ 11.132934] [ 11.133029] Freed by task 188: [ 11.133181] kasan_save_stack+0x45/0x70 [ 11.133379] kasan_save_track+0x18/0x40 [ 11.133568] kasan_save_free_info+0x3f/0x60 [ 11.133775] __kasan_slab_free+0x56/0x70 [ 11.133965] kfree+0x222/0x3f0 [ 11.134074] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.134204] kunit_try_run_case+0x1a5/0x480 [ 11.134461] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.134710] kthread+0x337/0x6f0 [ 11.134896] ret_from_fork+0x41/0x80 [ 11.135119] ret_from_fork_asm+0x1a/0x30 [ 11.135303] [ 11.135371] The buggy address belongs to the object at ffff888102219640 [ 11.135371] which belongs to the cache kmalloc-16 of size 16 [ 11.136074] The buggy address is located 0 bytes inside of [ 11.136074] freed 16-byte region [ffff888102219640, ffff888102219650) [ 11.136556] [ 11.136689] The buggy address belongs to the physical page: [ 11.136947] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102219 [ 11.137341] flags: 0x200000000000000(node=0|zone=2) [ 11.137615] page_type: f5(slab) [ 11.137795] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.138117] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.138488] page dumped because: kasan: bad access detected [ 11.138802] [ 11.138896] Memory state around the buggy address: [ 11.139131] ffff888102219500: 00 01 fc fc 00 01 fc fc 00 04 fc fc 00 04 fc fc [ 11.139463] ffff888102219580: 00 05 fc fc 00 04 fc fc fa fb fc fc fa fb fc fc [ 11.139855] >ffff888102219600: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 11.140152] ^ [ 11.140476] ffff888102219680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.140763] ffff888102219700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.141085] ==================================================================