Date
July 5, 2025, 11:09 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.954396] ================================================================== [ 18.954535] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 18.954670] Read of size 16 at addr fff00000c56728a0 by task kunit_try_catch/169 [ 18.954785] [ 18.954851] CPU: 0 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.955025] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.955083] Hardware name: linux,dummy-virt (DT) [ 18.955149] Call trace: [ 18.955195] show_stack+0x20/0x38 (C) [ 18.955301] dump_stack_lvl+0x8c/0xd0 [ 18.955438] print_report+0x118/0x608 [ 18.955537] kasan_report+0xdc/0x128 [ 18.955637] __asan_report_load16_noabort+0x20/0x30 [ 18.955830] kmalloc_uaf_16+0x3bc/0x438 [ 18.955936] kunit_try_run_case+0x170/0x3f0 [ 18.956037] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.956142] kthread+0x328/0x630 [ 18.956289] ret_from_fork+0x10/0x20 [ 18.956423] [ 18.956461] Allocated by task 169: [ 18.956513] kasan_save_stack+0x3c/0x68 [ 18.956583] kasan_save_track+0x20/0x40 [ 18.956653] kasan_save_alloc_info+0x40/0x58 [ 18.956731] __kasan_kmalloc+0xd4/0xd8 [ 18.956833] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.956919] kmalloc_uaf_16+0x140/0x438 [ 18.957008] kunit_try_run_case+0x170/0x3f0 [ 18.957122] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.957250] kthread+0x328/0x630 [ 18.957344] ret_from_fork+0x10/0x20 [ 18.957474] [ 18.957532] Freed by task 169: [ 18.957612] kasan_save_stack+0x3c/0x68 [ 18.957720] kasan_save_track+0x20/0x40 [ 18.957813] kasan_save_free_info+0x4c/0x78 [ 18.957895] __kasan_slab_free+0x6c/0x98 [ 18.958003] kfree+0x214/0x3c8 [ 18.958059] kmalloc_uaf_16+0x190/0x438 [ 18.958132] kunit_try_run_case+0x170/0x3f0 [ 18.958291] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.958390] kthread+0x328/0x630 [ 18.958502] ret_from_fork+0x10/0x20 [ 18.958584] [ 18.958620] The buggy address belongs to the object at fff00000c56728a0 [ 18.958620] which belongs to the cache kmalloc-16 of size 16 [ 18.958758] The buggy address is located 0 bytes inside of [ 18.958758] freed 16-byte region [fff00000c56728a0, fff00000c56728b0) [ 18.958926] [ 18.958974] The buggy address belongs to the physical page: [ 18.959066] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105672 [ 18.959196] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.959326] page_type: f5(slab) [ 18.959435] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 18.959565] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 18.959689] page dumped because: kasan: bad access detected [ 18.959763] [ 18.959803] Memory state around the buggy address: [ 18.959880] fff00000c5672780: 00 03 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.959959] fff00000c5672800: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 18.960040] >fff00000c5672880: 00 00 fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 18.960177] ^ [ 18.960261] fff00000c5672900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.960346] fff00000c5672980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.960494] ==================================================================
[ 13.614435] ================================================================== [ 13.615000] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 13.615408] Read of size 16 at addr ffff888101886880 by task kunit_try_catch/185 [ 13.615985] [ 13.616321] CPU: 1 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 13.616452] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.616535] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.616563] Call Trace: [ 13.616581] <TASK> [ 13.616607] dump_stack_lvl+0x73/0xb0 [ 13.616660] print_report+0xd1/0x650 [ 13.616687] ? __virt_addr_valid+0x1db/0x2d0 [ 13.616717] ? kmalloc_uaf_16+0x47b/0x4c0 [ 13.616741] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.616767] ? kmalloc_uaf_16+0x47b/0x4c0 [ 13.616794] kasan_report+0x141/0x180 [ 13.616954] ? kmalloc_uaf_16+0x47b/0x4c0 [ 13.616987] __asan_report_load16_noabort+0x18/0x20 [ 13.617016] kmalloc_uaf_16+0x47b/0x4c0 [ 13.617041] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 13.617066] ? __schedule+0x10cc/0x2b60 [ 13.617094] ? __pfx_read_tsc+0x10/0x10 [ 13.617120] ? ktime_get_ts64+0x86/0x230 [ 13.617150] kunit_try_run_case+0x1a5/0x480 [ 13.617181] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.617207] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.617235] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.617261] ? __kthread_parkme+0x82/0x180 [ 13.617286] ? preempt_count_sub+0x50/0x80 [ 13.617314] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.617341] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.617367] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.617393] kthread+0x337/0x6f0 [ 13.617417] ? trace_preempt_on+0x20/0xc0 [ 13.617445] ? __pfx_kthread+0x10/0x10 [ 13.617469] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.617493] ? calculate_sigpending+0x7b/0xa0 [ 13.617522] ? __pfx_kthread+0x10/0x10 [ 13.617547] ret_from_fork+0x116/0x1d0 [ 13.617568] ? __pfx_kthread+0x10/0x10 [ 13.617592] ret_from_fork_asm+0x1a/0x30 [ 13.617629] </TASK> [ 13.617643] [ 13.631014] Allocated by task 185: [ 13.631527] kasan_save_stack+0x45/0x70 [ 13.631949] kasan_save_track+0x18/0x40 [ 13.632360] kasan_save_alloc_info+0x3b/0x50 [ 13.632855] __kasan_kmalloc+0xb7/0xc0 [ 13.633283] __kmalloc_cache_noprof+0x189/0x420 [ 13.633672] kmalloc_uaf_16+0x15b/0x4c0 [ 13.634048] kunit_try_run_case+0x1a5/0x480 [ 13.634349] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.634767] kthread+0x337/0x6f0 [ 13.635178] ret_from_fork+0x116/0x1d0 [ 13.635605] ret_from_fork_asm+0x1a/0x30 [ 13.635945] [ 13.636035] Freed by task 185: [ 13.636233] kasan_save_stack+0x45/0x70 [ 13.636417] kasan_save_track+0x18/0x40 [ 13.636661] kasan_save_free_info+0x3f/0x60 [ 13.637236] __kasan_slab_free+0x56/0x70 [ 13.637432] kfree+0x222/0x3f0 [ 13.637921] kmalloc_uaf_16+0x1d6/0x4c0 [ 13.638162] kunit_try_run_case+0x1a5/0x480 [ 13.638613] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.639138] kthread+0x337/0x6f0 [ 13.639574] ret_from_fork+0x116/0x1d0 [ 13.639782] ret_from_fork_asm+0x1a/0x30 [ 13.640020] [ 13.640387] The buggy address belongs to the object at ffff888101886880 [ 13.640387] which belongs to the cache kmalloc-16 of size 16 [ 13.641358] The buggy address is located 0 bytes inside of [ 13.641358] freed 16-byte region [ffff888101886880, ffff888101886890) [ 13.642332] [ 13.642470] The buggy address belongs to the physical page: [ 13.643050] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101886 [ 13.643597] flags: 0x200000000000000(node=0|zone=2) [ 13.644026] page_type: f5(slab) [ 13.644211] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 13.644676] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 13.645259] page dumped because: kasan: bad access detected [ 13.645556] [ 13.645962] Memory state around the buggy address: [ 13.646218] ffff888101886780: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 13.646671] ffff888101886800: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc [ 13.647334] >ffff888101886880: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.647835] ^ [ 13.648150] ffff888101886900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.648816] ffff888101886980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 13.649301] ==================================================================