Hay
Date
July 4, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.137116] ==================================================================
[   18.137181] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   18.137241] Write of size 16 at addr fff00000c638ee69 by task kunit_try_catch/178
[   18.137289] 
[   18.137326] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.137407] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.137433] Hardware name: linux,dummy-virt (DT)
[   18.137464] Call trace:
[   18.137541]  show_stack+0x20/0x38 (C)
[   18.137592]  dump_stack_lvl+0x8c/0xd0
[   18.137639]  print_report+0x118/0x608
[   18.137685]  kasan_report+0xdc/0x128
[   18.137736]  kasan_check_range+0x100/0x1a8
[   18.137783]  __asan_memset+0x34/0x78
[   18.137842]  kmalloc_oob_memset_16+0x150/0x2f8
[   18.137887]  kunit_try_run_case+0x170/0x3f0
[   18.137939]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.137990]  kthread+0x328/0x630
[   18.138032]  ret_from_fork+0x10/0x20
[   18.138079] 
[   18.138098] Allocated by task 178:
[   18.138242]  kasan_save_stack+0x3c/0x68
[   18.138291]  kasan_save_track+0x20/0x40
[   18.138328]  kasan_save_alloc_info+0x40/0x58
[   18.138554]  __kasan_kmalloc+0xd4/0xd8
[   18.138683]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.138724]  kmalloc_oob_memset_16+0xb0/0x2f8
[   18.138823]  kunit_try_run_case+0x170/0x3f0
[   18.138865]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.138953]  kthread+0x328/0x630
[   18.139033]  ret_from_fork+0x10/0x20
[   18.139145] 
[   18.139184] The buggy address belongs to the object at fff00000c638ee00
[   18.139184]  which belongs to the cache kmalloc-128 of size 128
[   18.139267] The buggy address is located 105 bytes inside of
[   18.139267]  allocated 120-byte region [fff00000c638ee00, fff00000c638ee78)
[   18.139369] 
[   18.139416] The buggy address belongs to the physical page:
[   18.139470] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10638e
[   18.139542] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.139650] page_type: f5(slab)
[   18.139696] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.139765] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.139814] page dumped because: kasan: bad access detected
[   18.139845] 
[   18.139868] Memory state around the buggy address:
[   18.139905]  fff00000c638ed00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.139946]  fff00000c638ed80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.140102] >fff00000c638ee00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.140140]                                                                 ^
[   18.140226]  fff00000c638ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.140324]  fff00000c638ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.140393] ==================================================================

[   12.081210] ==================================================================
[   12.081833] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   12.082090] Write of size 16 at addr ffff88810262fc69 by task kunit_try_catch/195
[   12.082741] 
[   12.082932] CPU: 0 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.082982] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.082994] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.083018] Call Trace:
[   12.083032]  <TASK>
[   12.083055]  dump_stack_lvl+0x73/0xb0
[   12.083109]  print_report+0xd1/0x650
[   12.083155]  ? __virt_addr_valid+0x1db/0x2d0
[   12.083180]  ? kmalloc_oob_memset_16+0x166/0x330
[   12.083231]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.083268]  ? kmalloc_oob_memset_16+0x166/0x330
[   12.083289]  kasan_report+0x141/0x180
[   12.083310]  ? kmalloc_oob_memset_16+0x166/0x330
[   12.083334]  kasan_check_range+0x10c/0x1c0
[   12.083357]  __asan_memset+0x27/0x50
[   12.083376]  kmalloc_oob_memset_16+0x166/0x330
[   12.083397]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   12.083418]  ? __schedule+0x10cc/0x2b60
[   12.083439]  ? __pfx_read_tsc+0x10/0x10
[   12.083460]  ? ktime_get_ts64+0x86/0x230
[   12.083484]  kunit_try_run_case+0x1a5/0x480
[   12.083510]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.083530]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.083553]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.083574]  ? __kthread_parkme+0x82/0x180
[   12.083596]  ? preempt_count_sub+0x50/0x80
[   12.083621]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.083643]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.083678]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.083699]  kthread+0x337/0x6f0
[   12.083718]  ? trace_preempt_on+0x20/0xc0
[   12.083740]  ? __pfx_kthread+0x10/0x10
[   12.083759]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.083778]  ? calculate_sigpending+0x7b/0xa0
[   12.083801]  ? __pfx_kthread+0x10/0x10
[   12.083820]  ret_from_fork+0x116/0x1d0
[   12.083838]  ? __pfx_kthread+0x10/0x10
[   12.083856]  ret_from_fork_asm+0x1a/0x30
[   12.083887]  </TASK>
[   12.083898] 
[   12.097541] Allocated by task 195:
[   12.097946]  kasan_save_stack+0x45/0x70
[   12.098377]  kasan_save_track+0x18/0x40
[   12.098589]  kasan_save_alloc_info+0x3b/0x50
[   12.098740]  __kasan_kmalloc+0xb7/0xc0
[   12.098870]  __kmalloc_cache_noprof+0x189/0x420
[   12.099024]  kmalloc_oob_memset_16+0xac/0x330
[   12.099173]  kunit_try_run_case+0x1a5/0x480
[   12.099380]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.099739]  kthread+0x337/0x6f0
[   12.099903]  ret_from_fork+0x116/0x1d0
[   12.100036]  ret_from_fork_asm+0x1a/0x30
[   12.100215] 
[   12.100323] The buggy address belongs to the object at ffff88810262fc00
[   12.100323]  which belongs to the cache kmalloc-128 of size 128
[   12.101276] The buggy address is located 105 bytes inside of
[   12.101276]  allocated 120-byte region [ffff88810262fc00, ffff88810262fc78)
[   12.101786] 
[   12.101881] The buggy address belongs to the physical page:
[   12.102098] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10262f
[   12.102926] flags: 0x200000000000000(node=0|zone=2)
[   12.103133] page_type: f5(slab)
[   12.103427] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.103971] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.104417] page dumped because: kasan: bad access detected
[   12.104722] 
[   12.104887] Memory state around the buggy address:
[   12.105237]  ffff88810262fb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.105620]  ffff88810262fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.106046] >ffff88810262fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.106364]                                                                 ^
[   12.106897]  ffff88810262fc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.107233]  ffff88810262fd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.107588] ==================================================================