Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.723959] ==================================================================
[   17.724055] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   17.724115] Read of size 1 at addr fff00000c5977958 by task kunit_try_catch/258
[   17.724169] 
[   17.724254] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.724477] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.724515] Hardware name: linux,dummy-virt (DT)
[   17.724576] Call trace:
[   17.724603]  show_stack+0x20/0x38 (C)
[   17.724668]  dump_stack_lvl+0x8c/0xd0
[   17.724718]  print_report+0x118/0x5d0
[   17.724783]  kasan_report+0xdc/0x128
[   17.724831]  __asan_report_load1_noabort+0x20/0x30
[   17.725106]  memcmp+0x198/0x1d8
[   17.725174]  kasan_memcmp+0x16c/0x300
[   17.725259]  kunit_try_run_case+0x170/0x3f0
[   17.725373]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.725430]  kthread+0x328/0x630
[   17.725475]  ret_from_fork+0x10/0x20
[   17.725524] 
[   17.725546] Allocated by task 258:
[   17.725576]  kasan_save_stack+0x3c/0x68
[   17.725620]  kasan_save_track+0x20/0x40
[   17.725659]  kasan_save_alloc_info+0x40/0x58
[   17.725701]  __kasan_kmalloc+0xd4/0xd8
[   17.725739]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.726619]  kasan_memcmp+0xbc/0x300
[   17.727557]  kunit_try_run_case+0x170/0x3f0
[   17.728223]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.729481]  kthread+0x328/0x630
[   17.729531]  ret_from_fork+0x10/0x20
[   17.730812] 
[   17.731326] The buggy address belongs to the object at fff00000c5977940
[   17.731326]  which belongs to the cache kmalloc-32 of size 32
[   17.731412] The buggy address is located 0 bytes to the right of
[   17.731412]  allocated 24-byte region [fff00000c5977940, fff00000c5977958)
[   17.731483] 
[   17.732217] The buggy address belongs to the physical page:
[   17.732260] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105977
[   17.732887] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.734931] page_type: f5(slab)
[   17.735548] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.735610] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.735655] page dumped because: kasan: bad access detected
[   17.735689] 
[   17.735709] Memory state around the buggy address:
[   17.735745]  fff00000c5977800: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.735791]  fff00000c5977880: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   17.735836] >fff00000c5977900: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.735954]                                                     ^
[   17.736110]  fff00000c5977980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.736171]  fff00000c5977a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.736608] ==================================================================

[   14.409455] ==================================================================
[   14.410131] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.410894] Read of size 1 at addr ffff8881032dead8 by task kunit_try_catch/274
[   14.411218] 
[   14.411331] CPU: 0 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.411698] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.411711] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.411733] Call Trace:
[   14.411746]  <TASK>
[   14.411777]  dump_stack_lvl+0x73/0xb0
[   14.411808]  print_report+0xd1/0x610
[   14.411835]  ? __virt_addr_valid+0x1db/0x2d0
[   14.411860]  ? memcmp+0x1b4/0x1d0
[   14.411877]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.411902]  ? memcmp+0x1b4/0x1d0
[   14.411919]  kasan_report+0x141/0x180
[   14.411941]  ? memcmp+0x1b4/0x1d0
[   14.411963]  __asan_report_load1_noabort+0x18/0x20
[   14.411989]  memcmp+0x1b4/0x1d0
[   14.412009]  kasan_memcmp+0x18f/0x390
[   14.412028]  ? trace_hardirqs_on+0x37/0xe0
[   14.412053]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.412074]  ? finish_task_switch.isra.0+0x153/0x700
[   14.412099]  ? __switch_to+0x47/0xf50
[   14.412128]  ? __pfx_read_tsc+0x10/0x10
[   14.412150]  ? ktime_get_ts64+0x86/0x230
[   14.412175]  kunit_try_run_case+0x1a5/0x480
[   14.412201]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.412225]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.412251]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.412276]  ? __kthread_parkme+0x82/0x180
[   14.412297]  ? preempt_count_sub+0x50/0x80
[   14.412321]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.412383]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.412410]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.412437]  kthread+0x337/0x6f0
[   14.412456]  ? trace_preempt_on+0x20/0xc0
[   14.412479]  ? __pfx_kthread+0x10/0x10
[   14.412500]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.412522]  ? calculate_sigpending+0x7b/0xa0
[   14.412548]  ? __pfx_kthread+0x10/0x10
[   14.412569]  ret_from_fork+0x116/0x1d0
[   14.412589]  ? __pfx_kthread+0x10/0x10
[   14.412610]  ret_from_fork_asm+0x1a/0x30
[   14.412642]  </TASK>
[   14.412651] 
[   14.423254] Allocated by task 274:
[   14.423448]  kasan_save_stack+0x45/0x70
[   14.423772]  kasan_save_track+0x18/0x40
[   14.423929]  kasan_save_alloc_info+0x3b/0x50
[   14.424109]  __kasan_kmalloc+0xb7/0xc0
[   14.424301]  __kmalloc_cache_noprof+0x189/0x420
[   14.424664]  kasan_memcmp+0xb7/0x390
[   14.424845]  kunit_try_run_case+0x1a5/0x480
[   14.425024]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.425286]  kthread+0x337/0x6f0
[   14.425633]  ret_from_fork+0x116/0x1d0
[   14.425814]  ret_from_fork_asm+0x1a/0x30
[   14.426018] 
[   14.426115] The buggy address belongs to the object at ffff8881032deac0
[   14.426115]  which belongs to the cache kmalloc-32 of size 32
[   14.426679] The buggy address is located 0 bytes to the right of
[   14.426679]  allocated 24-byte region [ffff8881032deac0, ffff8881032dead8)
[   14.427114] 
[   14.427189] The buggy address belongs to the physical page:
[   14.427380] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1032de
[   14.427872] flags: 0x200000000000000(node=0|zone=2)
[   14.428243] page_type: f5(slab)
[   14.428468] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.428771] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.429050] page dumped because: kasan: bad access detected
[   14.429222] 
[   14.429319] Memory state around the buggy address:
[   14.429697]  ffff8881032de980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.430037]  ffff8881032dea00: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   14.430424] >ffff8881032dea80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.430701]                                                     ^
[   14.430956]  ffff8881032deb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.431255]  ffff8881032deb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.431474] ==================================================================