Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.204606] ==================================================================
[   21.205621] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a8/0x400
[   21.206370] Write of size 16 at addr fff00000c662ad00 by task kunit_try_catch/154
[   21.207261] 
[   21.207630] CPU: 1 UID: 0 PID: 154 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   21.207845] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.207986] Hardware name: linux,dummy-virt (DT)
[   21.208079] Call trace:
[   21.208146]  dump_backtrace+0x9c/0x128
[   21.208260]  show_stack+0x20/0x38
[   21.208364]  dump_stack_lvl+0x8c/0xd0
[   21.208475]  print_report+0x118/0x5f0
[   21.208537]  kasan_report+0xdc/0x128
[   21.208584]  __asan_report_store16_noabort+0x20/0x30
[   21.208635]  kmalloc_oob_16+0x3a8/0x400
[   21.208680]  kunit_try_run_case+0x170/0x3f0
[   21.208726]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.208790]  kthread+0x24c/0x2d0
[   21.208837]  ret_from_fork+0x10/0x20
[   21.208885] 
[   21.214864] Allocated by task 154:
[   21.215431]  kasan_save_stack+0x3c/0x68
[   21.216080]  kasan_save_track+0x20/0x40
[   21.216507]  kasan_save_alloc_info+0x40/0x58
[   21.216998]  __kasan_kmalloc+0xd4/0xd8
[   21.217608]  __kmalloc_cache_noprof+0x154/0x320
[   21.218313]  kmalloc_oob_16+0xb4/0x400
[   21.218954]  kunit_try_run_case+0x170/0x3f0
[   21.219564]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.220313]  kthread+0x24c/0x2d0
[   21.220870]  ret_from_fork+0x10/0x20
[   21.221413] 
[   21.221754] The buggy address belongs to the object at fff00000c662ad00
[   21.221754]  which belongs to the cache kmalloc-16 of size 16
[   21.222926] The buggy address is located 0 bytes inside of
[   21.222926]  allocated 13-byte region [fff00000c662ad00, fff00000c662ad0d)
[   21.224133] 
[   21.224492] The buggy address belongs to the physical page:
[   21.225139] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10662a
[   21.225988] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.226754] page_type: f5(slab)
[   21.227214] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   21.227979] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
[   21.229009] page dumped because: kasan: bad access detected
[   21.229618] 
[   21.229996] Memory state around the buggy address:
[   21.230579]  fff00000c662ac00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   21.231256]  fff00000c662ac80: fa fb fc fc 00 04 fc fc 00 05 fc fc fa fb fc fc
[   21.232090] >fff00000c662ad00: 00 05 fc fc 00 00 fc fc fc fc fc fc fc fc fc fc
[   21.232869]                       ^
[   21.233405]  fff00000c662ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.234213]  fff00000c662ae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.234986] ==================================================================

[   17.488638] ==================================================================
[   17.489555] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x454/0x4a0
[   17.491159] Write of size 16 at addr ffff888101f801a0 by task kunit_try_catch/171
[   17.491696] 
[   17.493246] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N 6.12.33-rc1 #1
[   17.493344] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.493379] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.493440] Call Trace:
[   17.493480]  <TASK>
[   17.493582]  dump_stack_lvl+0x73/0xb0
[   17.493735]  print_report+0xd1/0x640
[   17.493821]  ? __virt_addr_valid+0x1db/0x2d0
[   17.494021]  ? kmalloc_oob_16+0x454/0x4a0
[   17.494055]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.494088]  ? kmalloc_oob_16+0x454/0x4a0
[   17.494118]  kasan_report+0x140/0x180
[   17.494152]  ? kmalloc_oob_16+0x454/0x4a0
[   17.494190]  __asan_report_store16_noabort+0x1b/0x30
[   17.494252]  kmalloc_oob_16+0x454/0x4a0
[   17.494287]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   17.494320]  ? __schedule+0xc49/0x27a0
[   17.494349]  ? __pfx_read_tsc+0x10/0x10
[   17.494376]  ? ktime_get_ts64+0x84/0x230
[   17.494412]  kunit_try_run_case+0x1a6/0x480
[   17.494452]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.494555]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   17.494600]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.494635]  ? __kthread_parkme+0x82/0x160
[   17.494663]  ? preempt_count_sub+0x50/0x80
[   17.494693]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.494720]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.494755]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.494791]  kthread+0x257/0x310
[   17.494846]  ? __pfx_kthread+0x10/0x10
[   17.494883]  ret_from_fork+0x41/0x80
[   17.494912]  ? __pfx_kthread+0x10/0x10
[   17.494936]  ret_from_fork_asm+0x1a/0x30
[   17.494978]  </TASK>
[   17.494992] 
[   17.513075] Allocated by task 171:
[   17.513878]  kasan_save_stack+0x45/0x70
[   17.514369]  kasan_save_track+0x18/0x40
[   17.515055]  kasan_save_alloc_info+0x3b/0x50
[   17.516369]  __kasan_kmalloc+0xb7/0xc0
[   17.516751]  __kmalloc_cache_noprof+0x168/0x350
[   17.517227]  kmalloc_oob_16+0xa9/0x4a0
[   17.517909]  kunit_try_run_case+0x1a6/0x480
[   17.518385]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.519184]  kthread+0x257/0x310
[   17.519601]  ret_from_fork+0x41/0x80
[   17.520717]  ret_from_fork_asm+0x1a/0x30
[   17.521305] 
[   17.521527] The buggy address belongs to the object at ffff888101f801a0
[   17.521527]  which belongs to the cache kmalloc-16 of size 16
[   17.523187] The buggy address is located 0 bytes inside of
[   17.523187]  allocated 13-byte region [ffff888101f801a0, ffff888101f801ad)
[   17.524784] 
[   17.525045] The buggy address belongs to the physical page:
[   17.525543] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101f80
[   17.526358] flags: 0x200000000000000(node=0|zone=2)
[   17.528181] page_type: f5(slab)
[   17.528947] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   17.529717] raw: 0000000000000000 0000000080800080 00000001f5000000 0000000000000000
[   17.530348] page dumped because: kasan: bad access detected
[   17.531269] 
[   17.531863] Memory state around the buggy address:
[   17.532605]  ffff888101f80080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   17.533305]  ffff888101f80100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   17.534052] >ffff888101f80180: fa fb fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   17.534809]                                   ^
[   17.535232]  ffff888101f80200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.535906]  ffff888101f80280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.536392] ==================================================================