Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-x86_64

[   23.800314] ==================================================================
[   23.800737] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   23.801174] Read of size 1 at addr ffff8881023cb9d8 by task kunit_try_catch/286
[   23.801781] 
[   23.802001] CPU: 0 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   23.802500] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.802571] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.802607] Call Trace:
[   23.802624]  <TASK>
[   23.802643]  dump_stack_lvl+0x73/0xb0
[   23.802679]  print_report+0xd1/0x650
[   23.802701]  ? __virt_addr_valid+0x1db/0x2d0
[   23.802723]  ? memcmp+0x1b4/0x1d0
[   23.802744]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.802769]  ? memcmp+0x1b4/0x1d0
[   23.802789]  kasan_report+0x141/0x180
[   23.802810]  ? memcmp+0x1b4/0x1d0
[   23.802840]  __asan_report_load1_noabort+0x18/0x20
[   23.802874]  memcmp+0x1b4/0x1d0
[   23.802912]  kasan_memcmp+0x18f/0x390
[   23.802947]  ? trace_hardirqs_on+0x37/0xe0
[   23.802992]  ? __pfx_kasan_memcmp+0x10/0x10
[   23.803030]  ? finish_task_switch.isra.0+0x153/0x700
[   23.803071]  ? __switch_to+0x47/0xf50
[   23.803152]  ? __pfx_read_tsc+0x10/0x10
[   23.803186]  ? ktime_get_ts64+0x86/0x230
[   23.803223]  kunit_try_run_case+0x1a5/0x480
[   23.803248]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.803269]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.803288]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.803308]  ? __kthread_parkme+0x82/0x180
[   23.803325]  ? preempt_count_sub+0x50/0x80
[   23.803345]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.803365]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.803406]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.803429]  kthread+0x337/0x6f0
[   23.803446]  ? trace_preempt_on+0x20/0xc0
[   23.803466]  ? __pfx_kthread+0x10/0x10
[   23.803484]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.803501]  ? calculate_sigpending+0x7b/0xa0
[   23.803523]  ? __pfx_kthread+0x10/0x10
[   23.803541]  ret_from_fork+0x116/0x1d0
[   23.803557]  ? __pfx_kthread+0x10/0x10
[   23.803575]  ret_from_fork_asm+0x1a/0x30
[   23.803603]  </TASK>
[   23.803614] 
[   23.816703] Allocated by task 286:
[   23.817435]  kasan_save_stack+0x45/0x70
[   23.817832]  kasan_save_track+0x18/0x40
[   23.817992]  kasan_save_alloc_info+0x3b/0x50
[   23.818420]  __kasan_kmalloc+0xb7/0xc0
[   23.818722]  __kmalloc_cache_noprof+0x189/0x420
[   23.818973]  kasan_memcmp+0xb7/0x390
[   23.819727]  kunit_try_run_case+0x1a5/0x480
[   23.819914]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.820248]  kthread+0x337/0x6f0
[   23.820533]  ret_from_fork+0x116/0x1d0
[   23.820666]  ret_from_fork_asm+0x1a/0x30
[   23.820836] 
[   23.821547] The buggy address belongs to the object at ffff8881023cb9c0
[   23.821547]  which belongs to the cache kmalloc-32 of size 32
[   23.821901] The buggy address is located 0 bytes to the right of
[   23.821901]  allocated 24-byte region [ffff8881023cb9c0, ffff8881023cb9d8)
[   23.822586] 
[   23.822684] The buggy address belongs to the physical page:
[   23.823081] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023cb
[   23.824211] flags: 0x200000000000000(node=0|zone=2)
[   23.824640] page_type: f5(slab)
[   23.824899] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   23.825482] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   23.825644] page dumped because: kasan: bad access detected
[   23.825738] 
[   23.825778] Memory state around the buggy address:
[   23.826631]  ffff8881023cb880: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   23.827060]  ffff8881023cb900: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   23.827371] >ffff8881023cb980: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   23.827856]                                                     ^
[   23.828040]  ffff8881023cba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.828903]  ffff8881023cba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.829217] ==================================================================