Date
July 15, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.731606] ================================================================== [ 15.731669] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468 [ 15.731725] Read of size 1 at addr fff00000c594b1a8 by task kunit_try_catch/189 [ 15.731775] [ 15.731809] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.731890] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.731918] Hardware name: linux,dummy-virt (DT) [ 15.731951] Call trace: [ 15.731972] show_stack+0x20/0x38 (C) [ 15.732021] dump_stack_lvl+0x8c/0xd0 [ 15.732067] print_report+0x118/0x5d0 [ 15.732113] kasan_report+0xdc/0x128 [ 15.732156] __asan_report_load1_noabort+0x20/0x30 [ 15.732221] kmalloc_uaf2+0x3f4/0x468 [ 15.732264] kunit_try_run_case+0x170/0x3f0 [ 15.733334] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.733537] kthread+0x328/0x630 [ 15.733650] ret_from_fork+0x10/0x20 [ 15.733765] [ 15.733784] Allocated by task 189: [ 15.733896] kasan_save_stack+0x3c/0x68 [ 15.734691] kasan_save_track+0x20/0x40 [ 15.736023] kasan_save_alloc_info+0x40/0x58 [ 15.736546] __kasan_kmalloc+0xd4/0xd8 [ 15.736591] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.736769] kmalloc_uaf2+0xc4/0x468 [ 15.737010] kunit_try_run_case+0x170/0x3f0 [ 15.737081] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.737306] kthread+0x328/0x630 [ 15.737340] ret_from_fork+0x10/0x20 [ 15.737376] [ 15.737396] Freed by task 189: [ 15.737422] kasan_save_stack+0x3c/0x68 [ 15.737657] kasan_save_track+0x20/0x40 [ 15.738216] kasan_save_free_info+0x4c/0x78 [ 15.738363] __kasan_slab_free+0x6c/0x98 [ 15.738403] kfree+0x214/0x3c8 [ 15.738773] kmalloc_uaf2+0x134/0x468 [ 15.738947] kunit_try_run_case+0x170/0x3f0 [ 15.739061] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.739106] kthread+0x328/0x630 [ 15.739138] ret_from_fork+0x10/0x20 [ 15.739451] [ 15.739944] The buggy address belongs to the object at fff00000c594b180 [ 15.739944] which belongs to the cache kmalloc-64 of size 64 [ 15.740310] The buggy address is located 40 bytes inside of [ 15.740310] freed 64-byte region [fff00000c594b180, fff00000c594b1c0) [ 15.740635] [ 15.740719] The buggy address belongs to the physical page: [ 15.740770] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10594b [ 15.740831] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.740880] page_type: f5(slab) [ 15.741254] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 15.741562] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 15.742097] page dumped because: kasan: bad access detected [ 15.742325] [ 15.742352] Memory state around the buggy address: [ 15.742385] fff00000c594b080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.742439] fff00000c594b100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.742483] >fff00000c594b180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 15.742797] ^ [ 15.742834] fff00000c594b200: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 15.742877] fff00000c594b280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.742916] ==================================================================
[ 12.844161] ================================================================== [ 12.845488] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520 [ 12.846375] Read of size 1 at addr ffff8881032c88a8 by task kunit_try_catch/205 [ 12.847052] [ 12.847232] CPU: 0 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.847278] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.847289] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.847310] Call Trace: [ 12.847322] <TASK> [ 12.847339] dump_stack_lvl+0x73/0xb0 [ 12.847369] print_report+0xd1/0x610 [ 12.847391] ? __virt_addr_valid+0x1db/0x2d0 [ 12.847416] ? kmalloc_uaf2+0x4a8/0x520 [ 12.847482] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.847509] ? kmalloc_uaf2+0x4a8/0x520 [ 12.847530] kasan_report+0x141/0x180 [ 12.847553] ? kmalloc_uaf2+0x4a8/0x520 [ 12.847578] __asan_report_load1_noabort+0x18/0x20 [ 12.847603] kmalloc_uaf2+0x4a8/0x520 [ 12.847623] ? __pfx_kmalloc_uaf2+0x10/0x10 [ 12.847643] ? finish_task_switch.isra.0+0x153/0x700 [ 12.847667] ? __switch_to+0x47/0xf50 [ 12.847693] ? __schedule+0x10cc/0x2b60 [ 12.847716] ? __pfx_read_tsc+0x10/0x10 [ 12.847737] ? ktime_get_ts64+0x86/0x230 [ 12.847775] kunit_try_run_case+0x1a5/0x480 [ 12.847800] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.847823] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.847848] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.847872] ? __kthread_parkme+0x82/0x180 [ 12.847893] ? preempt_count_sub+0x50/0x80 [ 12.847917] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.847941] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.847966] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.847991] kthread+0x337/0x6f0 [ 12.848011] ? trace_preempt_on+0x20/0xc0 [ 12.848035] ? __pfx_kthread+0x10/0x10 [ 12.848056] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.848079] ? calculate_sigpending+0x7b/0xa0 [ 12.848104] ? __pfx_kthread+0x10/0x10 [ 12.848125] ret_from_fork+0x116/0x1d0 [ 12.848144] ? __pfx_kthread+0x10/0x10 [ 12.848164] ret_from_fork_asm+0x1a/0x30 [ 12.848195] </TASK> [ 12.848205] [ 12.862504] Allocated by task 205: [ 12.862740] kasan_save_stack+0x45/0x70 [ 12.862897] kasan_save_track+0x18/0x40 [ 12.863033] kasan_save_alloc_info+0x3b/0x50 [ 12.863182] __kasan_kmalloc+0xb7/0xc0 [ 12.863314] __kmalloc_cache_noprof+0x189/0x420 [ 12.863784] kmalloc_uaf2+0xc6/0x520 [ 12.864166] kunit_try_run_case+0x1a5/0x480 [ 12.864636] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.865205] kthread+0x337/0x6f0 [ 12.865558] ret_from_fork+0x116/0x1d0 [ 12.866076] ret_from_fork_asm+0x1a/0x30 [ 12.866524] [ 12.866784] Freed by task 205: [ 12.867066] kasan_save_stack+0x45/0x70 [ 12.867430] kasan_save_track+0x18/0x40 [ 12.867665] kasan_save_free_info+0x3f/0x60 [ 12.868069] __kasan_slab_free+0x56/0x70 [ 12.868308] kfree+0x222/0x3f0 [ 12.868648] kmalloc_uaf2+0x14c/0x520 [ 12.868902] kunit_try_run_case+0x1a5/0x480 [ 12.869050] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.869226] kthread+0x337/0x6f0 [ 12.869390] ret_from_fork+0x116/0x1d0 [ 12.869738] ret_from_fork_asm+0x1a/0x30 [ 12.870157] [ 12.870510] The buggy address belongs to the object at ffff8881032c8880 [ 12.870510] which belongs to the cache kmalloc-64 of size 64 [ 12.871569] The buggy address is located 40 bytes inside of [ 12.871569] freed 64-byte region [ffff8881032c8880, ffff8881032c88c0) [ 12.872645] [ 12.872831] The buggy address belongs to the physical page: [ 12.873050] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1032c8 [ 12.873291] flags: 0x200000000000000(node=0|zone=2) [ 12.873528] page_type: f5(slab) [ 12.873831] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 12.874580] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 12.875219] page dumped because: kasan: bad access detected [ 12.875733] [ 12.876055] Memory state around the buggy address: [ 12.876560] ffff8881032c8780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.877061] ffff8881032c8800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.877281] >ffff8881032c8880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 12.877705] ^ [ 12.878109] ffff8881032c8900: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc [ 12.878774] ffff8881032c8980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.879476] ==================================================================