Date
June 24, 2025, 12:47 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 27.402897] ================================================================== [ 27.403015] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 27.403141] Read of size 1 at addr fff00000c5a7ce50 by task kunit_try_catch/261 [ 27.403276] [ 27.403620] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT [ 27.403864] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.403943] Hardware name: linux,dummy-virt (DT) [ 27.404042] Call trace: [ 27.404081] show_stack+0x20/0x38 (C) [ 27.404273] dump_stack_lvl+0x8c/0xd0 [ 27.404437] print_report+0x118/0x608 [ 27.404702] kasan_report+0xdc/0x128 [ 27.404978] __asan_report_load1_noabort+0x20/0x30 [ 27.405191] strcmp+0xc0/0xc8 [ 27.405319] kasan_strings+0x340/0xb00 [ 27.405603] kunit_try_run_case+0x170/0x3f0 [ 27.405981] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.406133] kthread+0x328/0x630 [ 27.406304] ret_from_fork+0x10/0x20 [ 27.406648] [ 27.406709] Allocated by task 261: [ 27.406873] kasan_save_stack+0x3c/0x68 [ 27.407026] kasan_save_track+0x20/0x40 [ 27.407199] kasan_save_alloc_info+0x40/0x58 [ 27.407297] __kasan_kmalloc+0xd4/0xd8 [ 27.407412] __kmalloc_cache_noprof+0x16c/0x3c0 [ 27.407536] kasan_strings+0xc8/0xb00 [ 27.407726] kunit_try_run_case+0x170/0x3f0 [ 27.407883] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.408019] kthread+0x328/0x630 [ 27.408141] ret_from_fork+0x10/0x20 [ 27.408261] [ 27.408320] Freed by task 261: [ 27.408500] kasan_save_stack+0x3c/0x68 [ 27.408617] kasan_save_track+0x20/0x40 [ 27.408737] kasan_save_free_info+0x4c/0x78 [ 27.408902] __kasan_slab_free+0x6c/0x98 [ 27.409018] kfree+0x214/0x3c8 [ 27.409142] kasan_strings+0x24c/0xb00 [ 27.409261] kunit_try_run_case+0x170/0x3f0 [ 27.409417] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 27.409608] kthread+0x328/0x630 [ 27.409767] ret_from_fork+0x10/0x20 [ 27.409892] [ 27.409950] The buggy address belongs to the object at fff00000c5a7ce40 [ 27.409950] which belongs to the cache kmalloc-32 of size 32 [ 27.410122] The buggy address is located 16 bytes inside of [ 27.410122] freed 32-byte region [fff00000c5a7ce40, fff00000c5a7ce60) [ 27.410478] [ 27.410554] The buggy address belongs to the physical page: [ 27.410677] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a7c [ 27.411018] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 27.411167] page_type: f5(slab) [ 27.411360] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 27.411566] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 27.411688] page dumped because: kasan: bad access detected [ 27.411786] [ 27.411841] Memory state around the buggy address: [ 27.411923] fff00000c5a7cd00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.412042] fff00000c5a7cd80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 27.412161] >fff00000c5a7ce00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.412280] ^ [ 27.412603] fff00000c5a7ce80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.412831] fff00000c5a7cf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.412943] ==================================================================
[ 13.948087] ================================================================== [ 13.949651] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 13.950186] Read of size 1 at addr ffff8881039efb10 by task kunit_try_catch/279 [ 13.950650] [ 13.950870] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G B N 6.15.4-rc2 #1 PREEMPT(voluntary) [ 13.950991] Tainted: [B]=BAD_PAGE, [N]=TEST [ 13.951020] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 13.951072] Call Trace: [ 13.951100] <TASK> [ 13.951139] dump_stack_lvl+0x73/0xb0 [ 13.951197] print_report+0xd1/0x650 [ 13.951252] ? __virt_addr_valid+0x1db/0x2d0 [ 13.951302] ? strcmp+0xb0/0xc0 [ 13.951335] ? kasan_complete_mode_report_info+0x64/0x200 [ 13.951375] ? strcmp+0xb0/0xc0 [ 13.951409] kasan_report+0x141/0x180 [ 13.951472] ? strcmp+0xb0/0xc0 [ 13.951519] __asan_report_load1_noabort+0x18/0x20 [ 13.951593] strcmp+0xb0/0xc0 [ 13.951645] kasan_strings+0x431/0xe80 [ 13.951696] ? trace_hardirqs_on+0x37/0xe0 [ 13.951742] ? __pfx_kasan_strings+0x10/0x10 [ 13.951778] ? finish_task_switch.isra.0+0x153/0x700 [ 13.951820] ? __switch_to+0x5d9/0xf60 [ 13.951862] ? dequeue_task_fair+0x166/0x4e0 [ 13.951902] ? __schedule+0x10cc/0x2b60 [ 13.951933] ? __pfx_read_tsc+0x10/0x10 [ 13.951960] ? ktime_get_ts64+0x86/0x230 [ 13.951993] kunit_try_run_case+0x1a5/0x480 [ 13.952025] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.952052] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 13.952083] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 13.952112] ? __kthread_parkme+0x82/0x180 [ 13.952141] ? preempt_count_sub+0x50/0x80 [ 13.952170] ? __pfx_kunit_try_run_case+0x10/0x10 [ 13.952199] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.952227] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 13.952255] kthread+0x337/0x6f0 [ 13.952276] ? trace_preempt_on+0x20/0xc0 [ 13.952304] ? __pfx_kthread+0x10/0x10 [ 13.952327] ? _raw_spin_unlock_irq+0x47/0x80 [ 13.952353] ? calculate_sigpending+0x7b/0xa0 [ 13.952375] ? __pfx_kthread+0x10/0x10 [ 13.952392] ret_from_fork+0x41/0x80 [ 13.952412] ? __pfx_kthread+0x10/0x10 [ 13.952428] ret_from_fork_asm+0x1a/0x30 [ 13.952458] </TASK> [ 13.952469] [ 13.963210] Allocated by task 279: [ 13.963466] kasan_save_stack+0x45/0x70 [ 13.963806] kasan_save_track+0x18/0x40 [ 13.964089] kasan_save_alloc_info+0x3b/0x50 [ 13.964301] __kasan_kmalloc+0xb7/0xc0 [ 13.964485] __kmalloc_cache_noprof+0x189/0x420 [ 13.965679] kasan_strings+0xc0/0xe80 [ 13.966033] kunit_try_run_case+0x1a5/0x480 [ 13.966238] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.966445] kthread+0x337/0x6f0 [ 13.966641] ret_from_fork+0x41/0x80 [ 13.967065] ret_from_fork_asm+0x1a/0x30 [ 13.967365] [ 13.967507] Freed by task 279: [ 13.967898] kasan_save_stack+0x45/0x70 [ 13.968184] kasan_save_track+0x18/0x40 [ 13.968441] kasan_save_free_info+0x3f/0x60 [ 13.968930] __kasan_slab_free+0x56/0x70 [ 13.969151] kfree+0x222/0x3f0 [ 13.969393] kasan_strings+0x2aa/0xe80 [ 13.969639] kunit_try_run_case+0x1a5/0x480 [ 13.969988] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 13.970314] kthread+0x337/0x6f0 [ 13.970561] ret_from_fork+0x41/0x80 [ 13.970865] ret_from_fork_asm+0x1a/0x30 [ 13.971055] [ 13.971199] The buggy address belongs to the object at ffff8881039efb00 [ 13.971199] which belongs to the cache kmalloc-32 of size 32 [ 13.971616] The buggy address is located 16 bytes inside of [ 13.971616] freed 32-byte region [ffff8881039efb00, ffff8881039efb20) [ 13.973299] [ 13.973445] The buggy address belongs to the physical page: [ 13.973838] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ef [ 13.974446] flags: 0x200000000000000(node=0|zone=2) [ 13.974721] page_type: f5(slab) [ 13.975004] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 13.975411] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 13.975835] page dumped because: kasan: bad access detected [ 13.976325] [ 13.976421] Memory state around the buggy address: [ 13.976610] ffff8881039efa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.977048] ffff8881039efa80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.977509] >ffff8881039efb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.978083] ^ [ 13.978349] ffff8881039efb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 13.978720] ffff8881039efc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 13.979019] ==================================================================