Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.597847] ==================================================================
[   32.597911] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   32.597972] Read of size 1 at addr fff00000c9227858 by task kunit_try_catch/288
[   32.598025] 
[   32.598059] CPU: 1 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   32.598150] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   32.598187] Hardware name: linux,dummy-virt (DT)
[   32.598220] Call trace:
[   32.598245]  show_stack+0x20/0x38 (C)
[   32.598298]  dump_stack_lvl+0x8c/0xd0
[   32.598348]  print_report+0x118/0x5e8
[   32.598394]  kasan_report+0xdc/0x128
[   32.598440]  __asan_report_load1_noabort+0x20/0x30
[   32.598492]  memcmp+0x198/0x1d8
[   32.598538]  kasan_memcmp+0x16c/0x300
[   32.598585]  kunit_try_run_case+0x170/0x3f0
[   32.598636]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.598691]  kthread+0x328/0x630
[   32.598735]  ret_from_fork+0x10/0x20
[   32.598786] 
[   32.598808] Allocated by task 288:
[   32.598872]  kasan_save_stack+0x3c/0x68
[   32.598933]  kasan_save_track+0x20/0x40
[   32.598971]  kasan_save_alloc_info+0x40/0x58
[   32.599017]  __kasan_kmalloc+0xd4/0xd8
[   32.599056]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.599101]  kasan_memcmp+0xbc/0x300
[   32.599140]  kunit_try_run_case+0x170/0x3f0
[   32.599179]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.599224]  kthread+0x328/0x630
[   32.599260]  ret_from_fork+0x10/0x20
[   32.599299] 
[   32.599321] The buggy address belongs to the object at fff00000c9227840
[   32.599321]  which belongs to the cache kmalloc-32 of size 32
[   32.599381] The buggy address is located 0 bytes to the right of
[   32.599381]  allocated 24-byte region [fff00000c9227840, fff00000c9227858)
[   32.599447] 
[   32.599469] The buggy address belongs to the physical page:
[   32.599506] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109227
[   32.599561] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.599609] page_type: f5(slab)
[   32.599660] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   32.599720] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   32.599762] page dumped because: kasan: bad access detected
[   32.599795] 
[   32.601043] Memory state around the buggy address:
[   32.601431]  fff00000c9227700: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.601602]  fff00000c9227780: 00 00 00 04 fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.601798] >fff00000c9227800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.602103]                                                     ^
[   32.602378]  fff00000c9227880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.602461]  fff00000c9227900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.602839] ==================================================================

[   26.965377] ==================================================================
[   26.965870] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   26.966142] Read of size 1 at addr ffff888106006018 by task kunit_try_catch/305
[   26.966762] 
[   26.966890] CPU: 1 UID: 0 PID: 305 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   26.966941] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.966954] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.966977] Call Trace:
[   26.966991]  <TASK>
[   26.967006]  dump_stack_lvl+0x73/0xb0
[   26.967036]  print_report+0xd1/0x640
[   26.967063]  ? __virt_addr_valid+0x1db/0x2d0
[   26.967088]  ? memcmp+0x1b4/0x1d0
[   26.967108]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.967136]  ? memcmp+0x1b4/0x1d0
[   26.967157]  kasan_report+0x141/0x180
[   26.967180]  ? memcmp+0x1b4/0x1d0
[   26.967205]  __asan_report_load1_noabort+0x18/0x20
[   26.967231]  memcmp+0x1b4/0x1d0
[   26.967254]  kasan_memcmp+0x18f/0x390
[   26.967287]  ? finish_task_switch.isra.0+0x156/0x700
[   26.967312]  ? __pfx_kasan_memcmp+0x10/0x10
[   26.967333]  ? finish_task_switch.isra.0+0x153/0x700
[   26.967355]  ? __switch_to+0x47/0xf80
[   26.967385]  ? __pfx_read_tsc+0x10/0x10
[   26.967408]  ? ktime_get_ts64+0x86/0x230
[   26.967434]  kunit_try_run_case+0x1a5/0x480
[   26.967525]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.967553]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.967581]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.967607]  ? __kthread_parkme+0x82/0x180
[   26.967628]  ? preempt_count_sub+0x50/0x80
[   26.967651]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.967676]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.967701]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.967725]  kthread+0x337/0x6f0
[   26.967746]  ? trace_preempt_on+0x20/0xc0
[   26.967770]  ? __pfx_kthread+0x10/0x10
[   26.967792]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.967816]  ? calculate_sigpending+0x7b/0xa0
[   26.967853]  ? __pfx_kthread+0x10/0x10
[   26.967875]  ret_from_fork+0x116/0x1d0
[   26.967896]  ? __pfx_kthread+0x10/0x10
[   26.967917]  ret_from_fork_asm+0x1a/0x30
[   26.967949]  </TASK>
[   26.967960] 
[   26.975452] Allocated by task 305:
[   26.975629]  kasan_save_stack+0x45/0x70
[   26.975776]  kasan_save_track+0x18/0x40
[   26.975981]  kasan_save_alloc_info+0x3b/0x50
[   26.976189]  __kasan_kmalloc+0xb7/0xc0
[   26.976475]  __kmalloc_cache_noprof+0x189/0x420
[   26.976747]  kasan_memcmp+0xb7/0x390
[   26.976931]  kunit_try_run_case+0x1a5/0x480
[   26.977080]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.977257]  kthread+0x337/0x6f0
[   26.977419]  ret_from_fork+0x116/0x1d0
[   26.977607]  ret_from_fork_asm+0x1a/0x30
[   26.977796] 
[   26.977933] The buggy address belongs to the object at ffff888106006000
[   26.977933]  which belongs to the cache kmalloc-32 of size 32
[   26.978544] The buggy address is located 0 bytes to the right of
[   26.978544]  allocated 24-byte region [ffff888106006000, ffff888106006018)
[   26.978983] 
[   26.979076] The buggy address belongs to the physical page:
[   26.979332] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106006
[   26.980051] flags: 0x200000000000000(node=0|zone=2)
[   26.980276] page_type: f5(slab)
[   26.980399] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.981047] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.981367] page dumped because: kasan: bad access detected
[   26.981541] 
[   26.981664] Memory state around the buggy address:
[   26.981912]  ffff888106005f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.982243]  ffff888106005f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.982601] >ffff888106006000: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.982859]                             ^
[   26.983054]  ffff888106006080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.983399]  ffff888106006100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.983898] ==================================================================