Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.471593] ==================================================================
[   15.471859] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   15.471911] Write of size 16 at addr fff00000c591d560 by task kunit_try_catch/167
[   15.471967] 
[   15.472062] CPU: 1 UID: 0 PID: 167 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.472224] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.472249] Hardware name: linux,dummy-virt (DT)
[   15.472279] Call trace:
[   15.472299]  show_stack+0x20/0x38 (C)
[   15.472346]  dump_stack_lvl+0x8c/0xd0
[   15.472392]  print_report+0x118/0x5d0
[   15.472436]  kasan_report+0xdc/0x128
[   15.472603]  __asan_report_store16_noabort+0x20/0x30
[   15.473011]  kmalloc_oob_16+0x3a0/0x3f8
[   15.473171]  kunit_try_run_case+0x170/0x3f0
[   15.473232]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.473303]  kthread+0x328/0x630
[   15.473344]  ret_from_fork+0x10/0x20
[   15.473390] 
[   15.473407] Allocated by task 167:
[   15.473435]  kasan_save_stack+0x3c/0x68
[   15.473475]  kasan_save_track+0x20/0x40
[   15.473511]  kasan_save_alloc_info+0x40/0x58
[   15.473656]  __kasan_kmalloc+0xd4/0xd8
[   15.473697]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.473734]  kmalloc_oob_16+0xb4/0x3f8
[   15.473768]  kunit_try_run_case+0x170/0x3f0
[   15.473803]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.473845]  kthread+0x328/0x630
[   15.473998]  ret_from_fork+0x10/0x20
[   15.474091] 
[   15.474109] The buggy address belongs to the object at fff00000c591d560
[   15.474109]  which belongs to the cache kmalloc-16 of size 16
[   15.474172] The buggy address is located 0 bytes inside of
[   15.474172]  allocated 13-byte region [fff00000c591d560, fff00000c591d56d)
[   15.474246] 
[   15.474264] The buggy address belongs to the physical page:
[   15.474293] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10591d
[   15.474457] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.474527] page_type: f5(slab)
[   15.474678] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   15.474763] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   15.474820] page dumped because: kasan: bad access detected
[   15.474869] 
[   15.474887] Memory state around the buggy address:
[   15.474917]  fff00000c591d400: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.474959]  fff00000c591d480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   15.475086] >fff00000c591d500: fa fb fc fc fa fb fc fc fa fb fc fc 00 05 fc fc
[   15.475192]                                                           ^
[   15.475231]  fff00000c591d580: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.475283]  fff00000c591d600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.475441] ==================================================================

[   12.498226] ==================================================================
[   12.498807] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   12.499120] Write of size 16 at addr ffff8881025148a0 by task kunit_try_catch/183
[   12.499455] 
[   12.499554] CPU: 1 UID: 0 PID: 183 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.499598] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.499609] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.499629] Call Trace:
[   12.499641]  <TASK>
[   12.499656]  dump_stack_lvl+0x73/0xb0
[   12.499687]  print_report+0xd1/0x610
[   12.499708]  ? __virt_addr_valid+0x1db/0x2d0
[   12.499734]  ? kmalloc_oob_16+0x452/0x4a0
[   12.499767]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.499792]  ? kmalloc_oob_16+0x452/0x4a0
[   12.499813]  kasan_report+0x141/0x180
[   12.499835]  ? kmalloc_oob_16+0x452/0x4a0
[   12.499861]  __asan_report_store16_noabort+0x1b/0x30
[   12.499887]  kmalloc_oob_16+0x452/0x4a0
[   12.499908]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   12.499931]  ? __schedule+0x10cc/0x2b60
[   12.499953]  ? __pfx_read_tsc+0x10/0x10
[   12.499974]  ? ktime_get_ts64+0x86/0x230
[   12.499999]  kunit_try_run_case+0x1a5/0x480
[   12.500024]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.500047]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.500072]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.500096]  ? __kthread_parkme+0x82/0x180
[   12.500117]  ? preempt_count_sub+0x50/0x80
[   12.500140]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.500165]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.500189]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.500215]  kthread+0x337/0x6f0
[   12.500234]  ? trace_preempt_on+0x20/0xc0
[   12.500257]  ? __pfx_kthread+0x10/0x10
[   12.500278]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.500299]  ? calculate_sigpending+0x7b/0xa0
[   12.500324]  ? __pfx_kthread+0x10/0x10
[   12.500346]  ret_from_fork+0x116/0x1d0
[   12.500364]  ? __pfx_kthread+0x10/0x10
[   12.500386]  ret_from_fork_asm+0x1a/0x30
[   12.500417]  </TASK>
[   12.500427] 
[   12.508123] Allocated by task 183:
[   12.508262]  kasan_save_stack+0x45/0x70
[   12.508415]  kasan_save_track+0x18/0x40
[   12.508799]  kasan_save_alloc_info+0x3b/0x50
[   12.509023]  __kasan_kmalloc+0xb7/0xc0
[   12.509211]  __kmalloc_cache_noprof+0x189/0x420
[   12.509566]  kmalloc_oob_16+0xa8/0x4a0
[   12.509706]  kunit_try_run_case+0x1a5/0x480
[   12.509867]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.510123]  kthread+0x337/0x6f0
[   12.510291]  ret_from_fork+0x116/0x1d0
[   12.510613]  ret_from_fork_asm+0x1a/0x30
[   12.510814] 
[   12.510902] The buggy address belongs to the object at ffff8881025148a0
[   12.510902]  which belongs to the cache kmalloc-16 of size 16
[   12.511279] The buggy address is located 0 bytes inside of
[   12.511279]  allocated 13-byte region [ffff8881025148a0, ffff8881025148ad)
[   12.512274] 
[   12.512547] The buggy address belongs to the physical page:
[   12.512773] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102514
[   12.513065] flags: 0x200000000000000(node=0|zone=2)
[   12.513232] page_type: f5(slab)
[   12.513428] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   12.513802] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   12.514136] page dumped because: kasan: bad access detected
[   12.514407] 
[   12.514530] Memory state around the buggy address:
[   12.514689]  ffff888102514780: fa fb fc fc 00 02 fc fc 00 05 fc fc 00 02 fc fc
[   12.514985]  ffff888102514800: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 05 fc fc
[   12.515308] >ffff888102514880: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   12.515802]                                   ^
[   12.515981]  ffff888102514900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.516279]  ffff888102514980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.516715] ==================================================================