Date
July 9, 2025, 12:11 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 21.899690] ================================================================== [ 21.899825] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 21.899901] Read of size 1 at addr fff00000c6e97810 by task kunit_try_catch/260 [ 21.899955] [ 21.900373] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 21.900673] Tainted: [B]=BAD_PAGE, [N]=TEST [ 21.900735] Hardware name: linux,dummy-virt (DT) [ 21.900933] Call trace: [ 21.901115] show_stack+0x20/0x38 (C) [ 21.901267] dump_stack_lvl+0x8c/0xd0 [ 21.901501] print_report+0x118/0x608 [ 21.901642] kasan_report+0xdc/0x128 [ 21.901729] __asan_report_load1_noabort+0x20/0x30 [ 21.901865] strcmp+0xc0/0xc8 [ 21.901933] kasan_strings+0x340/0xb00 [ 21.902005] kunit_try_run_case+0x170/0x3f0 [ 21.902191] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.902348] kthread+0x328/0x630 [ 21.902484] ret_from_fork+0x10/0x20 [ 21.902691] [ 21.902747] Allocated by task 260: [ 21.902816] kasan_save_stack+0x3c/0x68 [ 21.902944] kasan_save_track+0x20/0x40 [ 21.903022] kasan_save_alloc_info+0x40/0x58 [ 21.903186] __kasan_kmalloc+0xd4/0xd8 [ 21.903312] __kmalloc_cache_noprof+0x16c/0x3c0 [ 21.903485] kasan_strings+0xc8/0xb00 [ 21.903564] kunit_try_run_case+0x170/0x3f0 [ 21.903644] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.903751] kthread+0x328/0x630 [ 21.903840] ret_from_fork+0x10/0x20 [ 21.904082] [ 21.904173] Freed by task 260: [ 21.904280] kasan_save_stack+0x3c/0x68 [ 21.904339] kasan_save_track+0x20/0x40 [ 21.904459] kasan_save_free_info+0x4c/0x78 [ 21.904518] __kasan_slab_free+0x6c/0x98 [ 21.904582] kfree+0x214/0x3c8 [ 21.904715] kasan_strings+0x24c/0xb00 [ 21.904792] kunit_try_run_case+0x170/0x3f0 [ 21.904979] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 21.905137] kthread+0x328/0x630 [ 21.905291] ret_from_fork+0x10/0x20 [ 21.905419] [ 21.905490] The buggy address belongs to the object at fff00000c6e97800 [ 21.905490] which belongs to the cache kmalloc-32 of size 32 [ 21.905572] The buggy address is located 16 bytes inside of [ 21.905572] freed 32-byte region [fff00000c6e97800, fff00000c6e97820) [ 21.905747] [ 21.905833] The buggy address belongs to the physical page: [ 21.905904] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e97 [ 21.905984] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 21.906039] page_type: f5(slab) [ 21.906083] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 21.906146] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 21.906189] page dumped because: kasan: bad access detected [ 21.906233] [ 21.906256] Memory state around the buggy address: [ 21.906300] fff00000c6e97700: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.906346] fff00000c6e97780: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 21.906393] >fff00000c6e97800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.906515] ^ [ 21.906577] fff00000c6e97880: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 21.906907] fff00000c6e97900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 21.907081] ==================================================================
[ 14.629676] ================================================================== [ 14.630862] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 14.631202] Read of size 1 at addr ffff888102ab8ed0 by task kunit_try_catch/276 [ 14.631627] [ 14.631748] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 14.631796] Tainted: [B]=BAD_PAGE, [N]=TEST [ 14.631808] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 14.631862] Call Trace: [ 14.631898] <TASK> [ 14.631916] dump_stack_lvl+0x73/0xb0 [ 14.631987] print_report+0xd1/0x650 [ 14.632039] ? __virt_addr_valid+0x1db/0x2d0 [ 14.632065] ? strcmp+0xb0/0xc0 [ 14.632082] ? kasan_complete_mode_report_info+0x64/0x200 [ 14.632158] ? strcmp+0xb0/0xc0 [ 14.632178] kasan_report+0x141/0x180 [ 14.632203] ? strcmp+0xb0/0xc0 [ 14.632225] __asan_report_load1_noabort+0x18/0x20 [ 14.632250] strcmp+0xb0/0xc0 [ 14.632268] kasan_strings+0x431/0xe80 [ 14.632288] ? trace_hardirqs_on+0x37/0xe0 [ 14.632325] ? __pfx_kasan_strings+0x10/0x10 [ 14.632346] ? finish_task_switch.isra.0+0x153/0x700 [ 14.632371] ? __switch_to+0x47/0xf50 [ 14.632397] ? __schedule+0x10cc/0x2b60 [ 14.632420] ? __pfx_read_tsc+0x10/0x10 [ 14.632443] ? ktime_get_ts64+0x86/0x230 [ 14.632469] kunit_try_run_case+0x1a5/0x480 [ 14.632495] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.632518] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 14.632545] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 14.632569] ? __kthread_parkme+0x82/0x180 [ 14.632591] ? preempt_count_sub+0x50/0x80 [ 14.632613] ? __pfx_kunit_try_run_case+0x10/0x10 [ 14.632638] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.632663] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 14.632688] kthread+0x337/0x6f0 [ 14.632706] ? trace_preempt_on+0x20/0xc0 [ 14.632728] ? __pfx_kthread+0x10/0x10 [ 14.632749] ? _raw_spin_unlock_irq+0x47/0x80 [ 14.632770] ? calculate_sigpending+0x7b/0xa0 [ 14.632796] ? __pfx_kthread+0x10/0x10 [ 14.632817] ret_from_fork+0x116/0x1d0 [ 14.632835] ? __pfx_kthread+0x10/0x10 [ 14.632854] ret_from_fork_asm+0x1a/0x30 [ 14.632886] </TASK> [ 14.632897] [ 14.641972] Allocated by task 276: [ 14.642241] kasan_save_stack+0x45/0x70 [ 14.642485] kasan_save_track+0x18/0x40 [ 14.642702] kasan_save_alloc_info+0x3b/0x50 [ 14.642956] __kasan_kmalloc+0xb7/0xc0 [ 14.643225] __kmalloc_cache_noprof+0x189/0x420 [ 14.643486] kasan_strings+0xc0/0xe80 [ 14.643669] kunit_try_run_case+0x1a5/0x480 [ 14.643886] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.644135] kthread+0x337/0x6f0 [ 14.644256] ret_from_fork+0x116/0x1d0 [ 14.644612] ret_from_fork_asm+0x1a/0x30 [ 14.644946] [ 14.645271] Freed by task 276: [ 14.645594] kasan_save_stack+0x45/0x70 [ 14.645806] kasan_save_track+0x18/0x40 [ 14.646133] kasan_save_free_info+0x3f/0x60 [ 14.646463] __kasan_slab_free+0x56/0x70 [ 14.646629] kfree+0x222/0x3f0 [ 14.646830] kasan_strings+0x2aa/0xe80 [ 14.647108] kunit_try_run_case+0x1a5/0x480 [ 14.647333] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 14.647620] kthread+0x337/0x6f0 [ 14.647769] ret_from_fork+0x116/0x1d0 [ 14.647897] ret_from_fork_asm+0x1a/0x30 [ 14.648044] [ 14.648231] The buggy address belongs to the object at ffff888102ab8ec0 [ 14.648231] which belongs to the cache kmalloc-32 of size 32 [ 14.649077] The buggy address is located 16 bytes inside of [ 14.649077] freed 32-byte region [ffff888102ab8ec0, ffff888102ab8ee0) [ 14.649415] [ 14.649511] The buggy address belongs to the physical page: [ 14.649756] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ab8 [ 14.650445] flags: 0x200000000000000(node=0|zone=2) [ 14.650697] page_type: f5(slab) [ 14.650825] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 14.651170] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 14.651567] page dumped because: kasan: bad access detected [ 14.651988] [ 14.652114] Memory state around the buggy address: [ 14.652429] ffff888102ab8d80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 14.652897] ffff888102ab8e00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 14.653418] >ffff888102ab8e80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.653817] ^ [ 14.654207] ffff888102ab8f00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 14.654580] ffff888102ab8f80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 14.654889] ==================================================================