Date
July 1, 2025, 3:08 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.068335] ================================================================== [ 17.068533] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 17.069002] Read of size 1 at addr fff00000c56b6128 by task kunit_try_catch/185 [ 17.069106] [ 17.069144] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 17.069239] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.069273] Hardware name: linux,dummy-virt (DT) [ 17.069422] Call trace: [ 17.069622] show_stack+0x20/0x38 (C) [ 17.069676] dump_stack_lvl+0x8c/0xd0 [ 17.069724] print_report+0x118/0x608 [ 17.070031] kasan_report+0xdc/0x128 [ 17.070085] __asan_report_load1_noabort+0x20/0x30 [ 17.070263] kmalloc_uaf+0x300/0x338 [ 17.070496] kunit_try_run_case+0x170/0x3f0 [ 17.070770] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.070826] kthread+0x328/0x630 [ 17.070868] ret_from_fork+0x10/0x20 [ 17.070927] [ 17.070945] Allocated by task 185: [ 17.070975] kasan_save_stack+0x3c/0x68 [ 17.071388] kasan_save_track+0x20/0x40 [ 17.071434] kasan_save_alloc_info+0x40/0x58 [ 17.071831] __kasan_kmalloc+0xd4/0xd8 [ 17.072004] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.072109] kmalloc_uaf+0xb8/0x338 [ 17.072483] kunit_try_run_case+0x170/0x3f0 [ 17.072666] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.072850] kthread+0x328/0x630 [ 17.073175] ret_from_fork+0x10/0x20 [ 17.073215] [ 17.073801] Freed by task 185: [ 17.073849] kasan_save_stack+0x3c/0x68 [ 17.074555] kasan_save_track+0x20/0x40 [ 17.075009] kasan_save_free_info+0x4c/0x78 [ 17.075058] __kasan_slab_free+0x6c/0x98 [ 17.075492] kfree+0x214/0x3c8 [ 17.075740] kmalloc_uaf+0x11c/0x338 [ 17.075822] kunit_try_run_case+0x170/0x3f0 [ 17.076518] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.076989] kthread+0x328/0x630 [ 17.077299] ret_from_fork+0x10/0x20 [ 17.077662] [ 17.078085] The buggy address belongs to the object at fff00000c56b6120 [ 17.078085] which belongs to the cache kmalloc-16 of size 16 [ 17.078680] The buggy address is located 8 bytes inside of [ 17.078680] freed 16-byte region [fff00000c56b6120, fff00000c56b6130) [ 17.078879] [ 17.078904] The buggy address belongs to the physical page: [ 17.079027] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056b6 [ 17.079092] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.079144] page_type: f5(slab) [ 17.079188] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.079240] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.079282] page dumped because: kasan: bad access detected [ 17.079314] [ 17.079332] Memory state around the buggy address: [ 17.081355] fff00000c56b6000: fa fb fc fc 00 02 fc fc fa fb fc fc fa fb fc fc [ 17.081412] fff00000c56b6080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.081458] >fff00000c56b6100: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 17.081499] ^ [ 17.082604] fff00000c56b6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.082899] fff00000c56b6200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.083356] ==================================================================
[ 11.855953] ================================================================== [ 11.856481] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.856977] Read of size 1 at addr ffff8881021d56e8 by task kunit_try_catch/201 [ 11.857371] [ 11.857472] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.857856] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.857871] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.857892] Call Trace: [ 11.857906] <TASK> [ 11.857925] dump_stack_lvl+0x73/0xb0 [ 11.857957] print_report+0xd1/0x650 [ 11.857979] ? __virt_addr_valid+0x1db/0x2d0 [ 11.858002] ? kmalloc_uaf+0x320/0x380 [ 11.858035] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.858056] ? kmalloc_uaf+0x320/0x380 [ 11.858075] kasan_report+0x141/0x180 [ 11.858096] ? kmalloc_uaf+0x320/0x380 [ 11.858119] __asan_report_load1_noabort+0x18/0x20 [ 11.858142] kmalloc_uaf+0x320/0x380 [ 11.858160] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.858179] ? __schedule+0x10cc/0x2b60 [ 11.858201] ? __pfx_read_tsc+0x10/0x10 [ 11.858222] ? ktime_get_ts64+0x86/0x230 [ 11.858245] kunit_try_run_case+0x1a5/0x480 [ 11.858268] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.858289] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.858311] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.858332] ? __kthread_parkme+0x82/0x180 [ 11.858351] ? preempt_count_sub+0x50/0x80 [ 11.858374] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.858396] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.858417] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.858439] kthread+0x337/0x6f0 [ 11.858456] ? trace_preempt_on+0x20/0xc0 [ 11.858479] ? __pfx_kthread+0x10/0x10 [ 11.858499] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.858518] ? calculate_sigpending+0x7b/0xa0 [ 11.858540] ? __pfx_kthread+0x10/0x10 [ 11.858560] ret_from_fork+0x116/0x1d0 [ 11.858577] ? __pfx_kthread+0x10/0x10 [ 11.858597] ret_from_fork_asm+0x1a/0x30 [ 11.858627] </TASK> [ 11.858801] [ 11.867875] Allocated by task 201: [ 11.868203] kasan_save_stack+0x45/0x70 [ 11.868405] kasan_save_track+0x18/0x40 [ 11.868579] kasan_save_alloc_info+0x3b/0x50 [ 11.868963] __kasan_kmalloc+0xb7/0xc0 [ 11.869160] __kmalloc_cache_noprof+0x189/0x420 [ 11.869490] kmalloc_uaf+0xaa/0x380 [ 11.869677] kunit_try_run_case+0x1a5/0x480 [ 11.869955] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.870295] kthread+0x337/0x6f0 [ 11.870463] ret_from_fork+0x116/0x1d0 [ 11.870634] ret_from_fork_asm+0x1a/0x30 [ 11.870805] [ 11.870903] Freed by task 201: [ 11.871283] kasan_save_stack+0x45/0x70 [ 11.871510] kasan_save_track+0x18/0x40 [ 11.871819] kasan_save_free_info+0x3f/0x60 [ 11.872019] __kasan_slab_free+0x56/0x70 [ 11.872348] kfree+0x222/0x3f0 [ 11.872518] kmalloc_uaf+0x12c/0x380 [ 11.872778] kunit_try_run_case+0x1a5/0x480 [ 11.873045] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.873280] kthread+0x337/0x6f0 [ 11.873433] ret_from_fork+0x116/0x1d0 [ 11.873604] ret_from_fork_asm+0x1a/0x30 [ 11.874046] [ 11.874138] The buggy address belongs to the object at ffff8881021d56e0 [ 11.874138] which belongs to the cache kmalloc-16 of size 16 [ 11.874788] The buggy address is located 8 bytes inside of [ 11.874788] freed 16-byte region [ffff8881021d56e0, ffff8881021d56f0) [ 11.875387] [ 11.875627] The buggy address belongs to the physical page: [ 11.875912] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1021d5 [ 11.876329] flags: 0x200000000000000(node=0|zone=2) [ 11.876617] page_type: f5(slab) [ 11.876758] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.877089] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.877410] page dumped because: kasan: bad access detected [ 11.877641] [ 11.877740] Memory state around the buggy address: [ 11.878250] ffff8881021d5580: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc [ 11.878625] ffff8881021d5600: 00 06 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.878983] >ffff8881021d5680: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.879381] ^ [ 11.879787] ffff8881021d5700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.880088] ffff8881021d5780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.880522] ==================================================================