Date
July 4, 2025, 11:10 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 27.095553] ================================================================== [ 27.096839] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 27.097379] Read of size 1 at addr ffff888105abca90 by task kunit_try_catch/308 [ 27.098379] [ 27.098641] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) [ 27.098704] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.098721] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.098750] Call Trace: [ 27.098775] <TASK> [ 27.098798] dump_stack_lvl+0x73/0xb0 [ 27.098832] print_report+0xd1/0x650 [ 27.098860] ? __virt_addr_valid+0x1db/0x2d0 [ 27.098888] ? strlen+0x8f/0xb0 [ 27.098911] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.098941] ? strlen+0x8f/0xb0 [ 27.098964] kasan_report+0x141/0x180 [ 27.098989] ? strlen+0x8f/0xb0 [ 27.099017] __asan_report_load1_noabort+0x18/0x20 [ 27.099044] strlen+0x8f/0xb0 [ 27.099082] kasan_strings+0x57b/0xe80 [ 27.099105] ? trace_hardirqs_on+0x37/0xe0 [ 27.099145] ? __pfx_kasan_strings+0x10/0x10 [ 27.099169] ? finish_task_switch.isra.0+0x153/0x700 [ 27.099270] ? __switch_to+0x47/0xf50 [ 27.099307] ? __schedule+0x10cc/0x2b60 [ 27.099335] ? __pfx_read_tsc+0x10/0x10 [ 27.099360] ? ktime_get_ts64+0x86/0x230 [ 27.099401] kunit_try_run_case+0x1a5/0x480 [ 27.099433] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.099460] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 27.099488] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.099516] ? __kthread_parkme+0x82/0x180 [ 27.099539] ? preempt_count_sub+0x50/0x80 [ 27.099566] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.099594] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.099623] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.099652] kthread+0x337/0x6f0 [ 27.099675] ? trace_preempt_on+0x20/0xc0 [ 27.099700] ? __pfx_kthread+0x10/0x10 [ 27.099723] ? _raw_spin_unlock_irq+0x47/0x80 [ 27.099749] ? calculate_sigpending+0x7b/0xa0 [ 27.099776] ? __pfx_kthread+0x10/0x10 [ 27.099801] ret_from_fork+0x116/0x1d0 [ 27.099822] ? __pfx_kthread+0x10/0x10 [ 27.099846] ret_from_fork_asm+0x1a/0x30 [ 27.099882] </TASK> [ 27.099895] [ 27.116647] Allocated by task 308: [ 27.116953] kasan_save_stack+0x45/0x70 [ 27.117802] kasan_save_track+0x18/0x40 [ 27.118003] kasan_save_alloc_info+0x3b/0x50 [ 27.118171] __kasan_kmalloc+0xb7/0xc0 [ 27.118321] __kmalloc_cache_noprof+0x189/0x420 [ 27.118506] kasan_strings+0xc0/0xe80 [ 27.119343] kunit_try_run_case+0x1a5/0x480 [ 27.119778] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.121309] kthread+0x337/0x6f0 [ 27.121578] ret_from_fork+0x116/0x1d0 [ 27.121733] ret_from_fork_asm+0x1a/0x30 [ 27.121959] [ 27.123035] Freed by task 308: [ 27.123442] kasan_save_stack+0x45/0x70 [ 27.123827] kasan_save_track+0x18/0x40 [ 27.124332] kasan_save_free_info+0x3f/0x60 [ 27.124811] __kasan_slab_free+0x56/0x70 [ 27.125201] kfree+0x222/0x3f0 [ 27.125325] kasan_strings+0x2aa/0xe80 [ 27.125511] kunit_try_run_case+0x1a5/0x480 [ 27.125666] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.125847] kthread+0x337/0x6f0 [ 27.125972] ret_from_fork+0x116/0x1d0 [ 27.127088] ret_from_fork_asm+0x1a/0x30 [ 27.127948] [ 27.128137] The buggy address belongs to the object at ffff888105abca80 [ 27.128137] which belongs to the cache kmalloc-32 of size 32 [ 27.130033] The buggy address is located 16 bytes inside of [ 27.130033] freed 32-byte region [ffff888105abca80, ffff888105abcaa0) [ 27.130941] [ 27.131136] The buggy address belongs to the physical page: [ 27.131691] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105abc [ 27.132752] flags: 0x200000000000000(node=0|zone=2) [ 27.133377] page_type: f5(slab) [ 27.133740] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.134093] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.134790] page dumped because: kasan: bad access detected [ 27.135912] [ 27.136037] Memory state around the buggy address: [ 27.136290] ffff888105abc980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.136633] ffff888105abca00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 27.136965] >ffff888105abca80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.137286] ^ [ 27.138284] ffff888105abcb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 27.139258] ffff888105abcb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.140120] ==================================================================