Hay
Date
June 2, 2025, 2:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.885950] ==================================================================
[   18.887141] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   18.887846] Write of size 16 at addr fff00000c65b6069 by task kunit_try_catch/168
[   18.889017] 
[   18.889431] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   18.889622] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.889699] Hardware name: linux,dummy-virt (DT)
[   18.889744] Call trace:
[   18.889790]  show_stack+0x20/0x38 (C)
[   18.889857]  dump_stack_lvl+0x8c/0xd0
[   18.889911]  print_report+0x118/0x608
[   18.889963]  kasan_report+0xdc/0x128
[   18.890012]  kasan_check_range+0x100/0x1a8
[   18.890068]  __asan_memset+0x34/0x78
[   18.890163]  kmalloc_oob_memset_16+0x150/0x2f8
[   18.890258]  kunit_try_run_case+0x170/0x3f0
[   18.890357]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.890603]  kthread+0x318/0x620
[   18.890664]  ret_from_fork+0x10/0x20
[   18.890723] 
[   18.895841] Allocated by task 168:
[   18.896067]  kasan_save_stack+0x3c/0x68
[   18.896336]  kasan_save_track+0x20/0x40
[   18.896671]  kasan_save_alloc_info+0x40/0x58
[   18.897997]  __kasan_kmalloc+0xd4/0xd8
[   18.898542]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.899252]  kmalloc_oob_memset_16+0xb0/0x2f8
[   18.899908]  kunit_try_run_case+0x170/0x3f0
[   18.900212]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.900913]  kthread+0x318/0x620
[   18.901460]  ret_from_fork+0x10/0x20
[   18.901771] 
[   18.901991] The buggy address belongs to the object at fff00000c65b6000
[   18.901991]  which belongs to the cache kmalloc-128 of size 128
[   18.902769] The buggy address is located 105 bytes inside of
[   18.902769]  allocated 120-byte region [fff00000c65b6000, fff00000c65b6078)
[   18.903388] 
[   18.903583] The buggy address belongs to the physical page:
[   18.903887] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065b6
[   18.905849] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.906939] page_type: f5(slab)
[   18.907248] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.907610] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.907951] page dumped because: kasan: bad access detected
[   18.911315] 
[   18.911950] Memory state around the buggy address:
[   18.913291]  fff00000c65b5f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.915009]  fff00000c65b5f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.915539] >fff00000c65b6000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.916020]                                                                 ^
[   18.917135]  fff00000c65b6080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.917813]  fff00000c65b6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.918531] ==================================================================

[   12.862263] ==================================================================
[   12.862790] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x167/0x330
[   12.863302] Write of size 16 at addr ffff888101bd1b69 by task kunit_try_catch/186
[   12.863788] 
[   12.863990] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   12.864045] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.864057] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.864076] Call Trace:
[   12.864088]  <TASK>
[   12.864103]  dump_stack_lvl+0x73/0xb0
[   12.864128]  print_report+0xd1/0x650
[   12.864149]  ? __virt_addr_valid+0x1db/0x2d0
[   12.864254]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.864334]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.864360]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.864381]  kasan_report+0x140/0x180
[   12.864402]  ? kmalloc_oob_memset_16+0x167/0x330
[   12.864427]  kasan_check_range+0x10c/0x1c0
[   12.864449]  __asan_memset+0x27/0x50
[   12.864471]  kmalloc_oob_memset_16+0x167/0x330
[   12.864492]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   12.864513]  ? __schedule+0xce8/0x2840
[   12.864535]  ? __pfx_read_tsc+0x10/0x10
[   12.864557]  ? ktime_get_ts64+0x86/0x230
[   12.864581]  kunit_try_run_case+0x1a6/0x480
[   12.864603]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.864624]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.864646]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.864669]  ? __kthread_parkme+0x82/0x160
[   12.864690]  ? preempt_count_sub+0x50/0x80
[   12.864714]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.864736]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.864761]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.864786]  kthread+0x324/0x6e0
[   12.864807]  ? trace_preempt_on+0x20/0xc0
[   12.864829]  ? __pfx_kthread+0x10/0x10
[   12.864850]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.864872]  ? calculate_sigpending+0x7b/0xa0
[   12.864893]  ? __pfx_kthread+0x10/0x10
[   12.864915]  ret_from_fork+0x41/0x80
[   12.864933]  ? __pfx_kthread+0x10/0x10
[   12.864954]  ret_from_fork_asm+0x1a/0x30
[   12.864985]  </TASK>
[   12.864995] 
[   12.871737] Allocated by task 186:
[   12.871864]  kasan_save_stack+0x45/0x70
[   12.872003]  kasan_save_track+0x18/0x40
[   12.872144]  kasan_save_alloc_info+0x3b/0x50
[   12.872283]  __kasan_kmalloc+0xb7/0xc0
[   12.872458]  __kmalloc_cache_noprof+0x18a/0x420
[   12.872883]  kmalloc_oob_memset_16+0xad/0x330
[   12.873113]  kunit_try_run_case+0x1a6/0x480
[   12.873324]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.873600]  kthread+0x324/0x6e0
[   12.874000]  ret_from_fork+0x41/0x80
[   12.874205]  ret_from_fork_asm+0x1a/0x30
[   12.874425] 
[   12.874522] The buggy address belongs to the object at ffff888101bd1b00
[   12.874522]  which belongs to the cache kmalloc-128 of size 128
[   12.875110] The buggy address is located 105 bytes inside of
[   12.875110]  allocated 120-byte region [ffff888101bd1b00, ffff888101bd1b78)
[   12.875652] 
[   12.875750] The buggy address belongs to the physical page:
[   12.875995] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101bd1
[   12.876331] flags: 0x200000000000000(node=0|zone=2)
[   12.876513] page_type: f5(slab)
[   12.876669] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.877055] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.877270] page dumped because: kasan: bad access detected
[   12.877664] 
[   12.877776] Memory state around the buggy address:
[   12.877992]  ffff888101bd1a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.878315]  ffff888101bd1a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.878706] >ffff888101bd1b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.879278]                                                                 ^
[   12.879551]  ffff888101bd1b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.879781]  ffff888101bd1c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.881636] ==================================================================