Date
July 10, 2025, 9:07 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 27.057689] ================================================================== [ 27.061294] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 27.062112] Read of size 1 at addr ffff8881060c6b10 by task kunit_try_catch/307 [ 27.062343] [ 27.062436] CPU: 1 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) [ 27.062500] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.062514] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.062541] Call Trace: [ 27.062557] <TASK> [ 27.062579] dump_stack_lvl+0x73/0xb0 [ 27.062610] print_report+0xd1/0x610 [ 27.062640] ? __virt_addr_valid+0x1db/0x2d0 [ 27.062667] ? strcmp+0xb0/0xc0 [ 27.062688] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.063555] ? strcmp+0xb0/0xc0 [ 27.063582] kasan_report+0x141/0x180 [ 27.063606] ? strcmp+0xb0/0xc0 [ 27.063633] __asan_report_load1_noabort+0x18/0x20 [ 27.063660] strcmp+0xb0/0xc0 [ 27.063682] kasan_strings+0x431/0xe80 [ 27.063720] ? trace_hardirqs_on+0x37/0xe0 [ 27.063745] ? __pfx_kasan_strings+0x10/0x10 [ 27.063765] ? finish_task_switch.isra.0+0x153/0x700 [ 27.063801] ? __switch_to+0x47/0xf80 [ 27.063828] ? __schedule+0x10cc/0x2b60 [ 27.063856] ? __pfx_read_tsc+0x10/0x10 [ 27.063880] ? ktime_get_ts64+0x86/0x230 [ 27.063905] kunit_try_run_case+0x1a5/0x480 [ 27.063929] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.063949] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.063973] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.063996] ? __kthread_parkme+0x82/0x180 [ 27.064018] ? preempt_count_sub+0x50/0x80 [ 27.064040] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.064062] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.064087] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.064112] kthread+0x337/0x6f0 [ 27.064132] ? trace_preempt_on+0x20/0xc0 [ 27.064154] ? __pfx_kthread+0x10/0x10 [ 27.064174] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.064196] ? calculate_sigpending+0x7b/0xa0 [ 27.064221] ? __pfx_kthread+0x10/0x10 [ 27.064242] ret_from_fork+0x116/0x1d0 [ 27.064260] ? __pfx_kthread+0x10/0x10 [ 27.064282] ret_from_fork_asm+0x1a/0x30 [ 27.064314] </TASK> [ 27.064327] [ 27.078694] Allocated by task 307: [ 27.078851] kasan_save_stack+0x45/0x70 [ 27.078997] kasan_save_track+0x18/0x40 [ 27.079125] kasan_save_alloc_info+0x3b/0x50 [ 27.079263] __kasan_kmalloc+0xb7/0xc0 [ 27.079386] __kmalloc_cache_noprof+0x189/0x420 [ 27.079532] kasan_strings+0xc0/0xe80 [ 27.079654] kunit_try_run_case+0x1a5/0x480 [ 27.079858] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.080111] kthread+0x337/0x6f0 [ 27.080271] ret_from_fork+0x116/0x1d0 [ 27.080458] ret_from_fork_asm+0x1a/0x30 [ 27.080646] [ 27.080982] Freed by task 307: [ 27.081149] kasan_save_stack+0x45/0x70 [ 27.081346] kasan_save_track+0x18/0x40 [ 27.081558] kasan_save_free_info+0x3f/0x60 [ 27.081845] __kasan_slab_free+0x56/0x70 [ 27.082048] kfree+0x222/0x3f0 [ 27.082210] kasan_strings+0x2aa/0xe80 [ 27.082389] kunit_try_run_case+0x1a5/0x480 [ 27.082620] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.082945] kthread+0x337/0x6f0 [ 27.083075] ret_from_fork+0x116/0x1d0 [ 27.083222] ret_from_fork_asm+0x1a/0x30 [ 27.083417] [ 27.083534] The buggy address belongs to the object at ffff8881060c6b00 [ 27.083534] which belongs to the cache kmalloc-32 of size 32 [ 27.084106] The buggy address is located 16 bytes inside of [ 27.084106] freed 32-byte region [ffff8881060c6b00, ffff8881060c6b20) [ 27.084492] [ 27.084584] The buggy address belongs to the physical page: [ 27.084946] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060c6 [ 27.085315] flags: 0x200000000000000(node=0|zone=2) [ 27.085549] page_type: f5(slab) [ 27.085758] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.086184] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.086481] page dumped because: kasan: bad access detected [ 27.086728] [ 27.086865] Memory state around the buggy address: [ 27.087058] ffff8881060c6a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.087375] ffff8881060c6a80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.087730] >ffff8881060c6b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.088092] ^ [ 27.088257] ffff8881060c6b80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.088554] ffff8881060c6c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.089022] ==================================================================