Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 23.812256] ================================================================== [ 23.812414] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 23.812567] Read of size 16 at addr fff00000c3fab700 by task kunit_try_catch/170 [ 23.812785] [ 23.812934] CPU: 0 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT [ 23.813185] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.813314] Hardware name: linux,dummy-virt (DT) [ 23.813420] Call trace: [ 23.813699] show_stack+0x20/0x38 (C) [ 23.813840] dump_stack_lvl+0x8c/0xd0 [ 23.814034] print_report+0x118/0x608 [ 23.814161] kasan_report+0xdc/0x128 [ 23.814297] __asan_report_load16_noabort+0x20/0x30 [ 23.814575] kmalloc_uaf_16+0x3bc/0x438 [ 23.814716] kunit_try_run_case+0x170/0x3f0 [ 23.815293] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.815611] kthread+0x328/0x630 [ 23.815966] ret_from_fork+0x10/0x20 [ 23.816273] [ 23.816355] Allocated by task 170: [ 23.816475] kasan_save_stack+0x3c/0x68 [ 23.816580] kasan_save_track+0x20/0x40 [ 23.817042] kasan_save_alloc_info+0x40/0x58 [ 23.817333] __kasan_kmalloc+0xd4/0xd8 [ 23.817454] __kmalloc_cache_noprof+0x16c/0x3c0 [ 23.817683] kmalloc_uaf_16+0x140/0x438 [ 23.818097] kunit_try_run_case+0x170/0x3f0 [ 23.818219] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.818355] kthread+0x328/0x630 [ 23.818465] ret_from_fork+0x10/0x20 [ 23.818611] [ 23.818691] Freed by task 170: [ 23.818882] kasan_save_stack+0x3c/0x68 [ 23.819048] kasan_save_track+0x20/0x40 [ 23.819289] kasan_save_free_info+0x4c/0x78 [ 23.819409] __kasan_slab_free+0x6c/0x98 [ 23.819516] kfree+0x214/0x3c8 [ 23.819679] kmalloc_uaf_16+0x190/0x438 [ 23.819802] kunit_try_run_case+0x170/0x3f0 [ 23.819893] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 23.819997] kthread+0x328/0x630 [ 23.820081] ret_from_fork+0x10/0x20 [ 23.820175] [ 23.820228] The buggy address belongs to the object at fff00000c3fab700 [ 23.820228] which belongs to the cache kmalloc-16 of size 16 [ 23.820433] The buggy address is located 0 bytes inside of [ 23.820433] freed 16-byte region [fff00000c3fab700, fff00000c3fab710) [ 23.820600] [ 23.820658] The buggy address belongs to the physical page: [ 23.820839] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fab [ 23.820977] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 23.821099] page_type: f5(slab) [ 23.821217] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 23.821361] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 23.821678] page dumped because: kasan: bad access detected [ 23.821785] [ 23.821837] Memory state around the buggy address: [ 23.822000] fff00000c3fab600: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 23.822115] fff00000c3fab680: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 23.822275] >fff00000c3fab700: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.822372] ^ [ 23.822459] fff00000c3fab780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.822638] fff00000c3fab800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.822874] ==================================================================
[ 11.732106] ================================================================== [ 11.732978] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 11.733304] Read of size 16 at addr ffff8881023b0f60 by task kunit_try_catch/188 [ 11.733692] [ 11.733829] CPU: 0 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 11.733976] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.734004] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.734048] Call Trace: [ 11.734079] <TASK> [ 11.734118] dump_stack_lvl+0x73/0xb0 [ 11.734192] print_report+0xd1/0x650 [ 11.734235] ? __virt_addr_valid+0x1db/0x2d0 [ 11.734283] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.734316] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.734353] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.734388] kasan_report+0x141/0x180 [ 11.734426] ? kmalloc_uaf_16+0x47b/0x4c0 [ 11.734473] __asan_report_load16_noabort+0x18/0x20 [ 11.734515] kmalloc_uaf_16+0x47b/0x4c0 [ 11.734559] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 11.734604] ? __schedule+0x10cc/0x2b60 [ 11.734668] ? __pfx_read_tsc+0x10/0x10 [ 11.734711] ? ktime_get_ts64+0x86/0x230 [ 11.734766] kunit_try_run_case+0x1a5/0x480 [ 11.734818] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.735190] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.735272] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.735317] ? __kthread_parkme+0x82/0x180 [ 11.735355] ? preempt_count_sub+0x50/0x80 [ 11.735394] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.735428] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.735453] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.735474] kthread+0x337/0x6f0 [ 11.735491] ? trace_preempt_on+0x20/0xc0 [ 11.735514] ? __pfx_kthread+0x10/0x10 [ 11.735530] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.735565] ? calculate_sigpending+0x7b/0xa0 [ 11.735586] ? __pfx_kthread+0x10/0x10 [ 11.735603] ret_from_fork+0x41/0x80 [ 11.735641] ? __pfx_kthread+0x10/0x10 [ 11.735662] ret_from_fork_asm+0x1a/0x30 [ 11.735692] </TASK> [ 11.735705] [ 11.747259] Allocated by task 188: [ 11.747808] kasan_save_stack+0x45/0x70 [ 11.748160] kasan_save_track+0x18/0x40 [ 11.748884] kasan_save_alloc_info+0x3b/0x50 [ 11.749254] __kasan_kmalloc+0xb7/0xc0 [ 11.750007] __kmalloc_cache_noprof+0x189/0x420 [ 11.750211] kmalloc_uaf_16+0x15b/0x4c0 [ 11.750422] kunit_try_run_case+0x1a5/0x480 [ 11.750691] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.751096] kthread+0x337/0x6f0 [ 11.751478] ret_from_fork+0x41/0x80 [ 11.751794] ret_from_fork_asm+0x1a/0x30 [ 11.751986] [ 11.752124] Freed by task 188: [ 11.752489] kasan_save_stack+0x45/0x70 [ 11.752710] kasan_save_track+0x18/0x40 [ 11.752948] kasan_save_free_info+0x3f/0x60 [ 11.753229] __kasan_slab_free+0x56/0x70 [ 11.754075] kfree+0x222/0x3f0 [ 11.754353] kmalloc_uaf_16+0x1d6/0x4c0 [ 11.754702] kunit_try_run_case+0x1a5/0x480 [ 11.755016] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.755485] kthread+0x337/0x6f0 [ 11.755674] ret_from_fork+0x41/0x80 [ 11.755888] ret_from_fork_asm+0x1a/0x30 [ 11.756168] [ 11.756427] The buggy address belongs to the object at ffff8881023b0f60 [ 11.756427] which belongs to the cache kmalloc-16 of size 16 [ 11.757147] The buggy address is located 0 bytes inside of [ 11.757147] freed 16-byte region [ffff8881023b0f60, ffff8881023b0f70) [ 11.757940] [ 11.758122] The buggy address belongs to the physical page: [ 11.759074] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023b0 [ 11.759498] flags: 0x200000000000000(node=0|zone=2) [ 11.759767] page_type: f5(slab) [ 11.760027] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.760329] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.760993] page dumped because: kasan: bad access detected [ 11.761486] [ 11.761676] Memory state around the buggy address: [ 11.761906] ffff8881023b0e00: 00 03 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 11.762514] ffff8881023b0e80: fa fb fc fc 00 00 fc fc fa fb fc fc 00 00 fc fc [ 11.762881] >ffff8881023b0f00: 00 04 fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 11.763245] ^ [ 11.763828] ffff8881023b0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.764126] ffff8881023b1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 11.765316] ==================================================================