Date
July 10, 2025, 6:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.861815] ================================================================== [ 16.861873] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 16.861926] Read of size 16 at addr fff00000c4498e40 by task kunit_try_catch/168 [ 16.861984] [ 16.862016] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.862239] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.862391] Hardware name: linux,dummy-virt (DT) [ 16.862443] Call trace: [ 16.862580] show_stack+0x20/0x38 (C) [ 16.862636] dump_stack_lvl+0x8c/0xd0 [ 16.863035] print_report+0x118/0x608 [ 16.863141] kasan_report+0xdc/0x128 [ 16.863310] __asan_report_load16_noabort+0x20/0x30 [ 16.863397] kmalloc_uaf_16+0x3bc/0x438 [ 16.863468] kunit_try_run_case+0x170/0x3f0 [ 16.863519] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.863580] kthread+0x328/0x630 [ 16.863636] ret_from_fork+0x10/0x20 [ 16.863683] [ 16.863701] Allocated by task 168: [ 16.863728] kasan_save_stack+0x3c/0x68 [ 16.863777] kasan_save_track+0x20/0x40 [ 16.863814] kasan_save_alloc_info+0x40/0x58 [ 16.863862] __kasan_kmalloc+0xd4/0xd8 [ 16.863913] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.863963] kmalloc_uaf_16+0x140/0x438 [ 16.864000] kunit_try_run_case+0x170/0x3f0 [ 16.864037] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.864080] kthread+0x328/0x630 [ 16.864112] ret_from_fork+0x10/0x20 [ 16.864152] [ 16.864178] Freed by task 168: [ 16.864202] kasan_save_stack+0x3c/0x68 [ 16.864248] kasan_save_track+0x20/0x40 [ 16.864284] kasan_save_free_info+0x4c/0x78 [ 16.864322] __kasan_slab_free+0x6c/0x98 [ 16.864367] kfree+0x214/0x3c8 [ 16.864399] kmalloc_uaf_16+0x190/0x438 [ 16.864433] kunit_try_run_case+0x170/0x3f0 [ 16.864470] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.864512] kthread+0x328/0x630 [ 16.864811] ret_from_fork+0x10/0x20 [ 16.864898] [ 16.864917] The buggy address belongs to the object at fff00000c4498e40 [ 16.864917] which belongs to the cache kmalloc-16 of size 16 [ 16.865011] The buggy address is located 0 bytes inside of [ 16.865011] freed 16-byte region [fff00000c4498e40, fff00000c4498e50) [ 16.865100] [ 16.865119] The buggy address belongs to the physical page: [ 16.865159] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104498 [ 16.865243] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.865290] page_type: f5(slab) [ 16.865328] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.865419] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.865458] page dumped because: kasan: bad access detected [ 16.865487] [ 16.865505] Memory state around the buggy address: [ 16.865535] fff00000c4498d00: fa fb fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc [ 16.865577] fff00000c4498d80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.865835] >fff00000c4498e00: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 16.866007] ^ [ 16.866089] fff00000c4498e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.866141] fff00000c4498f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.866201] ==================================================================
[ 12.543321] ================================================================== [ 12.543780] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.544074] Read of size 16 at addr ffff888102709180 by task kunit_try_catch/185 [ 12.544471] [ 12.544559] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.544600] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.544611] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.544629] Call Trace: [ 12.544640] <TASK> [ 12.544655] dump_stack_lvl+0x73/0xb0 [ 12.544682] print_report+0xd1/0x650 [ 12.544703] ? __virt_addr_valid+0x1db/0x2d0 [ 12.544725] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.544745] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.544768] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.544788] kasan_report+0x141/0x180 [ 12.544809] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.544834] __asan_report_load16_noabort+0x18/0x20 [ 12.544860] kmalloc_uaf_16+0x47b/0x4c0 [ 12.544880] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.544902] ? __schedule+0x10cc/0x2b60 [ 12.544923] ? __pfx_read_tsc+0x10/0x10 [ 12.544944] ? ktime_get_ts64+0x86/0x230 [ 12.544967] kunit_try_run_case+0x1a5/0x480 [ 12.544990] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.545013] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.545049] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.545073] ? __kthread_parkme+0x82/0x180 [ 12.545094] ? preempt_count_sub+0x50/0x80 [ 12.545118] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.545143] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.545167] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.545192] kthread+0x337/0x6f0 [ 12.545210] ? trace_preempt_on+0x20/0xc0 [ 12.545250] ? __pfx_kthread+0x10/0x10 [ 12.545271] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.545292] ? calculate_sigpending+0x7b/0xa0 [ 12.545315] ? __pfx_kthread+0x10/0x10 [ 12.545336] ret_from_fork+0x116/0x1d0 [ 12.545354] ? __pfx_kthread+0x10/0x10 [ 12.545374] ret_from_fork_asm+0x1a/0x30 [ 12.545404] </TASK> [ 12.545414] [ 12.552672] Allocated by task 185: [ 12.552882] kasan_save_stack+0x45/0x70 [ 12.553109] kasan_save_track+0x18/0x40 [ 12.553253] kasan_save_alloc_info+0x3b/0x50 [ 12.553405] __kasan_kmalloc+0xb7/0xc0 [ 12.553576] __kmalloc_cache_noprof+0x189/0x420 [ 12.553790] kmalloc_uaf_16+0x15b/0x4c0 [ 12.553978] kunit_try_run_case+0x1a5/0x480 [ 12.554192] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.554441] kthread+0x337/0x6f0 [ 12.554601] ret_from_fork+0x116/0x1d0 [ 12.554731] ret_from_fork_asm+0x1a/0x30 [ 12.554868] [ 12.555064] Freed by task 185: [ 12.555223] kasan_save_stack+0x45/0x70 [ 12.555416] kasan_save_track+0x18/0x40 [ 12.555605] kasan_save_free_info+0x3f/0x60 [ 12.555806] __kasan_slab_free+0x56/0x70 [ 12.555972] kfree+0x222/0x3f0 [ 12.556145] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.556315] kunit_try_run_case+0x1a5/0x480 [ 12.556460] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.556685] kthread+0x337/0x6f0 [ 12.556853] ret_from_fork+0x116/0x1d0 [ 12.557144] ret_from_fork_asm+0x1a/0x30 [ 12.557329] [ 12.557401] The buggy address belongs to the object at ffff888102709180 [ 12.557401] which belongs to the cache kmalloc-16 of size 16 [ 12.557799] The buggy address is located 0 bytes inside of [ 12.557799] freed 16-byte region [ffff888102709180, ffff888102709190) [ 12.558151] [ 12.558232] The buggy address belongs to the physical page: [ 12.558480] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102709 [ 12.558825] flags: 0x200000000000000(node=0|zone=2) [ 12.559412] page_type: f5(slab) [ 12.559538] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.559770] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.560602] page dumped because: kasan: bad access detected [ 12.560917] [ 12.561012] Memory state around the buggy address: [ 12.561179] ffff888102709080: 00 02 fc fc 00 02 fc fc 00 06 fc fc 00 06 fc fc [ 12.561414] ffff888102709100: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 12.561729] >ffff888102709180: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.562238] ^ [ 12.562382] ffff888102709200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.562663] ffff888102709280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.563117] ==================================================================