Date
July 22, 2025, 2:40 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.369738] ================================================================== [ 17.369880] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 17.369957] Read of size 1 at addr fff00000c6fca128 by task kunit_try_catch/190 [ 17.370009] [ 17.370047] CPU: 0 UID: 0 PID: 190 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT [ 17.370342] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.370508] Hardware name: linux,dummy-virt (DT) [ 17.370551] Call trace: [ 17.370623] show_stack+0x20/0x38 (C) [ 17.370698] dump_stack_lvl+0x8c/0xd0 [ 17.370825] print_report+0x118/0x5d0 [ 17.370913] kasan_report+0xdc/0x128 [ 17.370967] __asan_report_load1_noabort+0x20/0x30 [ 17.371192] kmalloc_uaf2+0x3f4/0x468 [ 17.371423] kunit_try_run_case+0x170/0x3f0 [ 17.371574] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.371662] kthread+0x328/0x630 [ 17.371818] ret_from_fork+0x10/0x20 [ 17.371921] [ 17.371947] Allocated by task 190: [ 17.371984] kasan_save_stack+0x3c/0x68 [ 17.372246] kasan_save_track+0x20/0x40 [ 17.372392] kasan_save_alloc_info+0x40/0x58 [ 17.372624] __kasan_kmalloc+0xd4/0xd8 [ 17.372701] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.372861] kmalloc_uaf2+0xc4/0x468 [ 17.372901] kunit_try_run_case+0x170/0x3f0 [ 17.372976] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.373318] kthread+0x328/0x630 [ 17.373551] ret_from_fork+0x10/0x20 [ 17.373646] [ 17.373813] Freed by task 190: [ 17.373843] kasan_save_stack+0x3c/0x68 [ 17.373927] kasan_save_track+0x20/0x40 [ 17.374145] kasan_save_free_info+0x4c/0x78 [ 17.374833] __kasan_slab_free+0x6c/0x98 [ 17.374956] kfree+0x214/0x3c8 [ 17.375292] kmalloc_uaf2+0x134/0x468 [ 17.375358] kunit_try_run_case+0x170/0x3f0 [ 17.375420] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.375557] kthread+0x328/0x630 [ 17.375661] ret_from_fork+0x10/0x20 [ 17.375697] [ 17.375717] The buggy address belongs to the object at fff00000c6fca100 [ 17.375717] which belongs to the cache kmalloc-64 of size 64 [ 17.375776] The buggy address is located 40 bytes inside of [ 17.375776] freed 64-byte region [fff00000c6fca100, fff00000c6fca140) [ 17.376410] [ 17.376470] The buggy address belongs to the physical page: [ 17.376566] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fca [ 17.376653] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.376721] page_type: f5(slab) [ 17.377078] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 17.377358] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 17.377429] page dumped because: kasan: bad access detected [ 17.377567] [ 17.377596] Memory state around the buggy address: [ 17.377629] fff00000c6fca000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.377706] fff00000c6fca080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.377761] >fff00000c6fca100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 17.377801] ^ [ 17.377833] fff00000c6fca180: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 17.377876] fff00000c6fca200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.377917] ==================================================================
[ 11.408248] ================================================================== [ 11.408698] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 11.409406] Read of size 1 at addr ffff888103075ea8 by task kunit_try_catch/208 [ 11.410279] [ 11.410523] CPU: 0 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G B N 6.15.8-rc1 #1 PREEMPT(voluntary) [ 11.410571] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.410582] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.410604] Call Trace: [ 11.410619] <TASK> [ 11.410638] dump_stack_lvl+0x73/0xb0 [ 11.410740] print_report+0xd1/0x610 [ 11.410769] ? __virt_addr_valid+0x1db/0x2d0 [ 11.410791] ? kmalloc_uaf2+0x4a8/0x520 [ 11.410811] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.410833] ? kmalloc_uaf2+0x4a8/0x520 [ 11.410888] kasan_report+0x141/0x180 [ 11.410910] ? kmalloc_uaf2+0x4a8/0x520 [ 11.410935] __asan_report_load1_noabort+0x18/0x20 [ 11.410955] kmalloc_uaf2+0x4a8/0x520 [ 11.410975] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 11.410994] ? finish_task_switch.isra.0+0x153/0x700 [ 11.411019] ? __switch_to+0x5d9/0xf60 [ 11.411066] ? dequeue_task_fair+0x166/0x4e0 [ 11.411092] ? __schedule+0x10c6/0x2b60 [ 11.411117] ? __pfx_read_tsc+0x10/0x10 [ 11.411137] ? ktime_get_ts64+0x86/0x230 [ 11.411162] kunit_try_run_case+0x1a5/0x480 [ 11.411183] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.411201] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.411232] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.411256] ? __kthread_parkme+0x82/0x180 [ 11.411278] ? preempt_count_sub+0x50/0x80 [ 11.411302] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.411321] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.411343] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.411365] kthread+0x337/0x6f0 [ 11.411382] ? trace_preempt_on+0x20/0xc0 [ 11.411405] ? __pfx_kthread+0x10/0x10 [ 11.411422] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.411444] ? calculate_sigpending+0x7b/0xa0 [ 11.411466] ? __pfx_kthread+0x10/0x10 [ 11.411483] ret_from_fork+0x41/0x80 [ 11.411503] ? __pfx_kthread+0x10/0x10 [ 11.411520] ret_from_fork_asm+0x1a/0x30 [ 11.411552] </TASK> [ 11.411563] [ 11.419472] Allocated by task 208: [ 11.419740] kasan_save_stack+0x45/0x70 [ 11.419974] kasan_save_track+0x18/0x40 [ 11.420173] kasan_save_alloc_info+0x3b/0x50 [ 11.420450] __kasan_kmalloc+0xb7/0xc0 [ 11.420590] __kmalloc_cache_noprof+0x189/0x420 [ 11.421027] kmalloc_uaf2+0xc6/0x520 [ 11.421259] kunit_try_run_case+0x1a5/0x480 [ 11.421477] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.421891] kthread+0x337/0x6f0 [ 11.422090] ret_from_fork+0x41/0x80 [ 11.422309] ret_from_fork_asm+0x1a/0x30 [ 11.422586] [ 11.422753] Freed by task 208: [ 11.422863] kasan_save_stack+0x45/0x70 [ 11.422998] kasan_save_track+0x18/0x40 [ 11.423129] kasan_save_free_info+0x3f/0x60 [ 11.423345] __kasan_slab_free+0x56/0x70 [ 11.423537] kfree+0x222/0x3f0 [ 11.423696] kmalloc_uaf2+0x14c/0x520 [ 11.423883] kunit_try_run_case+0x1a5/0x480 [ 11.424051] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.424219] kthread+0x337/0x6f0 [ 11.424341] ret_from_fork+0x41/0x80 [ 11.424525] ret_from_fork_asm+0x1a/0x30 [ 11.424720] [ 11.424812] The buggy address belongs to the object at ffff888103075e80 [ 11.424812] which belongs to the cache kmalloc-64 of size 64 [ 11.425517] The buggy address is located 40 bytes inside of [ 11.425517] freed 64-byte region [ffff888103075e80, ffff888103075ec0) [ 11.426177] [ 11.426297] The buggy address belongs to the physical page: [ 11.426574] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103075 [ 11.426810] flags: 0x200000000000000(node=0|zone=2) [ 11.426969] page_type: f5(slab) [ 11.427088] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 11.427321] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 11.427786] page dumped because: kasan: bad access detected [ 11.428103] [ 11.428233] Memory state around the buggy address: [ 11.428514] ffff888103075d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.429076] ffff888103075e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.429980] >ffff888103075e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 11.431101] ^ [ 11.431279] ffff888103075f00: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 11.432088] ffff888103075f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.432827] ==================================================================