Date
May 15, 2025, 10:38 a.m.
Environment | |
---|---|
qemu-x86_64 |
[ 16.277353] ================================================================== [ 16.278178] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0 [ 16.278743] Read of size 1 at addr ffff888102b6e290 by task kunit_try_catch/277 [ 16.279095] [ 16.279252] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250515 #1 PREEMPT(voluntary) [ 16.279349] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.279371] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 16.279396] Call Trace: [ 16.279421] <TASK> [ 16.279443] dump_stack_lvl+0x73/0xb0 [ 16.279667] print_report+0xd1/0x650 [ 16.279721] ? __virt_addr_valid+0x1db/0x2d0 [ 16.279766] ? strlen+0x8f/0xb0 [ 16.279807] ? kasan_complete_mode_report_info+0x64/0x200 [ 16.279852] ? strlen+0x8f/0xb0 [ 16.279894] kasan_report+0x141/0x180 [ 16.279943] ? strlen+0x8f/0xb0 [ 16.279997] __asan_report_load1_noabort+0x18/0x20 [ 16.280040] strlen+0x8f/0xb0 [ 16.280085] kasan_strings+0x57b/0xe80 [ 16.280126] ? trace_hardirqs_on+0x37/0xe0 [ 16.280174] ? __pfx_kasan_strings+0x10/0x10 [ 16.280215] ? finish_task_switch.isra.0+0x153/0x700 [ 16.280273] ? __switch_to+0x47/0xf50 [ 16.280327] ? __schedule+0x10cc/0x2b60 [ 16.280373] ? __pfx_read_tsc+0x10/0x10 [ 16.280415] ? ktime_get_ts64+0x86/0x230 [ 16.280473] kunit_try_run_case+0x1a5/0x480 [ 16.280514] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.280550] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 16.280581] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 16.280603] ? __kthread_parkme+0x82/0x180 [ 16.280623] ? preempt_count_sub+0x50/0x80 [ 16.280645] ? __pfx_kunit_try_run_case+0x10/0x10 [ 16.280667] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.280689] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 16.280711] kthread+0x337/0x6f0 [ 16.280730] ? trace_preempt_on+0x20/0xc0 [ 16.280752] ? __pfx_kthread+0x10/0x10 [ 16.280772] ? _raw_spin_unlock_irq+0x47/0x80 [ 16.280792] ? calculate_sigpending+0x7b/0xa0 [ 16.280816] ? __pfx_kthread+0x10/0x10 [ 16.280837] ret_from_fork+0x116/0x1d0 [ 16.280854] ? __pfx_kthread+0x10/0x10 [ 16.280876] ret_from_fork_asm+0x1a/0x30 [ 16.280906] </TASK> [ 16.280918] [ 16.292819] Allocated by task 277: [ 16.293104] kasan_save_stack+0x45/0x70 [ 16.293327] kasan_save_track+0x18/0x40 [ 16.293634] kasan_save_alloc_info+0x3b/0x50 [ 16.294005] __kasan_kmalloc+0xb7/0xc0 [ 16.294189] __kmalloc_cache_noprof+0x189/0x420 [ 16.294716] kasan_strings+0xc0/0xe80 [ 16.295086] kunit_try_run_case+0x1a5/0x480 [ 16.295403] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.295984] kthread+0x337/0x6f0 [ 16.296275] ret_from_fork+0x116/0x1d0 [ 16.297067] ret_from_fork_asm+0x1a/0x30 [ 16.297386] [ 16.297553] Freed by task 277: [ 16.297747] kasan_save_stack+0x45/0x70 [ 16.297909] kasan_save_track+0x18/0x40 [ 16.298146] kasan_save_free_info+0x3f/0x60 [ 16.298474] __kasan_slab_free+0x56/0x70 [ 16.298705] kfree+0x222/0x3f0 [ 16.298850] kasan_strings+0x2aa/0xe80 [ 16.299071] kunit_try_run_case+0x1a5/0x480 [ 16.299579] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 16.299923] kthread+0x337/0x6f0 [ 16.300254] ret_from_fork+0x116/0x1d0 [ 16.300742] ret_from_fork_asm+0x1a/0x30 [ 16.301080] [ 16.301261] The buggy address belongs to the object at ffff888102b6e280 [ 16.301261] which belongs to the cache kmalloc-32 of size 32 [ 16.301772] The buggy address is located 16 bytes inside of [ 16.301772] freed 32-byte region [ffff888102b6e280, ffff888102b6e2a0) [ 16.302135] [ 16.302262] The buggy address belongs to the physical page: [ 16.303310] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b6e [ 16.304018] flags: 0x200000000000000(node=0|zone=2) [ 16.304426] page_type: f5(slab) [ 16.304888] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 16.305616] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 16.306201] page dumped because: kasan: bad access detected [ 16.306811] [ 16.307018] Memory state around the buggy address: [ 16.307395] ffff888102b6e180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.308243] ffff888102b6e200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.308958] >ffff888102b6e280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.309401] ^ [ 16.309800] ffff888102b6e300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 16.310281] ffff888102b6e380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 16.310800] ==================================================================