Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.987999] ==================================================================
[   19.988061] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   19.988121] Read of size 1 at addr fff00000c6e54858 by task kunit_try_catch/259
[   19.988550] 
[   19.988617] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   19.988753] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.988848] Hardware name: linux,dummy-virt (DT)
[   19.988894] Call trace:
[   19.988918]  show_stack+0x20/0x38 (C)
[   19.988977]  dump_stack_lvl+0x8c/0xd0
[   19.989029]  print_report+0x118/0x608
[   19.989197]  kasan_report+0xdc/0x128
[   19.989423]  __asan_report_load1_noabort+0x20/0x30
[   19.989616]  memcmp+0x198/0x1d8
[   19.989714]  kasan_memcmp+0x16c/0x300
[   19.990014]  kunit_try_run_case+0x170/0x3f0
[   19.990188]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.990313]  kthread+0x328/0x630
[   19.990500]  ret_from_fork+0x10/0x20
[   19.990662] 
[   19.990685] Allocated by task 259:
[   19.991044]  kasan_save_stack+0x3c/0x68
[   19.991128]  kasan_save_track+0x20/0x40
[   19.991261]  kasan_save_alloc_info+0x40/0x58
[   19.991318]  __kasan_kmalloc+0xd4/0xd8
[   19.991386]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.991431]  kasan_memcmp+0xbc/0x300
[   19.991470]  kunit_try_run_case+0x170/0x3f0
[   19.991561]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.991615]  kthread+0x328/0x630
[   19.991670]  ret_from_fork+0x10/0x20
[   19.991708] 
[   19.991752] The buggy address belongs to the object at fff00000c6e54840
[   19.991752]  which belongs to the cache kmalloc-32 of size 32
[   19.991813] The buggy address is located 0 bytes to the right of
[   19.991813]  allocated 24-byte region [fff00000c6e54840, fff00000c6e54858)
[   19.991890] 
[   19.991914] The buggy address belongs to the physical page:
[   19.991948] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e54
[   19.992021] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.992075] page_type: f5(slab)
[   19.992115] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.992169] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.992347] page dumped because: kasan: bad access detected
[   19.992775] 
[   19.992862] Memory state around the buggy address:
[   19.992942]  fff00000c6e54700: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.993543]  fff00000c6e54780: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   19.993844] >fff00000c6e54800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.993922]                                                     ^
[   19.993979]  fff00000c6e54880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.994040]  fff00000c6e54900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.994107] ==================================================================

[   13.192713] ==================================================================
[   13.193380] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.193885] Read of size 1 at addr ffff888103603fd8 by task kunit_try_catch/277
[   13.194147] 
[   13.194274] CPU: 0 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   13.194325] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.194338] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.194361] Call Trace:
[   13.194374]  <TASK>
[   13.194391]  dump_stack_lvl+0x73/0xb0
[   13.194419]  print_report+0xd1/0x650
[   13.194445]  ? __virt_addr_valid+0x1db/0x2d0
[   13.194469]  ? memcmp+0x1b4/0x1d0
[   13.194489]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.194520]  ? memcmp+0x1b4/0x1d0
[   13.194540]  kasan_report+0x141/0x180
[   13.194563]  ? memcmp+0x1b4/0x1d0
[   13.194588]  __asan_report_load1_noabort+0x18/0x20
[   13.194610]  memcmp+0x1b4/0x1d0
[   13.194631]  kasan_memcmp+0x18f/0x390
[   13.194652]  ? trace_hardirqs_on+0x37/0xe0
[   13.194678]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.194699]  ? finish_task_switch.isra.0+0x153/0x700
[   13.194724]  ? __switch_to+0x5d9/0xf60
[   13.194746]  ? dequeue_task_fair+0x166/0x4e0
[   13.194774]  ? __pfx_read_tsc+0x10/0x10
[   13.194794]  ? ktime_get_ts64+0x86/0x230
[   13.194820]  kunit_try_run_case+0x1a5/0x480
[   13.194881]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.194902]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.194927]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.194952]  ? __kthread_parkme+0x82/0x180
[   13.194975]  ? preempt_count_sub+0x50/0x80
[   13.194999]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.195020]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.195045]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.195068]  kthread+0x337/0x6f0
[   13.195086]  ? trace_preempt_on+0x20/0xc0
[   13.195109]  ? __pfx_kthread+0x10/0x10
[   13.195128]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.195151]  ? calculate_sigpending+0x7b/0xa0
[   13.195173]  ? __pfx_kthread+0x10/0x10
[   13.195192]  ret_from_fork+0x41/0x80
[   13.195213]  ? __pfx_kthread+0x10/0x10
[   13.195232]  ret_from_fork_asm+0x1a/0x30
[   13.195263]  </TASK>
[   13.195276] 
[   13.203187] Allocated by task 277:
[   13.203327]  kasan_save_stack+0x45/0x70
[   13.203541]  kasan_save_track+0x18/0x40
[   13.203755]  kasan_save_alloc_info+0x3b/0x50
[   13.203984]  __kasan_kmalloc+0xb7/0xc0
[   13.204263]  __kmalloc_cache_noprof+0x189/0x420
[   13.204439]  kasan_memcmp+0xb7/0x390
[   13.204625]  kunit_try_run_case+0x1a5/0x480
[   13.204891]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.205129]  kthread+0x337/0x6f0
[   13.205274]  ret_from_fork+0x41/0x80
[   13.205455]  ret_from_fork_asm+0x1a/0x30
[   13.205702] 
[   13.205778] The buggy address belongs to the object at ffff888103603fc0
[   13.205778]  which belongs to the cache kmalloc-32 of size 32
[   13.206145] The buggy address is located 0 bytes to the right of
[   13.206145]  allocated 24-byte region [ffff888103603fc0, ffff888103603fd8)
[   13.206641] 
[   13.206806] The buggy address belongs to the physical page:
[   13.207078] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103603
[   13.207438] flags: 0x200000000000000(node=0|zone=2)
[   13.207778] page_type: f5(slab)
[   13.208092] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.208401] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.208736] page dumped because: kasan: bad access detected
[   13.209006] 
[   13.209108] Memory state around the buggy address:
[   13.209294]  ffff888103603e80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.209512]  ffff888103603f00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.209838] >ffff888103603f80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.210281]                                                     ^
[   13.210471]  ffff888103604000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.210687]  ffff888103604080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
[   13.211102] ==================================================================