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

Environment
qemu-arm64

[   16.924859] ==================================================================
[   16.925286] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   16.925580] Write of size 16 at addr fff00000c748aa69 by task kunit_try_catch/187
[   16.925665] 
[   16.925745] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT 
[   16.925893] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.925951] Hardware name: linux,dummy-virt (DT)
[   16.925986] Call trace:
[   16.926054]  show_stack+0x20/0x38 (C)
[   16.926145]  dump_stack_lvl+0x8c/0xd0
[   16.926261]  print_report+0x118/0x608
[   16.926338]  kasan_report+0xdc/0x128
[   16.926455]  kasan_check_range+0x100/0x1a8
[   16.926505]  __asan_memset+0x34/0x78
[   16.926797]  kmalloc_oob_memset_16+0x150/0x2f8
[   16.927003]  kunit_try_run_case+0x170/0x3f0
[   16.927100]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.927559]  kthread+0x328/0x630
[   16.927643]  ret_from_fork+0x10/0x20
[   16.927870] 
[   16.927944] Allocated by task 187:
[   16.928075]  kasan_save_stack+0x3c/0x68
[   16.928123]  kasan_save_track+0x20/0x40
[   16.928181]  kasan_save_alloc_info+0x40/0x58
[   16.928220]  __kasan_kmalloc+0xd4/0xd8
[   16.928268]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.928313]  kmalloc_oob_memset_16+0xb0/0x2f8
[   16.928352]  kunit_try_run_case+0x170/0x3f0
[   16.928401]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.928454]  kthread+0x328/0x630
[   16.928494]  ret_from_fork+0x10/0x20
[   16.928541] 
[   16.928578] The buggy address belongs to the object at fff00000c748aa00
[   16.928578]  which belongs to the cache kmalloc-128 of size 128
[   16.928637] The buggy address is located 105 bytes inside of
[   16.928637]  allocated 120-byte region [fff00000c748aa00, fff00000c748aa78)
[   16.928708] 
[   16.928736] The buggy address belongs to the physical page:
[   16.928769] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10748a
[   16.928828] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.928889] page_type: f5(slab)
[   16.928940] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.928989] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.929028] page dumped because: kasan: bad access detected
[   16.929335] 
[   16.929362] Memory state around the buggy address:
[   16.929403]  fff00000c748a900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.929447]  fff00000c748a980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.929502] >fff00000c748aa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.929552]                                                                 ^
[   16.929599]  fff00000c748aa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.929643]  fff00000c748ab00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.929694] ==================================================================