Hay
Date
June 17, 2025, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.816682] ==================================================================
[   16.816753] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   16.817010] Write of size 16 at addr fff00000c1193660 by task kunit_try_catch/175
[   16.817089] 
[   16.817135] CPU: 1 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT 
[   16.817298] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.817327] Hardware name: linux,dummy-virt (DT)
[   16.817359] Call trace:
[   16.817399]  show_stack+0x20/0x38 (C)
[   16.817631]  dump_stack_lvl+0x8c/0xd0
[   16.817802]  print_report+0x118/0x608
[   16.817857]  kasan_report+0xdc/0x128
[   16.817911]  __asan_report_store16_noabort+0x20/0x30
[   16.817970]  kmalloc_oob_16+0x3a0/0x3f8
[   16.818015]  kunit_try_run_case+0x170/0x3f0
[   16.818177]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.818427]  kthread+0x328/0x630
[   16.818578]  ret_from_fork+0x10/0x20
[   16.818744] 
[   16.818794] Allocated by task 175:
[   16.818861]  kasan_save_stack+0x3c/0x68
[   16.819028]  kasan_save_track+0x20/0x40
[   16.819105]  kasan_save_alloc_info+0x40/0x58
[   16.819149]  __kasan_kmalloc+0xd4/0xd8
[   16.819192]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.819232]  kmalloc_oob_16+0xb4/0x3f8
[   16.819267]  kunit_try_run_case+0x170/0x3f0
[   16.819304]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.819405]  kthread+0x328/0x630
[   16.819460]  ret_from_fork+0x10/0x20
[   16.819495] 
[   16.819514] The buggy address belongs to the object at fff00000c1193660
[   16.819514]  which belongs to the cache kmalloc-16 of size 16
[   16.819581] The buggy address is located 0 bytes inside of
[   16.819581]  allocated 13-byte region [fff00000c1193660, fff00000c119366d)
[   16.819647] 
[   16.819678] The buggy address belongs to the physical page:
[   16.819718] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101193
[   16.819773] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.819832] page_type: f5(slab)
[   16.819881] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122
[   16.820184] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   16.820402] page dumped because: kasan: bad access detected
[   16.820475] 
[   16.820599] Memory state around the buggy address:
[   16.820644]  fff00000c1193500: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc
[   16.820689]  fff00000c1193580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   16.820774] >fff00000c1193600: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   16.821018]                                                           ^
[   16.821095]  fff00000c1193680: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.821307]  fff00000c1193700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.821607] ==================================================================

[   17.880803] ==================================================================
[   17.881633] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   17.882509] Write of size 16 at addr ffff8881022644e0 by task kunit_try_catch/193
[   17.883180] 
[   17.883607] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) 
[   17.883742] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.883780] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.883895] Call Trace:
[   17.883942]  <TASK>
[   17.883993]  dump_stack_lvl+0x73/0xb0
[   17.884085]  print_report+0xd1/0x650
[   17.884157]  ? __virt_addr_valid+0x1db/0x2d0
[   17.884683]  ? kmalloc_oob_16+0x452/0x4a0
[   17.884755]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.884824]  ? kmalloc_oob_16+0x452/0x4a0
[   17.884888]  kasan_report+0x141/0x180
[   17.884922]  ? kmalloc_oob_16+0x452/0x4a0
[   17.884959]  __asan_report_store16_noabort+0x1b/0x30
[   17.884995]  kmalloc_oob_16+0x452/0x4a0
[   17.885024]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   17.885055]  ? __schedule+0x10cc/0x2b60
[   17.885085]  ? irqentry_exit+0x2a/0x60
[   17.885114]  ? __pfx_read_tsc+0x10/0x10
[   17.885145]  ? ktime_get_ts64+0x86/0x230
[   17.885179]  kunit_try_run_case+0x1a5/0x480
[   17.885227]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   17.885299]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.885396]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.885442]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.885477]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.885510]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.885543]  kthread+0x337/0x6f0
[   17.885573]  ? trace_preempt_on+0x20/0xc0
[   17.885607]  ? __pfx_kthread+0x10/0x10
[   17.885636]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.885670]  ? calculate_sigpending+0x7b/0xa0
[   17.885705]  ? __pfx_kthread+0x10/0x10
[   17.885735]  ret_from_fork+0x116/0x1d0
[   17.885760]  ? __pfx_kthread+0x10/0x10
[   17.885788]  ret_from_fork_asm+0x1a/0x30
[   17.885850]  </TASK>
[   17.885872] 
[   17.901048] Allocated by task 193:
[   17.901569]  kasan_save_stack+0x45/0x70
[   17.901982]  kasan_save_track+0x18/0x40
[   17.902742]  kasan_save_alloc_info+0x3b/0x50
[   17.903208]  __kasan_kmalloc+0xb7/0xc0
[   17.903857]  __kmalloc_cache_noprof+0x189/0x420
[   17.904463]  kmalloc_oob_16+0xa8/0x4a0
[   17.904858]  kunit_try_run_case+0x1a5/0x480
[   17.905420]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.905772]  kthread+0x337/0x6f0
[   17.906161]  ret_from_fork+0x116/0x1d0
[   17.906983]  ret_from_fork_asm+0x1a/0x30
[   17.907589] 
[   17.907819] The buggy address belongs to the object at ffff8881022644e0
[   17.907819]  which belongs to the cache kmalloc-16 of size 16
[   17.908805] The buggy address is located 0 bytes inside of
[   17.908805]  allocated 13-byte region [ffff8881022644e0, ffff8881022644ed)
[   17.909771] 
[   17.910026] The buggy address belongs to the physical page:
[   17.911002] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102264
[   17.911876] flags: 0x200000000000000(node=0|zone=2)
[   17.912486] page_type: f5(slab)
[   17.912852] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   17.913709] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   17.914166] page dumped because: kasan: bad access detected
[   17.915074] 
[   17.915712] Memory state around the buggy address:
[   17.916161]  ffff888102264380: 00 06 fc fc 00 06 fc fc 00 06 fc fc fa fb fc fc
[   17.916864]  ffff888102264400: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   17.917756] >ffff888102264480: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   17.918728]                                                           ^
[   17.919448]  ffff888102264500: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.920134]  ffff888102264580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.920829] ==================================================================