Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   22.016480] ==================================================================
[   22.017421] BUG: KASAN: slab-out-of-bounds in memchr+0x78/0x88
[   22.018170] Read of size 1 at addr fff00000c6cf8fd8 by task kunit_try_catch/242
[   22.018568] 
[   22.019351] CPU: 1 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   22.019605] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.019649] Hardware name: linux,dummy-virt (DT)
[   22.019694] Call trace:
[   22.019728]  dump_backtrace+0x9c/0x128
[   22.019793]  show_stack+0x20/0x38
[   22.019839]  dump_stack_lvl+0x8c/0xd0
[   22.019888]  print_report+0x118/0x5f0
[   22.019936]  kasan_report+0xdc/0x128
[   22.019979]  __asan_report_load1_noabort+0x20/0x30
[   22.020028]  memchr+0x78/0x88
[   22.020070]  kasan_memchr+0x150/0x2f0
[   22.020115]  kunit_try_run_case+0x170/0x3f0
[   22.020163]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.020217]  kthread+0x24c/0x2d0
[   22.020294]  ret_from_fork+0x10/0x20
[   22.020347] 
[   22.025144] Allocated by task 242:
[   22.025764]  kasan_save_stack+0x3c/0x68
[   22.026359]  kasan_save_track+0x20/0x40
[   22.026929]  kasan_save_alloc_info+0x40/0x58
[   22.027468]  __kasan_kmalloc+0xd4/0xd8
[   22.028033]  __kmalloc_cache_noprof+0x154/0x320
[   22.028566]  kasan_memchr+0xb0/0x2f0
[   22.029071]  kunit_try_run_case+0x170/0x3f0
[   22.029630]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.030315]  kthread+0x24c/0x2d0
[   22.030744]  ret_from_fork+0x10/0x20
[   22.031268] 
[   22.031603] The buggy address belongs to the object at fff00000c6cf8fc0
[   22.031603]  which belongs to the cache kmalloc-32 of size 32
[   22.032710] The buggy address is located 0 bytes to the right of
[   22.032710]  allocated 24-byte region [fff00000c6cf8fc0, fff00000c6cf8fd8)
[   22.033856] 
[   22.034191] The buggy address belongs to the physical page:
[   22.034707] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cf8
[   22.035549] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.036218] page_type: f5(slab)
[   22.036692] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   22.037433] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   22.038114] page dumped because: kasan: bad access detected
[   22.038556] 
[   22.038878] Memory state around the buggy address:
[   22.039426]  fff00000c6cf8e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   22.040035]  fff00000c6cf8f00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.040663] >fff00000c6cf8f80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.041259]                                                     ^
[   22.041759]  fff00000c6cf9000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.042362]  fff00000c6cf9080: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
[   22.042961] ==================================================================

[   13.986740] ==================================================================
[   13.987147] BUG: KASAN: slab-out-of-bounds in memchr+0x79/0x90
[   13.987335] Read of size 1 at addr ffff888102986bd8 by task kunit_try_catch/260
[   13.987597] 
[   13.987657] CPU: 1 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   13.987707] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.987719] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.987737] Call Trace:
[   13.987750]  <TASK>
[   13.987765]  dump_stack_lvl+0x73/0xb0
[   13.987787]  print_report+0xd1/0x640
[   13.987807]  ? __virt_addr_valid+0x1db/0x2d0
[   13.987828]  ? memchr+0x79/0x90
[   13.987845]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.987865]  ? memchr+0x79/0x90
[   13.987882]  kasan_report+0x140/0x180
[   13.987901]  ? memchr+0x79/0x90
[   13.987923]  __asan_report_load1_noabort+0x18/0x20
[   13.987942]  memchr+0x79/0x90
[   13.987961]  kasan_memchr+0x163/0x320
[   13.987979]  ? __pfx_kasan_memchr+0x10/0x10
[   13.987999]  ? __schedule+0xc49/0x27a0
[   13.988016]  ? __pfx_read_tsc+0x10/0x10
[   13.988032]  ? ktime_get_ts64+0x84/0x230
[   13.988054]  kunit_try_run_case+0x1a6/0x480
[   13.988074]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.988091]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   13.988109]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.988130]  ? __kthread_parkme+0x82/0x160
[   13.988147]  ? preempt_count_sub+0x50/0x80
[   13.988166]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.988183]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.988205]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.988226]  kthread+0x257/0x310
[   13.988242]  ? __pfx_kthread+0x10/0x10
[   13.988258]  ret_from_fork+0x41/0x80
[   13.988275]  ? __pfx_kthread+0x10/0x10
[   13.988291]  ret_from_fork_asm+0x1a/0x30
[   13.988322]  </TASK>
[   13.988608] 
[   13.993877] Allocated by task 260:
[   13.994298]  kasan_save_stack+0x45/0x70
[   13.994558]  kasan_save_track+0x18/0x40
[   13.994782]  kasan_save_alloc_info+0x3b/0x50
[   13.994880]  __kasan_kmalloc+0xb7/0xc0
[   13.994966]  __kmalloc_cache_noprof+0x168/0x350
[   13.995057]  kasan_memchr+0xad/0x320
[   13.995135]  kunit_try_run_case+0x1a6/0x480
[   13.995218]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.995316]  kthread+0x257/0x310
[   13.995434]  ret_from_fork+0x41/0x80
[   13.995726]  ret_from_fork_asm+0x1a/0x30
[   13.996038] 
[   13.996348] The buggy address belongs to the object at ffff888102986bc0
[   13.996348]  which belongs to the cache kmalloc-32 of size 32
[   13.997158] The buggy address is located 0 bytes to the right of
[   13.997158]  allocated 24-byte region [ffff888102986bc0, ffff888102986bd8)
[   13.997695] 
[   13.997792] The buggy address belongs to the physical page:
[   13.998040] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102986
[   13.998301] flags: 0x200000000000000(node=0|zone=2)
[   13.998501] page_type: f5(slab)
[   13.998616] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.998843] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   13.999110] page dumped because: kasan: bad access detected
[   13.999268] 
[   13.999366] Memory state around the buggy address:
[   13.999526]  ffff888102986a80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.999763]  ffff888102986b00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.999947] >ffff888102986b80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.000188]                                                     ^
[   14.000406]  ffff888102986c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.000586]  ffff888102986c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.000841] ==================================================================