Hay
Date
July 25, 2025, 3:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.603234] ==================================================================
[   34.603400] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   34.603465] Read of size 1 at addr fff00000c9a941d8 by task kunit_try_catch/289
[   34.603722] 
[   34.603804] CPU: 0 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   34.603976] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   34.604103] Hardware name: linux,dummy-virt (DT)
[   34.604137] Call trace:
[   34.604263]  show_stack+0x20/0x38 (C)
[   34.604328]  dump_stack_lvl+0x8c/0xd0
[   34.604423]  print_report+0x118/0x5e8
[   34.604617]  kasan_report+0xdc/0x128
[   34.604678]  __asan_report_load1_noabort+0x20/0x30
[   34.604737]  memcmp+0x198/0x1d8
[   34.604825]  kasan_memcmp+0x16c/0x300
[   34.605075]  kunit_try_run_case+0x170/0x3f0
[   34.605189]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.605244]  kthread+0x328/0x630
[   34.605288]  ret_from_fork+0x10/0x20
[   34.605339] 
[   34.605359] Allocated by task 289:
[   34.605390]  kasan_save_stack+0x3c/0x68
[   34.605483]  kasan_save_track+0x20/0x40
[   34.605633]  kasan_save_alloc_info+0x40/0x58
[   34.605682]  __kasan_kmalloc+0xd4/0xd8
[   34.605717]  __kmalloc_cache_noprof+0x16c/0x3c0
[   34.605762]  kasan_memcmp+0xbc/0x300
[   34.605800]  kunit_try_run_case+0x170/0x3f0
[   34.605837]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.605881]  kthread+0x328/0x630
[   34.605914]  ret_from_fork+0x10/0x20
[   34.606409] 
[   34.606741] The buggy address belongs to the object at fff00000c9a941c0
[   34.606741]  which belongs to the cache kmalloc-32 of size 32
[   34.606891] The buggy address is located 0 bytes to the right of
[   34.606891]  allocated 24-byte region [fff00000c9a941c0, fff00000c9a941d8)
[   34.607122] 
[   34.607147] The buggy address belongs to the physical page:
[   34.607184] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109a94
[   34.607241] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.607425] page_type: f5(slab)
[   34.607470] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   34.607588] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   34.607730] page dumped because: kasan: bad access detected
[   34.607898] 
[   34.607959] Memory state around the buggy address:
[   34.608012]  fff00000c9a94080: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   34.608059]  fff00000c9a94100: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   34.608114] >fff00000c9a94180: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   34.608243]                                                     ^
[   34.608283]  fff00000c9a94200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.608327]  fff00000c9a94280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.608367] ==================================================================

[   27.704229] ==================================================================
[   27.705743] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   27.707002] Read of size 1 at addr ffff88810625fe98 by task kunit_try_catch/306
[   27.707790] 
[   27.707911] CPU: 1 UID: 0 PID: 306 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   27.707972] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.707984] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.708007] Call Trace:
[   27.708019]  <TASK>
[   27.708035]  dump_stack_lvl+0x73/0xb0
[   27.708065]  print_report+0xd1/0x640
[   27.708090]  ? __virt_addr_valid+0x1db/0x2d0
[   27.708114]  ? memcmp+0x1b4/0x1d0
[   27.708136]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.708166]  ? memcmp+0x1b4/0x1d0
[   27.708188]  kasan_report+0x141/0x180
[   27.708211]  ? memcmp+0x1b4/0x1d0
[   27.708240]  __asan_report_load1_noabort+0x18/0x20
[   27.708266]  memcmp+0x1b4/0x1d0
[   27.708290]  kasan_memcmp+0x18f/0x390
[   27.708312]  ? trace_hardirqs_on+0x37/0xe0
[   27.708466]  ? __pfx_kasan_memcmp+0x10/0x10
[   27.708498]  ? finish_task_switch.isra.0+0x153/0x700
[   27.708523]  ? __switch_to+0x47/0xf80
[   27.708555]  ? __pfx_read_tsc+0x10/0x10
[   27.708577]  ? ktime_get_ts64+0x86/0x230
[   27.708603]  kunit_try_run_case+0x1a5/0x480
[   27.708630]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.708654]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.708678]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.708706]  ? __kthread_parkme+0x82/0x180
[   27.708726]  ? preempt_count_sub+0x50/0x80
[   27.708752]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.708777]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.708876]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.708902]  kthread+0x337/0x6f0
[   27.708924]  ? trace_preempt_on+0x20/0xc0
[   27.708960]  ? __pfx_kthread+0x10/0x10
[   27.708983]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.709008]  ? calculate_sigpending+0x7b/0xa0
[   27.709033]  ? __pfx_kthread+0x10/0x10
[   27.709056]  ret_from_fork+0x116/0x1d0
[   27.709077]  ? __pfx_kthread+0x10/0x10
[   27.709098]  ret_from_fork_asm+0x1a/0x30
[   27.709136]  </TASK>
[   27.709148] 
[   27.717182] Allocated by task 306:
[   27.717351]  kasan_save_stack+0x45/0x70
[   27.717553]  kasan_save_track+0x18/0x40
[   27.717719]  kasan_save_alloc_info+0x3b/0x50
[   27.717899]  __kasan_kmalloc+0xb7/0xc0
[   27.718042]  __kmalloc_cache_noprof+0x189/0x420
[   27.718200]  kasan_memcmp+0xb7/0x390
[   27.718328]  kunit_try_run_case+0x1a5/0x480
[   27.718529]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.718785]  kthread+0x337/0x6f0
[   27.718982]  ret_from_fork+0x116/0x1d0
[   27.719319]  ret_from_fork_asm+0x1a/0x30
[   27.719519] 
[   27.719608] The buggy address belongs to the object at ffff88810625fe80
[   27.719608]  which belongs to the cache kmalloc-32 of size 32
[   27.720113] The buggy address is located 0 bytes to the right of
[   27.720113]  allocated 24-byte region [ffff88810625fe80, ffff88810625fe98)
[   27.720737] 
[   27.720874] The buggy address belongs to the physical page:
[   27.721268] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10625f
[   27.721616] flags: 0x200000000000000(node=0|zone=2)
[   27.721807] page_type: f5(slab)
[   27.722040] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   27.722291] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   27.722520] page dumped because: kasan: bad access detected
[   27.722691] 
[   27.722757] Memory state around the buggy address:
[   27.722914]  ffff88810625fd80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   27.723203]  ffff88810625fe00: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   27.723602] >ffff88810625fe80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.723923]                             ^
[   27.724418]  ffff88810625ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.724724]  ffff88810625ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.725353] ==================================================================