Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.257124] ==================================================================
[   19.257259] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   19.257312] Write of size 16 at addr fff00000c564f2e0 by task kunit_try_catch/166
[   19.257361] 
[   19.257743] CPU: 1 UID: 0 PID: 166 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.257838] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.257881] Hardware name: linux,dummy-virt (DT)
[   19.258026] Call trace:
[   19.258276]  show_stack+0x20/0x38 (C)
[   19.258344]  dump_stack_lvl+0x8c/0xd0
[   19.258390]  print_report+0x118/0x608
[   19.258434]  kasan_report+0xdc/0x128
[   19.258482]  __asan_report_store16_noabort+0x20/0x30
[   19.258535]  kmalloc_oob_16+0x3a0/0x3f8
[   19.258577]  kunit_try_run_case+0x170/0x3f0
[   19.258623]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.259241]  kthread+0x328/0x630
[   19.259347]  ret_from_fork+0x10/0x20
[   19.259400] 
[   19.259418] Allocated by task 166:
[   19.259449]  kasan_save_stack+0x3c/0x68
[   19.259538]  kasan_save_track+0x20/0x40
[   19.259641]  kasan_save_alloc_info+0x40/0x58
[   19.259679]  __kasan_kmalloc+0xd4/0xd8
[   19.260024]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.260134]  kmalloc_oob_16+0xb4/0x3f8
[   19.260252]  kunit_try_run_case+0x170/0x3f0
[   19.260348]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.260492]  kthread+0x328/0x630
[   19.260544]  ret_from_fork+0x10/0x20
[   19.260794] 
[   19.260941] The buggy address belongs to the object at fff00000c564f2e0
[   19.260941]  which belongs to the cache kmalloc-16 of size 16
[   19.261368] The buggy address is located 0 bytes inside of
[   19.261368]  allocated 13-byte region [fff00000c564f2e0, fff00000c564f2ed)
[   19.261529] 
[   19.261551] The buggy address belongs to the physical page:
[   19.261617] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10564f
[   19.261823] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.262368] page_type: f5(slab)
[   19.262459] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.262565] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   19.262615] page dumped because: kasan: bad access detected
[   19.262655] 
[   19.262688] Memory state around the buggy address:
[   19.262731]  fff00000c564f180: 00 05 fc fc fa fb fc fc fa fb fc fc 00 02 fc fc
[   19.262772]  fff00000c564f200: fa fb fc fc fa fb fc fc 00 01 fc fc fa fb fc fc
[   19.262813] >fff00000c564f280: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   19.262850]                                                           ^
[   19.262887]  fff00000c564f300: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.262954]  fff00000c564f380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.262992] ==================================================================

[   12.879392] ==================================================================
[   12.880393] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.880632] Write of size 16 at addr ffff8881022bac60 by task kunit_try_catch/183
[   12.880862] 
[   12.880954] CPU: 0 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.880999] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.881010] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.881031] Call Trace:
[   12.881092]  <TASK>
[   12.881109]  dump_stack_lvl+0x73/0xb0
[   12.881140]  print_report+0xd1/0x650
[   12.881161]  ? __virt_addr_valid+0x1db/0x2d0
[   12.881185]  ? kmalloc_oob_16+0x452/0x4a0
[   12.881204]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.881229]  ? kmalloc_oob_16+0x452/0x4a0
[   12.881248]  kasan_report+0x141/0x180
[   12.881269]  ? kmalloc_oob_16+0x452/0x4a0
[   12.881293]  __asan_report_store16_noabort+0x1b/0x30
[   12.881316]  kmalloc_oob_16+0x452/0x4a0
[   12.881336]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.881404]  ? __pfx_read_tsc+0x10/0x10
[   12.881452]  ? ktime_get_ts64+0x86/0x230
[   12.881571]  kunit_try_run_case+0x1a5/0x480
[   12.881608]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.881629]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.881653]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.881674]  ? __kthread_parkme+0x82/0x180
[   12.881694]  ? preempt_count_sub+0x50/0x80
[   12.881717]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.881781]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.881827]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.881863]  kthread+0x337/0x6f0
[   12.881882]  ? trace_preempt_on+0x20/0xc0
[   12.881904]  ? __pfx_kthread+0x10/0x10
[   12.881923]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.881943]  ? calculate_sigpending+0x7b/0xa0
[   12.881966]  ? __pfx_kthread+0x10/0x10
[   12.881986]  ret_from_fork+0x116/0x1d0
[   12.882004]  ? __pfx_kthread+0x10/0x10
[   12.882023]  ret_from_fork_asm+0x1a/0x30
[   12.882077]  </TASK>
[   12.882089] 
[   12.892566] Allocated by task 183:
[   12.892700]  kasan_save_stack+0x45/0x70
[   12.892845]  kasan_save_track+0x18/0x40
[   12.892980]  kasan_save_alloc_info+0x3b/0x50
[   12.893752]  __kasan_kmalloc+0xb7/0xc0
[   12.894988]  __kmalloc_cache_noprof+0x189/0x420
[   12.895742]  kmalloc_oob_16+0xa8/0x4a0
[   12.896381]  kunit_try_run_case+0x1a5/0x480
[   12.897067]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.897838]  kthread+0x337/0x6f0
[   12.898428]  ret_from_fork+0x116/0x1d0
[   12.899200]  ret_from_fork_asm+0x1a/0x30
[   12.899721] 
[   12.900020] The buggy address belongs to the object at ffff8881022bac60
[   12.900020]  which belongs to the cache kmalloc-16 of size 16
[   12.901811] The buggy address is located 0 bytes inside of
[   12.901811]  allocated 13-byte region [ffff8881022bac60, ffff8881022bac6d)
[   12.903414] 
[   12.903804] The buggy address belongs to the physical page:
[   12.904635] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1022ba
[   12.905715] flags: 0x200000000000000(node=0|zone=2)
[   12.906553] page_type: f5(slab)
[   12.907001] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.908058] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.908679] page dumped because: kasan: bad access detected
[   12.909456] 
[   12.909817] Memory state around the buggy address:
[   12.910032]  ffff8881022bab00: 00 02 fc fc 00 02 fc fc 00 06 fc fc 00 06 fc fc
[   12.911153]  ffff8881022bab80: 00 04 fc fc 00 04 fc fc 00 01 fc fc 00 01 fc fc
[   12.911408] >ffff8881022bac00: 00 04 fc fc 00 04 fc fc fa fb fc fc 00 05 fc fc
[   12.911921]                                                           ^
[   12.912837]  ffff8881022bac80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.913989]  ffff8881022bad00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.914812] ==================================================================