Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-x86_64

[   29.296873] ==================================================================
[   29.297423] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   29.297921] Read of size 1 at addr ffff8881024db9d8 by task kunit_try_catch/286
[   29.298422] 
[   29.298618] CPU: 1 UID: 0 PID: 286 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   29.298732] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.298757] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   29.298801] Call Trace:
[   29.298831]  <TASK>
[   29.298873]  dump_stack_lvl+0x73/0xb0
[   29.298937]  print_report+0xd1/0x650
[   29.298984]  ? __virt_addr_valid+0x1db/0x2d0
[   29.299035]  ? memcmp+0x1b4/0x1d0
[   29.299074]  ? kasan_complete_mode_report_info+0x2a/0x200
[   29.299139]  ? memcmp+0x1b4/0x1d0
[   29.299177]  kasan_report+0x141/0x180
[   29.299223]  ? memcmp+0x1b4/0x1d0
[   29.299270]  __asan_report_load1_noabort+0x18/0x20
[   29.299322]  memcmp+0x1b4/0x1d0
[   29.299364]  kasan_memcmp+0x18f/0x390
[   29.299403]  ? trace_hardirqs_on+0x37/0xe0
[   29.299450]  ? __pfx_kasan_memcmp+0x10/0x10
[   29.299488]  ? finish_task_switch.isra.0+0x153/0x700
[   29.299531]  ? __switch_to+0x47/0xf50
[   29.299590]  ? __pfx_read_tsc+0x10/0x10
[   29.299633]  ? ktime_get_ts64+0x86/0x230
[   29.299689]  kunit_try_run_case+0x1a5/0x480
[   29.299744]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.299786]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   29.299830]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   29.299876]  ? __kthread_parkme+0x82/0x180
[   29.299914]  ? preempt_count_sub+0x50/0x80
[   29.299957]  ? __pfx_kunit_try_run_case+0x10/0x10
[   29.300007]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.300062]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   29.300156]  kthread+0x337/0x6f0
[   29.300203]  ? trace_preempt_on+0x20/0xc0
[   29.300257]  ? __pfx_kthread+0x10/0x10
[   29.300306]  ? _raw_spin_unlock_irq+0x47/0x80
[   29.300343]  ? calculate_sigpending+0x7b/0xa0
[   29.300370]  ? __pfx_kthread+0x10/0x10
[   29.300394]  ret_from_fork+0x116/0x1d0
[   29.300416]  ? __pfx_kthread+0x10/0x10
[   29.300438]  ret_from_fork_asm+0x1a/0x30
[   29.300471]  </TASK>
[   29.300485] 
[   29.308820] Allocated by task 286:
[   29.309188]  kasan_save_stack+0x45/0x70
[   29.309588]  kasan_save_track+0x18/0x40
[   29.310047]  kasan_save_alloc_info+0x3b/0x50
[   29.310354]  __kasan_kmalloc+0xb7/0xc0
[   29.310533]  __kmalloc_cache_noprof+0x189/0x420
[   29.310735]  kasan_memcmp+0xb7/0x390
[   29.311061]  kunit_try_run_case+0x1a5/0x480
[   29.311419]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.311815]  kthread+0x337/0x6f0
[   29.312155]  ret_from_fork+0x116/0x1d0
[   29.312431]  ret_from_fork_asm+0x1a/0x30
[   29.312707] 
[   29.312848] The buggy address belongs to the object at ffff8881024db9c0
[   29.312848]  which belongs to the cache kmalloc-32 of size 32
[   29.313445] The buggy address is located 0 bytes to the right of
[   29.313445]  allocated 24-byte region [ffff8881024db9c0, ffff8881024db9d8)
[   29.314061] 
[   29.314182] The buggy address belongs to the physical page:
[   29.314552] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024db
[   29.314908] flags: 0x200000000000000(node=0|zone=2)
[   29.315221] page_type: f5(slab)
[   29.315487] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   29.315858] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   29.316275] page dumped because: kasan: bad access detected
[   29.316564] 
[   29.316699] Memory state around the buggy address:
[   29.317015]  ffff8881024db880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   29.317271]  ffff8881024db900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   29.317531] >ffff8881024db980: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   29.317781]                                                     ^
[   29.318009]  ffff8881024dba00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.318504]  ffff8881024dba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.319065] ==================================================================