Hay
Date
July 3, 2025, 3:13 p.m.

Environment
qemu-x86_64

[   13.069430] ==================================================================
[   13.069903] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.070118] Read of size 1 at addr ffff8881039f0b18 by task kunit_try_catch/276
[   13.070368] 
[   13.070935] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT(voluntary) 
[   13.070992] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.071007] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.071030] Call Trace:
[   13.071044]  <TASK>
[   13.071062]  dump_stack_lvl+0x73/0xb0
[   13.071090]  print_report+0xd1/0x650
[   13.071116]  ? __virt_addr_valid+0x1db/0x2d0
[   13.071139]  ? memcmp+0x1b4/0x1d0
[   13.071158]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.071181]  ? memcmp+0x1b4/0x1d0
[   13.071202]  kasan_report+0x141/0x180
[   13.071226]  ? memcmp+0x1b4/0x1d0
[   13.071264]  __asan_report_load1_noabort+0x18/0x20
[   13.071286]  memcmp+0x1b4/0x1d0
[   13.071306]  kasan_memcmp+0x18f/0x390
[   13.071328]  ? trace_hardirqs_on+0x37/0xe0
[   13.071353]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.071373]  ? finish_task_switch.isra.0+0x153/0x700
[   13.071398]  ? __switch_to+0x5d9/0xf60
[   13.071420]  ? dequeue_task_fair+0x156/0x4e0
[   13.071448]  ? __pfx_read_tsc+0x10/0x10
[   13.071468]  ? ktime_get_ts64+0x86/0x230
[   13.071494]  kunit_try_run_case+0x1a5/0x480
[   13.071520]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.071543]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.071567]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.071592]  ? __kthread_parkme+0x82/0x180
[   13.071614]  ? preempt_count_sub+0x50/0x80
[   13.071639]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.071663]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.071687]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.071710]  kthread+0x337/0x6f0
[   13.071727]  ? trace_preempt_on+0x20/0xc0
[   13.071750]  ? __pfx_kthread+0x10/0x10
[   13.071768]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.071790]  ? calculate_sigpending+0x7b/0xa0
[   13.071813]  ? __pfx_kthread+0x10/0x10
[   13.071831]  ret_from_fork+0x41/0x80
[   13.071852]  ? __pfx_kthread+0x10/0x10
[   13.071870]  ret_from_fork_asm+0x1a/0x30
[   13.071902]  </TASK>
[   13.071913] 
[   13.085796] Allocated by task 276:
[   13.085960]  kasan_save_stack+0x45/0x70
[   13.086116]  kasan_save_track+0x18/0x40
[   13.086262]  kasan_save_alloc_info+0x3b/0x50
[   13.086687]  __kasan_kmalloc+0xb7/0xc0
[   13.087078]  __kmalloc_cache_noprof+0x189/0x420
[   13.087640]  kasan_memcmp+0xb7/0x390
[   13.087995]  kunit_try_run_case+0x1a5/0x480
[   13.088437]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.089065]  kthread+0x337/0x6f0
[   13.089196]  ret_from_fork+0x41/0x80
[   13.089476]  ret_from_fork_asm+0x1a/0x30
[   13.089842] 
[   13.090013] The buggy address belongs to the object at ffff8881039f0b00
[   13.090013]  which belongs to the cache kmalloc-32 of size 32
[   13.091219] The buggy address is located 0 bytes to the right of
[   13.091219]  allocated 24-byte region [ffff8881039f0b00, ffff8881039f0b18)
[   13.091983] 
[   13.092063] The buggy address belongs to the physical page:
[   13.092250] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039f0
[   13.093415] flags: 0x200000000000000(node=0|zone=2)
[   13.093972] page_type: f5(slab)
[   13.094405] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.095093] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.095872] page dumped because: kasan: bad access detected
[   13.096181] 
[   13.096265] Memory state around the buggy address:
[   13.096584]  ffff8881039f0a00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.097033]  ffff8881039f0a80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.097728] >ffff8881039f0b00: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.098253]                             ^
[   13.098698]  ffff8881039f0b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.099096]  ffff8881039f0c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.099476] ==================================================================