Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.823647] ==================================================================
[   32.823775] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   32.823892] Write of size 16 at addr fff00000c56f12a0 by task kunit_try_catch/178
[   32.824012] 
[   32.824101] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   32.824289] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.824348] Hardware name: linux,dummy-virt (DT)
[   32.824417] Call trace:
[   32.825341]  show_stack+0x20/0x38 (C)
[   32.825571]  dump_stack_lvl+0x8c/0xd0
[   32.826660]  print_report+0x118/0x608
[   32.826728]  kasan_report+0xdc/0x128
[   32.826831]  __asan_report_store16_noabort+0x20/0x30
[   32.826964]  kmalloc_oob_16+0x3a0/0x3f8
[   32.827388]  kunit_try_run_case+0x170/0x3f0
[   32.827526]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.827828]  kthread+0x328/0x630
[   32.828002]  ret_from_fork+0x10/0x20
[   32.828205] 
[   32.828338] Allocated by task 178:
[   32.828614]  kasan_save_stack+0x3c/0x68
[   32.828718]  kasan_save_track+0x20/0x40
[   32.829430]  kasan_save_alloc_info+0x40/0x58
[   32.829528]  __kasan_kmalloc+0xd4/0xd8
[   32.830153]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.830289]  kmalloc_oob_16+0xb4/0x3f8
[   32.830699]  kunit_try_run_case+0x170/0x3f0
[   32.831152]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.831737]  kthread+0x328/0x630
[   32.831870]  ret_from_fork+0x10/0x20
[   32.832185] 
[   32.832235] The buggy address belongs to the object at fff00000c56f12a0
[   32.832235]  which belongs to the cache kmalloc-16 of size 16
[   32.832360] The buggy address is located 0 bytes inside of
[   32.832360]  allocated 13-byte region [fff00000c56f12a0, fff00000c56f12ad)
[   32.833536] 
[   32.833597] The buggy address belongs to the physical page:
[   32.833664] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056f1
[   32.833781] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.833889] page_type: f5(slab)
[   32.833976] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122
[   32.834107] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   32.834198] page dumped because: kasan: bad access detected
[   32.834268] 
[   32.834312] Memory state around the buggy address:
[   32.834381]  fff00000c56f1180: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   32.834476]  fff00000c56f1200: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   32.835649] >fff00000c56f1280: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   32.835732]                                   ^
[   32.835814]  fff00000c56f1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.835941]  fff00000c56f1380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.836080] ==================================================================

[   21.742418] ==================================================================
[   21.742867] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   21.743395] Write of size 16 at addr ffff888102370280 by task kunit_try_catch/195
[   21.743750] 
[   21.744173] CPU: 0 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   21.744261] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.744283] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.744315] Call Trace:
[   21.744339]  <TASK>
[   21.744364]  dump_stack_lvl+0x73/0xb0
[   21.744439]  print_report+0xd1/0x650
[   21.744477]  ? __virt_addr_valid+0x1db/0x2d0
[   21.744533]  ? kmalloc_oob_16+0x452/0x4a0
[   21.744570]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.744614]  ? kmalloc_oob_16+0x452/0x4a0
[   21.744652]  kasan_report+0x141/0x180
[   21.744691]  ? kmalloc_oob_16+0x452/0x4a0
[   21.744736]  __asan_report_store16_noabort+0x1b/0x30
[   21.744773]  kmalloc_oob_16+0x452/0x4a0
[   21.744800]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   21.744825]  ? __schedule+0x10cc/0x2b60
[   21.744872]  ? __pfx_read_tsc+0x10/0x10
[   21.744892]  ? ktime_get_ts64+0x86/0x230
[   21.744914]  kunit_try_run_case+0x1a5/0x480
[   21.744936]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.744955]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.744974]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.744993]  ? __kthread_parkme+0x82/0x180
[   21.745010]  ? preempt_count_sub+0x50/0x80
[   21.745031]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.745051]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.745074]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.745131]  kthread+0x337/0x6f0
[   21.745162]  ? trace_preempt_on+0x20/0xc0
[   21.745195]  ? __pfx_kthread+0x10/0x10
[   21.745214]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.745232]  ? calculate_sigpending+0x7b/0xa0
[   21.745252]  ? __pfx_kthread+0x10/0x10
[   21.745270]  ret_from_fork+0x116/0x1d0
[   21.745286]  ? __pfx_kthread+0x10/0x10
[   21.745303]  ret_from_fork_asm+0x1a/0x30
[   21.745330]  </TASK>
[   21.745340] 
[   21.755694] Allocated by task 195:
[   21.755967]  kasan_save_stack+0x45/0x70
[   21.756273]  kasan_save_track+0x18/0x40
[   21.756628]  kasan_save_alloc_info+0x3b/0x50
[   21.756998]  __kasan_kmalloc+0xb7/0xc0
[   21.757705]  __kmalloc_cache_noprof+0x189/0x420
[   21.758090]  kmalloc_oob_16+0xa8/0x4a0
[   21.758403]  kunit_try_run_case+0x1a5/0x480
[   21.758867]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.759516]  kthread+0x337/0x6f0
[   21.759740]  ret_from_fork+0x116/0x1d0
[   21.759935]  ret_from_fork_asm+0x1a/0x30
[   21.760452] 
[   21.760612] The buggy address belongs to the object at ffff888102370280
[   21.760612]  which belongs to the cache kmalloc-16 of size 16
[   21.761687] The buggy address is located 0 bytes inside of
[   21.761687]  allocated 13-byte region [ffff888102370280, ffff88810237028d)
[   21.762553] 
[   21.762792] The buggy address belongs to the physical page:
[   21.763340] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102370
[   21.763788] flags: 0x200000000000000(node=0|zone=2)
[   21.764062] page_type: f5(slab)
[   21.764312] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   21.764678] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   21.764930] page dumped because: kasan: bad access detected
[   21.765285] 
[   21.765819] Memory state around the buggy address:
[   21.766414]  ffff888102370180: 00 05 fc fc 00 00 fc fc 00 06 fc fc 00 06 fc fc
[   21.766976]  ffff888102370200: 00 00 fc fc fa fb fc fc 00 04 fc fc fa fb fc fc
[   21.767706] >ffff888102370280: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   21.768290]                       ^
[   21.768442]  ffff888102370300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.768993]  ffff888102370380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.769619] ==================================================================