Hay
Date
June 17, 2025, 3:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   24.591555] ==================================================================
[   24.591751] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   24.592291] Read of size 1 at addr fff00000c73a8458 by task kunit_try_catch/259
[   24.592475] 
[   24.592648] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT 
[   24.592967] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.593068] Hardware name: linux,dummy-virt (DT)
[   24.593171] Call trace:
[   24.593223]  show_stack+0x20/0x38 (C)
[   24.593359]  dump_stack_lvl+0x8c/0xd0
[   24.593473]  print_report+0x118/0x608
[   24.593938]  kasan_report+0xdc/0x128
[   24.594061]  __asan_report_load1_noabort+0x20/0x30
[   24.594186]  memcmp+0x198/0x1d8
[   24.594580]  kasan_memcmp+0x16c/0x300
[   24.594902]  kunit_try_run_case+0x170/0x3f0
[   24.595010]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.595112]  kthread+0x328/0x630
[   24.595647]  ret_from_fork+0x10/0x20
[   24.596005] 
[   24.596092] Allocated by task 259:
[   24.596248]  kasan_save_stack+0x3c/0x68
[   24.596380]  kasan_save_track+0x20/0x40
[   24.596494]  kasan_save_alloc_info+0x40/0x58
[   24.596685]  __kasan_kmalloc+0xd4/0xd8
[   24.596799]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.596903]  kasan_memcmp+0xbc/0x300
[   24.596995]  kunit_try_run_case+0x170/0x3f0
[   24.597104]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.597214]  kthread+0x328/0x630
[   24.597595]  ret_from_fork+0x10/0x20
[   24.597875] 
[   24.597928] The buggy address belongs to the object at fff00000c73a8440
[   24.597928]  which belongs to the cache kmalloc-32 of size 32
[   24.598081] The buggy address is located 0 bytes to the right of
[   24.598081]  allocated 24-byte region [fff00000c73a8440, fff00000c73a8458)
[   24.598217] 
[   24.598256] The buggy address belongs to the physical page:
[   24.598617] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1073a8
[   24.598788] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.598922] page_type: f5(slab)
[   24.599564] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.599767] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.599893] page dumped because: kasan: bad access detected
[   24.599976] 
[   24.600017] Memory state around the buggy address:
[   24.600148]  fff00000c73a8300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.600267]  fff00000c73a8380: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   24.600379] >fff00000c73a8400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.600482]                                                     ^
[   24.600583]  fff00000c73a8480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.600690]  fff00000c73a8500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.600802] ==================================================================

[   22.296759] ==================================================================
[   22.297904] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   22.298698] Read of size 1 at addr ffff8881030b3dd8 by task kunit_try_catch/277
[   22.300040] 
[   22.300689] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.15.3-rc1 #1 PREEMPT(voluntary) 
[   22.300829] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.300872] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.300910] Call Trace:
[   22.300931]  <TASK>
[   22.300956]  dump_stack_lvl+0x73/0xb0
[   22.300998]  print_report+0xd1/0x650
[   22.301345]  ? __virt_addr_valid+0x1db/0x2d0
[   22.301432]  ? memcmp+0x1b4/0x1d0
[   22.301501]  ? kasan_complete_mode_report_info+0x2a/0x200
[   22.301559]  ? memcmp+0x1b4/0x1d0
[   22.301591]  kasan_report+0x141/0x180
[   22.301628]  ? memcmp+0x1b4/0x1d0
[   22.301661]  __asan_report_load1_noabort+0x18/0x20
[   22.301693]  memcmp+0x1b4/0x1d0
[   22.301723]  kasan_memcmp+0x18f/0x390
[   22.301756]  ? trace_hardirqs_on+0x37/0xe0
[   22.301794]  ? __pfx_kasan_memcmp+0x10/0x10
[   22.301823]  ? finish_task_switch.isra.0+0x153/0x700
[   22.301858]  ? __switch_to+0x5d9/0xf60
[   22.301887]  ? dequeue_task_fair+0x166/0x4e0
[   22.301925]  ? __pfx_read_tsc+0x10/0x10
[   22.301955]  ? ktime_get_ts64+0x86/0x230
[   22.301993]  kunit_try_run_case+0x1a5/0x480
[   22.302049]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.302120]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.302160]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.302196]  ? __kthread_parkme+0x82/0x180
[   22.302229]  ? preempt_count_sub+0x50/0x80
[   22.302265]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.302323]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.302364]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.302399]  kthread+0x337/0x6f0
[   22.302422]  ? trace_preempt_on+0x20/0xc0
[   22.302455]  ? __pfx_kthread+0x10/0x10
[   22.302480]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.302512]  ? calculate_sigpending+0x7b/0xa0
[   22.302546]  ? __pfx_kthread+0x10/0x10
[   22.302570]  ret_from_fork+0x41/0x80
[   22.302602]  ? __pfx_kthread+0x10/0x10
[   22.302626]  ret_from_fork_asm+0x1a/0x30
[   22.302671]  </TASK>
[   22.302686] 
[   22.323032] Allocated by task 277:
[   22.323849]  kasan_save_stack+0x45/0x70
[   22.324488]  kasan_save_track+0x18/0x40
[   22.324904]  kasan_save_alloc_info+0x3b/0x50
[   22.325588]  __kasan_kmalloc+0xb7/0xc0
[   22.325939]  __kmalloc_cache_noprof+0x189/0x420
[   22.326707]  kasan_memcmp+0xb7/0x390
[   22.326978]  kunit_try_run_case+0x1a5/0x480
[   22.327622]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.328447]  kthread+0x337/0x6f0
[   22.328751]  ret_from_fork+0x41/0x80
[   22.329270]  ret_from_fork_asm+0x1a/0x30
[   22.329714] 
[   22.329928] The buggy address belongs to the object at ffff8881030b3dc0
[   22.329928]  which belongs to the cache kmalloc-32 of size 32
[   22.331234] The buggy address is located 0 bytes to the right of
[   22.331234]  allocated 24-byte region [ffff8881030b3dc0, ffff8881030b3dd8)
[   22.332670] 
[   22.332857] The buggy address belongs to the physical page:
[   22.333577] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1030b3
[   22.334105] flags: 0x200000000000000(node=0|zone=2)
[   22.334889] page_type: f5(slab)
[   22.335272] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   22.336119] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   22.336755] page dumped because: kasan: bad access detected
[   22.337141] 
[   22.337781] Memory state around the buggy address:
[   22.338388]  ffff8881030b3c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   22.338997]  ffff8881030b3d00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.339592] >ffff8881030b3d80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.340048]                                                     ^
[   22.341246]  ffff8881030b3e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.341809]  ffff8881030b3e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.342933] ==================================================================