Hay
Date
July 11, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.005535] ==================================================================
[   19.005599] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   19.005666] Read of size 1 at addr fff00000c5908098 by task kunit_try_catch/258
[   19.005718] 
[   19.005760] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.005922] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.006052] Hardware name: linux,dummy-virt (DT)
[   19.006095] Call trace:
[   19.006175]  show_stack+0x20/0x38 (C)
[   19.006240]  dump_stack_lvl+0x8c/0xd0
[   19.006291]  print_report+0x118/0x608
[   19.006597]  kasan_report+0xdc/0x128
[   19.006806]  __asan_report_load1_noabort+0x20/0x30
[   19.006947]  memcmp+0x198/0x1d8
[   19.007006]  kasan_memcmp+0x16c/0x300
[   19.007055]  kunit_try_run_case+0x170/0x3f0
[   19.007107]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.007164]  kthread+0x328/0x630
[   19.007211]  ret_from_fork+0x10/0x20
[   19.007263] 
[   19.007284] Allocated by task 258:
[   19.007315]  kasan_save_stack+0x3c/0x68
[   19.007364]  kasan_save_track+0x20/0x40
[   19.007403]  kasan_save_alloc_info+0x40/0x58
[   19.007445]  __kasan_kmalloc+0xd4/0xd8
[   19.007483]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.007526]  kasan_memcmp+0xbc/0x300
[   19.007562]  kunit_try_run_case+0x170/0x3f0
[   19.007601]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.007646]  kthread+0x328/0x630
[   19.007681]  ret_from_fork+0x10/0x20
[   19.007718] 
[   19.007739] The buggy address belongs to the object at fff00000c5908080
[   19.007739]  which belongs to the cache kmalloc-32 of size 32
[   19.007797] The buggy address is located 0 bytes to the right of
[   19.007797]  allocated 24-byte region [fff00000c5908080, fff00000c5908098)
[   19.007928] 
[   19.008003] The buggy address belongs to the physical page:
[   19.008101] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105908
[   19.008172] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.008256] page_type: f5(slab)
[   19.008479] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.008677] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.008720] page dumped because: kasan: bad access detected
[   19.008754] 
[   19.008775] Memory state around the buggy address:
[   19.008809]  fff00000c5907f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.008863]  fff00000c5908000: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.008936] >fff00000c5908080: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.008978]                             ^
[   19.009016]  fff00000c5908100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.009094]  fff00000c5908180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.009146] ==================================================================

[   14.292666] ==================================================================
[   14.294307] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   14.294889] Read of size 1 at addr ffff888103958098 by task kunit_try_catch/274
[   14.295583] 
[   14.295692] CPU: 0 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.295738] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.295984] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.296014] Call Trace:
[   14.296028]  <TASK>
[   14.296090]  dump_stack_lvl+0x73/0xb0
[   14.296134]  print_report+0xd1/0x650
[   14.296159]  ? __virt_addr_valid+0x1db/0x2d0
[   14.296183]  ? memcmp+0x1b4/0x1d0
[   14.296200]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.296224]  ? memcmp+0x1b4/0x1d0
[   14.296242]  kasan_report+0x141/0x180
[   14.296264]  ? memcmp+0x1b4/0x1d0
[   14.296287]  __asan_report_load1_noabort+0x18/0x20
[   14.296312]  memcmp+0x1b4/0x1d0
[   14.296331]  kasan_memcmp+0x18f/0x390
[   14.296352]  ? trace_hardirqs_on+0x37/0xe0
[   14.296375]  ? __pfx_kasan_memcmp+0x10/0x10
[   14.296396]  ? finish_task_switch.isra.0+0x153/0x700
[   14.296418]  ? __switch_to+0x47/0xf50
[   14.296447]  ? __pfx_read_tsc+0x10/0x10
[   14.296468]  ? ktime_get_ts64+0x86/0x230
[   14.296492]  kunit_try_run_case+0x1a5/0x480
[   14.296517]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.296540]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.296563]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.296588]  ? __kthread_parkme+0x82/0x180
[   14.296609]  ? preempt_count_sub+0x50/0x80
[   14.296631]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.296656]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.296680]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.296705]  kthread+0x337/0x6f0
[   14.296724]  ? trace_preempt_on+0x20/0xc0
[   14.296745]  ? __pfx_kthread+0x10/0x10
[   14.296766]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.296787]  ? calculate_sigpending+0x7b/0xa0
[   14.296811]  ? __pfx_kthread+0x10/0x10
[   14.296832]  ret_from_fork+0x116/0x1d0
[   14.296850]  ? __pfx_kthread+0x10/0x10
[   14.296870]  ret_from_fork_asm+0x1a/0x30
[   14.296902]  </TASK>
[   14.296912] 
[   14.307443] Allocated by task 274:
[   14.307613]  kasan_save_stack+0x45/0x70
[   14.307878]  kasan_save_track+0x18/0x40
[   14.308205]  kasan_save_alloc_info+0x3b/0x50
[   14.308417]  __kasan_kmalloc+0xb7/0xc0
[   14.308605]  __kmalloc_cache_noprof+0x189/0x420
[   14.308788]  kasan_memcmp+0xb7/0x390
[   14.309068]  kunit_try_run_case+0x1a5/0x480
[   14.309246]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.309463]  kthread+0x337/0x6f0
[   14.309583]  ret_from_fork+0x116/0x1d0
[   14.309718]  ret_from_fork_asm+0x1a/0x30
[   14.309915] 
[   14.310023] The buggy address belongs to the object at ffff888103958080
[   14.310023]  which belongs to the cache kmalloc-32 of size 32
[   14.310568] The buggy address is located 0 bytes to the right of
[   14.310568]  allocated 24-byte region [ffff888103958080, ffff888103958098)
[   14.311097] 
[   14.311194] The buggy address belongs to the physical page:
[   14.311454] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103958
[   14.311811] flags: 0x200000000000000(node=0|zone=2)
[   14.312034] page_type: f5(slab)
[   14.312304] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.312563] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.312891] page dumped because: kasan: bad access detected
[   14.313218] 
[   14.313291] Memory state around the buggy address:
[   14.313447]  ffff888103957f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.313727]  ffff888103958000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.314002] >ffff888103958080: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.314366]                             ^
[   14.314554]  ffff888103958100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.314849]  ffff888103958180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.315273] ==================================================================