Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   28.054452] ==================================================================
[   28.054663] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   28.055001] Read of size 1 at addr fff00000c7050f58 by task kunit_try_catch/259
[   28.055169] 
[   28.055300] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT 
[   28.055599] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.055915] Hardware name: linux,dummy-virt (DT)
[   28.056007] Call trace:
[   28.056068]  show_stack+0x20/0x38 (C)
[   28.056243]  dump_stack_lvl+0x8c/0xd0
[   28.056362]  print_report+0x118/0x608
[   28.056496]  kasan_report+0xdc/0x128
[   28.056619]  __asan_report_load1_noabort+0x20/0x30
[   28.056940]  memcmp+0x198/0x1d8
[   28.057103]  kasan_memcmp+0x16c/0x300
[   28.057245]  kunit_try_run_case+0x170/0x3f0
[   28.057596]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.057779]  kthread+0x328/0x630
[   28.057916]  ret_from_fork+0x10/0x20
[   28.058031] 
[   28.058106] Allocated by task 259:
[   28.058310]  kasan_save_stack+0x3c/0x68
[   28.058969]  kasan_save_track+0x20/0x40
[   28.059266]  kasan_save_alloc_info+0x40/0x58
[   28.059446]  __kasan_kmalloc+0xd4/0xd8
[   28.059546]  __kmalloc_cache_noprof+0x16c/0x3c0
[   28.059664]  kasan_memcmp+0xbc/0x300
[   28.060036]  kunit_try_run_case+0x170/0x3f0
[   28.060351]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.060509]  kthread+0x328/0x630
[   28.060598]  ret_from_fork+0x10/0x20
[   28.060680] 
[   28.060743] The buggy address belongs to the object at fff00000c7050f40
[   28.060743]  which belongs to the cache kmalloc-32 of size 32
[   28.061270] The buggy address is located 0 bytes to the right of
[   28.061270]  allocated 24-byte region [fff00000c7050f40, fff00000c7050f58)
[   28.061367] 
[   28.061418] The buggy address belongs to the physical page:
[   28.061519] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107050
[   28.061684] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   28.061807] page_type: f5(slab)
[   28.062013] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   28.062167] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   28.062322] page dumped because: kasan: bad access detected
[   28.062826] 
[   28.062900] Memory state around the buggy address:
[   28.063091]  fff00000c7050e00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.063209]  fff00000c7050e80: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   28.063326] >fff00000c7050f00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.064833]                                                     ^
[   28.065037]  fff00000c7050f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.065149]  fff00000c7051000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.065254] ==================================================================

[   20.059150] ==================================================================
[   20.060544] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   20.061460] Read of size 1 at addr ffff88810a08ab58 by task kunit_try_catch/278
[   20.062567] 
[   20.062800] CPU: 1 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   20.062924] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.062963] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   20.063019] Call Trace:
[   20.063057]  <TASK>
[   20.063232]  dump_stack_lvl+0x73/0xb0
[   20.063313]  print_report+0xd1/0x650
[   20.063423]  ? __virt_addr_valid+0x1db/0x2d0
[   20.063473]  ? memcmp+0x1b4/0x1d0
[   20.063504]  ? kasan_complete_mode_report_info+0x2a/0x200
[   20.063537]  ? memcmp+0x1b4/0x1d0
[   20.063563]  kasan_report+0x141/0x180
[   20.063597]  ? memcmp+0x1b4/0x1d0
[   20.063694]  __asan_report_load1_noabort+0x18/0x20
[   20.063755]  memcmp+0x1b4/0x1d0
[   20.063787]  kasan_memcmp+0x18f/0x390
[   20.063817]  ? trace_hardirqs_on+0x37/0xe0
[   20.063854]  ? __pfx_kasan_memcmp+0x10/0x10
[   20.063884]  ? finish_task_switch.isra.0+0x153/0x700
[   20.063917]  ? __switch_to+0x5d9/0xf60
[   20.063947]  ? dequeue_task_fair+0x166/0x4e0
[   20.063985]  ? __pfx_read_tsc+0x10/0x10
[   20.064015]  ? ktime_get_ts64+0x86/0x230
[   20.064050]  kunit_try_run_case+0x1a5/0x480
[   20.064086]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.064119]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   20.064154]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   20.064187]  ? __kthread_parkme+0x82/0x180
[   20.064230]  ? preempt_count_sub+0x50/0x80
[   20.064285]  ? __pfx_kunit_try_run_case+0x10/0x10
[   20.064322]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.064356]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   20.064390]  kthread+0x337/0x6f0
[   20.064414]  ? trace_preempt_on+0x20/0xc0
[   20.064446]  ? __pfx_kthread+0x10/0x10
[   20.064471]  ? _raw_spin_unlock_irq+0x47/0x80
[   20.064503]  ? calculate_sigpending+0x7b/0xa0
[   20.064535]  ? __pfx_kthread+0x10/0x10
[   20.064560]  ret_from_fork+0x41/0x80
[   20.064591]  ? __pfx_kthread+0x10/0x10
[   20.064666]  ret_from_fork_asm+0x1a/0x30
[   20.064764]  </TASK>
[   20.064805] 
[   20.087076] Allocated by task 278:
[   20.087873]  kasan_save_stack+0x45/0x70
[   20.088675]  kasan_save_track+0x18/0x40
[   20.089285]  kasan_save_alloc_info+0x3b/0x50
[   20.089729]  __kasan_kmalloc+0xb7/0xc0
[   20.090123]  __kmalloc_cache_noprof+0x189/0x420
[   20.091019]  kasan_memcmp+0xb7/0x390
[   20.091332]  kunit_try_run_case+0x1a5/0x480
[   20.091917]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   20.092412]  kthread+0x337/0x6f0
[   20.093118]  ret_from_fork+0x41/0x80
[   20.093520]  ret_from_fork_asm+0x1a/0x30
[   20.093933] 
[   20.094173] The buggy address belongs to the object at ffff88810a08ab40
[   20.094173]  which belongs to the cache kmalloc-32 of size 32
[   20.095066] The buggy address is located 0 bytes to the right of
[   20.095066]  allocated 24-byte region [ffff88810a08ab40, ffff88810a08ab58)
[   20.096124] 
[   20.096355] The buggy address belongs to the physical page:
[   20.096996] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a08a
[   20.097777] flags: 0x200000000000000(node=0|zone=2)
[   20.098294] page_type: f5(slab)
[   20.098741] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   20.099345] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.100376] page dumped because: kasan: bad access detected
[   20.101028] 
[   20.101256] Memory state around the buggy address:
[   20.101900]  ffff88810a08aa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.102533]  ffff88810a08aa80: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   20.103219] >ffff88810a08ab00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.103808]                                                     ^
[   20.104262]  ffff88810a08ab80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.104994]  ffff88810a08ac00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.105518] ==================================================================