Date
July 15, 2025, 2:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.010073] ================================================================== [ 18.010371] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 18.010454] Read of size 1 at addr fff00000c45d8b48 by task kunit_try_catch/186 [ 18.010795] [ 18.010926] CPU: 0 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT [ 18.011026] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.011072] Hardware name: linux,dummy-virt (DT) [ 18.011119] Call trace: [ 18.011579] show_stack+0x20/0x38 (C) [ 18.011723] dump_stack_lvl+0x8c/0xd0 [ 18.011776] print_report+0x118/0x5d0 [ 18.012138] kasan_report+0xdc/0x128 [ 18.012409] __asan_report_load1_noabort+0x20/0x30 [ 18.012576] kmalloc_uaf+0x300/0x338 [ 18.012664] kunit_try_run_case+0x170/0x3f0 [ 18.012758] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.013009] kthread+0x328/0x630 [ 18.013432] ret_from_fork+0x10/0x20 [ 18.013602] [ 18.013677] Allocated by task 186: [ 18.013705] kasan_save_stack+0x3c/0x68 [ 18.013748] kasan_save_track+0x20/0x40 [ 18.013789] kasan_save_alloc_info+0x40/0x58 [ 18.013829] __kasan_kmalloc+0xd4/0xd8 [ 18.014044] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.014331] kmalloc_uaf+0xb8/0x338 [ 18.014464] kunit_try_run_case+0x170/0x3f0 [ 18.014557] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.014923] kthread+0x328/0x630 [ 18.015132] ret_from_fork+0x10/0x20 [ 18.015200] [ 18.015603] Freed by task 186: [ 18.015634] kasan_save_stack+0x3c/0x68 [ 18.015803] kasan_save_track+0x20/0x40 [ 18.016062] kasan_save_free_info+0x4c/0x78 [ 18.016144] __kasan_slab_free+0x6c/0x98 [ 18.016509] kfree+0x214/0x3c8 [ 18.016594] kmalloc_uaf+0x11c/0x338 [ 18.016673] kunit_try_run_case+0x170/0x3f0 [ 18.017324] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.017617] kthread+0x328/0x630 [ 18.017701] ret_from_fork+0x10/0x20 [ 18.017900] [ 18.017922] The buggy address belongs to the object at fff00000c45d8b40 [ 18.017922] which belongs to the cache kmalloc-16 of size 16 [ 18.018145] The buggy address is located 8 bytes inside of [ 18.018145] freed 16-byte region [fff00000c45d8b40, fff00000c45d8b50) [ 18.018483] [ 18.018594] The buggy address belongs to the physical page: [ 18.018662] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1045d8 [ 18.018766] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.018851] page_type: f5(slab) [ 18.018925] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.019044] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.019096] page dumped because: kasan: bad access detected [ 18.019292] [ 18.019510] Memory state around the buggy address: [ 18.019552] fff00000c45d8a00: fa fb fc fc fa fb fc fc 00 01 fc fc fa fb fc fc [ 18.019608] fff00000c45d8a80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.019671] >fff00000c45d8b00: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 18.019725] ^ [ 18.019762] fff00000c45d8b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.019804] fff00000c45d8c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.019853] ==================================================================
[ 11.238918] ================================================================== [ 11.240064] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.241097] Read of size 1 at addr ffff8881027e74a8 by task kunit_try_catch/203 [ 11.242019] [ 11.242201] CPU: 1 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G B N 6.15.7-rc1 #1 PREEMPT(voluntary) [ 11.242244] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.242254] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.242273] Call Trace: [ 11.242286] <TASK> [ 11.242300] dump_stack_lvl+0x73/0xb0 [ 11.242325] print_report+0xd1/0x610 [ 11.242348] ? __virt_addr_valid+0x1db/0x2d0 [ 11.242368] ? kmalloc_uaf+0x320/0x380 [ 11.242387] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.242409] ? kmalloc_uaf+0x320/0x380 [ 11.242429] kasan_report+0x141/0x180 [ 11.242450] ? kmalloc_uaf+0x320/0x380 [ 11.242475] __asan_report_load1_noabort+0x18/0x20 [ 11.242495] kmalloc_uaf+0x320/0x380 [ 11.242514] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.242538] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.242562] kunit_try_run_case+0x1a5/0x480 [ 11.242582] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.242600] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.242637] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.242660] ? __kthread_parkme+0x82/0x180 [ 11.242680] ? preempt_count_sub+0x50/0x80 [ 11.242705] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.242724] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.242746] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.242769] kthread+0x337/0x6f0 [ 11.242785] ? trace_preempt_on+0x20/0xc0 [ 11.242820] ? __pfx_kthread+0x10/0x10 [ 11.242837] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.242858] ? calculate_sigpending+0x7b/0xa0 [ 11.242888] ? __pfx_kthread+0x10/0x10 [ 11.242905] ret_from_fork+0x41/0x80 [ 11.242925] ? __pfx_kthread+0x10/0x10 [ 11.242942] ret_from_fork_asm+0x1a/0x30 [ 11.242972] </TASK> [ 11.242982] [ 11.252392] Allocated by task 203: [ 11.252582] kasan_save_stack+0x45/0x70 [ 11.252796] kasan_save_track+0x18/0x40 [ 11.252943] kasan_save_alloc_info+0x3b/0x50 [ 11.253206] __kasan_kmalloc+0xb7/0xc0 [ 11.253475] __kmalloc_cache_noprof+0x189/0x420 [ 11.254694] kmalloc_uaf+0xaa/0x380 [ 11.254971] kunit_try_run_case+0x1a5/0x480 [ 11.255149] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.255382] kthread+0x337/0x6f0 [ 11.255556] ret_from_fork+0x41/0x80 [ 11.255703] ret_from_fork_asm+0x1a/0x30 [ 11.255908] [ 11.256844] Freed by task 203: [ 11.256997] kasan_save_stack+0x45/0x70 [ 11.257153] kasan_save_track+0x18/0x40 [ 11.257329] kasan_save_free_info+0x3f/0x60 [ 11.257501] __kasan_slab_free+0x56/0x70 [ 11.257687] kfree+0x222/0x3f0 [ 11.258809] kmalloc_uaf+0x12c/0x380 [ 11.259007] kunit_try_run_case+0x1a5/0x480 [ 11.259150] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.259401] kthread+0x337/0x6f0 [ 11.259524] ret_from_fork+0x41/0x80 [ 11.259704] ret_from_fork_asm+0x1a/0x30 [ 11.259893] [ 11.260833] The buggy address belongs to the object at ffff8881027e74a0 [ 11.260833] which belongs to the cache kmalloc-16 of size 16 [ 11.262267] The buggy address is located 8 bytes inside of [ 11.262267] freed 16-byte region [ffff8881027e74a0, ffff8881027e74b0) [ 11.262686] [ 11.262786] The buggy address belongs to the physical page: [ 11.263026] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027e7 [ 11.264082] flags: 0x200000000000000(node=0|zone=2) [ 11.264306] page_type: f5(slab) [ 11.264447] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.264741] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.265070] page dumped because: kasan: bad access detected [ 11.265313] [ 11.265381] Memory state around the buggy address: [ 11.265603] ffff8881027e7380: 00 04 fc fc 00 04 fc fc 00 01 fc fc 00 01 fc fc [ 11.265888] ffff8881027e7400: 00 04 fc fc 00 04 fc fc fa fb fc fc fa fb fc fc [ 11.267102] >ffff8881027e7480: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 11.267374] ^ [ 11.267579] ffff8881027e7500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.269689] ffff8881027e7580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.269993] ==================================================================