Date
June 25, 2025, 8:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 26.594657] ================================================================== [ 26.594715] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 26.594775] Read of size 16 at addr fff00000c3f9db00 by task kunit_try_catch/180 [ 26.594893] [ 26.594934] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250625 #1 PREEMPT [ 26.595019] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.595044] Hardware name: linux,dummy-virt (DT) [ 26.595075] Call trace: [ 26.595097] show_stack+0x20/0x38 (C) [ 26.595148] dump_stack_lvl+0x8c/0xd0 [ 26.595197] print_report+0x118/0x608 [ 26.595243] kasan_report+0xdc/0x128 [ 26.595298] __asan_report_load16_noabort+0x20/0x30 [ 26.595346] kmalloc_uaf_16+0x3bc/0x438 [ 26.595389] kunit_try_run_case+0x170/0x3f0 [ 26.595484] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.595538] kthread+0x328/0x630 [ 26.595839] ret_from_fork+0x10/0x20 [ 26.596240] [ 26.596764] Allocated by task 180: [ 26.596916] kasan_save_stack+0x3c/0x68 [ 26.597179] kasan_save_track+0x20/0x40 [ 26.597223] kasan_save_alloc_info+0x40/0x58 [ 26.597662] __kasan_kmalloc+0xd4/0xd8 [ 26.597758] __kmalloc_cache_noprof+0x16c/0x3c0 [ 26.598100] kmalloc_uaf_16+0x140/0x438 [ 26.598184] kunit_try_run_case+0x170/0x3f0 [ 26.598447] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.598618] kthread+0x328/0x630 [ 26.599107] ret_from_fork+0x10/0x20 [ 26.599188] [ 26.599380] Freed by task 180: [ 26.599542] kasan_save_stack+0x3c/0x68 [ 26.599824] kasan_save_track+0x20/0x40 [ 26.600020] kasan_save_free_info+0x4c/0x78 [ 26.600129] __kasan_slab_free+0x6c/0x98 [ 26.600168] kfree+0x214/0x3c8 [ 26.600200] kmalloc_uaf_16+0x190/0x438 [ 26.600235] kunit_try_run_case+0x170/0x3f0 [ 26.600272] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.600631] kthread+0x328/0x630 [ 26.600786] ret_from_fork+0x10/0x20 [ 26.600956] [ 26.601054] The buggy address belongs to the object at fff00000c3f9db00 [ 26.601054] which belongs to the cache kmalloc-16 of size 16 [ 26.601132] The buggy address is located 0 bytes inside of [ 26.601132] freed 16-byte region [fff00000c3f9db00, fff00000c3f9db10) [ 26.601360] [ 26.601597] The buggy address belongs to the physical page: [ 26.601672] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f9d [ 26.601920] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.602642] page_type: f5(slab) [ 26.602826] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122 [ 26.602997] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 26.603037] page dumped because: kasan: bad access detected [ 26.603320] [ 26.603477] Memory state around the buggy address: [ 26.603554] fff00000c3f9da00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 26.603712] fff00000c3f9da80: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 26.603914] >fff00000c3f9db00: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.603985] ^ [ 26.604016] fff00000c3f9db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.604056] fff00000c3f9dc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.604526] ==================================================================
[ 21.858455] ================================================================== [ 21.859635] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 21.860141] Read of size 16 at addr ffff888102797f00 by task kunit_try_catch/197 [ 21.860927] [ 21.861346] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250625 #1 PREEMPT(voluntary) [ 21.861401] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.861422] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 21.861443] Call Trace: [ 21.861457] <TASK> [ 21.861475] dump_stack_lvl+0x73/0xb0 [ 21.861506] print_report+0xd1/0x650 [ 21.861527] ? __virt_addr_valid+0x1db/0x2d0 [ 21.861550] ? kmalloc_uaf_16+0x47b/0x4c0 [ 21.861569] ? kasan_complete_mode_report_info+0x64/0x200 [ 21.861593] ? kmalloc_uaf_16+0x47b/0x4c0 [ 21.861611] kasan_report+0x141/0x180 [ 21.861632] ? kmalloc_uaf_16+0x47b/0x4c0 [ 21.861655] __asan_report_load16_noabort+0x18/0x20 [ 21.861677] kmalloc_uaf_16+0x47b/0x4c0 [ 21.861696] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 21.861715] ? __schedule+0x10cc/0x2b60 [ 21.861739] ? __pfx_read_tsc+0x10/0x10 [ 21.861761] ? ktime_get_ts64+0x86/0x230 [ 21.861786] kunit_try_run_case+0x1a5/0x480 [ 21.861811] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.861832] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 21.861852] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 21.861875] ? __kthread_parkme+0x82/0x180 [ 21.861894] ? preempt_count_sub+0x50/0x80 [ 21.861917] ? __pfx_kunit_try_run_case+0x10/0x10 [ 21.861950] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.861971] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 21.862029] kthread+0x337/0x6f0 [ 21.862047] ? trace_preempt_on+0x20/0xc0 [ 21.862069] ? __pfx_kthread+0x10/0x10 [ 21.862088] ? _raw_spin_unlock_irq+0x47/0x80 [ 21.862110] ? calculate_sigpending+0x7b/0xa0 [ 21.862132] ? __pfx_kthread+0x10/0x10 [ 21.862152] ret_from_fork+0x116/0x1d0 [ 21.862169] ? __pfx_kthread+0x10/0x10 [ 21.862188] ret_from_fork_asm+0x1a/0x30 [ 21.862217] </TASK> [ 21.862227] [ 21.874738] Allocated by task 197: [ 21.875118] kasan_save_stack+0x45/0x70 [ 21.875542] kasan_save_track+0x18/0x40 [ 21.875985] kasan_save_alloc_info+0x3b/0x50 [ 21.876449] __kasan_kmalloc+0xb7/0xc0 [ 21.876796] __kmalloc_cache_noprof+0x189/0x420 [ 21.877238] kmalloc_uaf_16+0x15b/0x4c0 [ 21.877725] kunit_try_run_case+0x1a5/0x480 [ 21.878006] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.878220] kthread+0x337/0x6f0 [ 21.878545] ret_from_fork+0x116/0x1d0 [ 21.878903] ret_from_fork_asm+0x1a/0x30 [ 21.879369] [ 21.879719] Freed by task 197: [ 21.880017] kasan_save_stack+0x45/0x70 [ 21.880415] kasan_save_track+0x18/0x40 [ 21.880544] kasan_save_free_info+0x3f/0x60 [ 21.880680] __kasan_slab_free+0x56/0x70 [ 21.880807] kfree+0x222/0x3f0 [ 21.881173] kmalloc_uaf_16+0x1d6/0x4c0 [ 21.881596] kunit_try_run_case+0x1a5/0x480 [ 21.882042] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 21.882651] kthread+0x337/0x6f0 [ 21.883178] ret_from_fork+0x116/0x1d0 [ 21.883427] ret_from_fork_asm+0x1a/0x30 [ 21.883562] [ 21.883627] The buggy address belongs to the object at ffff888102797f00 [ 21.883627] which belongs to the cache kmalloc-16 of size 16 [ 21.884018] The buggy address is located 0 bytes inside of [ 21.884018] freed 16-byte region [ffff888102797f00, ffff888102797f10) [ 21.885175] [ 21.885413] The buggy address belongs to the physical page: [ 21.885718] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102797 [ 21.886141] flags: 0x200000000000000(node=0|zone=2) [ 21.886583] page_type: f5(slab) [ 21.886905] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122 [ 21.887678] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 21.888115] page dumped because: kasan: bad access detected [ 21.888289] [ 21.888365] Memory state around the buggy address: [ 21.888514] ffff888102797e00: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 21.888716] ffff888102797e80: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 21.888916] >ffff888102797f00: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.889512] ^ [ 21.889890] ffff888102797f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 21.890662] ffff888102798000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 21.891391] ==================================================================