Date
July 9, 2025, 12:11 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.654458] ================================================================== [ 19.654528] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 19.654763] Read of size 16 at addr fff00000c6390160 by task kunit_try_catch/169 [ 19.654866] [ 19.655286] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 19.655380] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.655446] Hardware name: linux,dummy-virt (DT) [ 19.655488] Call trace: [ 19.655547] show_stack+0x20/0x38 (C) [ 19.655603] dump_stack_lvl+0x8c/0xd0 [ 19.655650] print_report+0x118/0x608 [ 19.655898] kasan_report+0xdc/0x128 [ 19.656000] __asan_report_load16_noabort+0x20/0x30 [ 19.656125] kmalloc_uaf_16+0x3bc/0x438 [ 19.656224] kunit_try_run_case+0x170/0x3f0 [ 19.656516] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.656694] kthread+0x328/0x630 [ 19.656768] ret_from_fork+0x10/0x20 [ 19.656849] [ 19.656876] Allocated by task 169: [ 19.656923] kasan_save_stack+0x3c/0x68 [ 19.656963] kasan_save_track+0x20/0x40 [ 19.657022] kasan_save_alloc_info+0x40/0x58 [ 19.657067] __kasan_kmalloc+0xd4/0xd8 [ 19.657141] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.657183] kmalloc_uaf_16+0x140/0x438 [ 19.657221] kunit_try_run_case+0x170/0x3f0 [ 19.657258] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.657301] kthread+0x328/0x630 [ 19.657473] ret_from_fork+0x10/0x20 [ 19.657557] [ 19.657606] Freed by task 169: [ 19.657697] kasan_save_stack+0x3c/0x68 [ 19.657753] kasan_save_track+0x20/0x40 [ 19.657811] kasan_save_free_info+0x4c/0x78 [ 19.657893] __kasan_slab_free+0x6c/0x98 [ 19.657970] kfree+0x214/0x3c8 [ 19.658061] kmalloc_uaf_16+0x190/0x438 [ 19.658127] kunit_try_run_case+0x170/0x3f0 [ 19.658227] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.658312] kthread+0x328/0x630 [ 19.658345] ret_from_fork+0x10/0x20 [ 19.658381] [ 19.658410] The buggy address belongs to the object at fff00000c6390160 [ 19.658410] which belongs to the cache kmalloc-16 of size 16 [ 19.658489] The buggy address is located 0 bytes inside of [ 19.658489] freed 16-byte region [fff00000c6390160, fff00000c6390170) [ 19.658692] [ 19.658738] The buggy address belongs to the physical page: [ 19.658769] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106390 [ 19.659011] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.659122] page_type: f5(slab) [ 19.659219] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.659285] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.659351] page dumped because: kasan: bad access detected [ 19.659429] [ 19.659459] Memory state around the buggy address: [ 19.659509] fff00000c6390000: 00 02 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.659576] fff00000c6390080: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc [ 19.659620] >fff00000c6390100: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 19.659670] ^ [ 19.659729] fff00000c6390180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.659787] fff00000c6390200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.659855] ==================================================================
[ 12.613646] ================================================================== [ 12.614128] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.614539] Read of size 16 at addr ffff888101e0ece0 by task kunit_try_catch/185 [ 12.614855] [ 12.614964] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.615009] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.615020] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.615040] Call Trace: [ 12.615052] <TASK> [ 12.615070] dump_stack_lvl+0x73/0xb0 [ 12.615101] print_report+0xd1/0x650 [ 12.615123] ? __virt_addr_valid+0x1db/0x2d0 [ 12.615145] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.615165] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.615187] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.615207] kasan_report+0x141/0x180 [ 12.615228] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.615253] __asan_report_load16_noabort+0x18/0x20 [ 12.615277] kmalloc_uaf_16+0x47b/0x4c0 [ 12.615298] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.615319] ? __schedule+0x10cc/0x2b60 [ 12.615756] ? __pfx_read_tsc+0x10/0x10 [ 12.615788] ? ktime_get_ts64+0x86/0x230 [ 12.615829] kunit_try_run_case+0x1a5/0x480 [ 12.615855] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.615878] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.615903] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.615935] ? __kthread_parkme+0x82/0x180 [ 12.615956] ? preempt_count_sub+0x50/0x80 [ 12.615980] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.616004] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.616029] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.616053] kthread+0x337/0x6f0 [ 12.616071] ? trace_preempt_on+0x20/0xc0 [ 12.616095] ? __pfx_kthread+0x10/0x10 [ 12.616115] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.616136] ? calculate_sigpending+0x7b/0xa0 [ 12.616160] ? __pfx_kthread+0x10/0x10 [ 12.616181] ret_from_fork+0x116/0x1d0 [ 12.616199] ? __pfx_kthread+0x10/0x10 [ 12.616219] ret_from_fork_asm+0x1a/0x30 [ 12.616249] </TASK> [ 12.616260] [ 12.625896] Allocated by task 185: [ 12.626215] kasan_save_stack+0x45/0x70 [ 12.626555] kasan_save_track+0x18/0x40 [ 12.626717] kasan_save_alloc_info+0x3b/0x50 [ 12.627019] __kasan_kmalloc+0xb7/0xc0 [ 12.627206] __kmalloc_cache_noprof+0x189/0x420 [ 12.627701] kmalloc_uaf_16+0x15b/0x4c0 [ 12.627874] kunit_try_run_case+0x1a5/0x480 [ 12.628301] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.628683] kthread+0x337/0x6f0 [ 12.628962] ret_from_fork+0x116/0x1d0 [ 12.629273] ret_from_fork_asm+0x1a/0x30 [ 12.629444] [ 12.629540] Freed by task 185: [ 12.629702] kasan_save_stack+0x45/0x70 [ 12.629872] kasan_save_track+0x18/0x40 [ 12.630078] kasan_save_free_info+0x3f/0x60 [ 12.630671] __kasan_slab_free+0x56/0x70 [ 12.630869] kfree+0x222/0x3f0 [ 12.630998] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.631434] kunit_try_run_case+0x1a5/0x480 [ 12.631772] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.632157] kthread+0x337/0x6f0 [ 12.632506] ret_from_fork+0x116/0x1d0 [ 12.632691] ret_from_fork_asm+0x1a/0x30 [ 12.633048] [ 12.633155] The buggy address belongs to the object at ffff888101e0ece0 [ 12.633155] which belongs to the cache kmalloc-16 of size 16 [ 12.633809] The buggy address is located 0 bytes inside of [ 12.633809] freed 16-byte region [ffff888101e0ece0, ffff888101e0ecf0) [ 12.634622] [ 12.634840] The buggy address belongs to the physical page: [ 12.635121] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e0e [ 12.635758] flags: 0x200000000000000(node=0|zone=2) [ 12.636071] page_type: f5(slab) [ 12.636210] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.636450] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.636676] page dumped because: kasan: bad access detected [ 12.636846] [ 12.636915] Memory state around the buggy address: [ 12.637187] ffff888101e0eb80: 00 04 fc fc 00 04 fc fc 00 01 fc fc 00 01 fc fc [ 12.637509] ffff888101e0ec00: 00 04 fc fc 00 04 fc fc 00 05 fc fc fa fb fc fc [ 12.637724] >ffff888101e0ec80: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 12.637948] ^ [ 12.638492] ffff888101e0ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.639117] ffff888101e0ed80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.639744] ==================================================================