Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.011208] ==================================================================
[   33.011323] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   33.011441] Write of size 8 at addr fff00000c63f7271 by task kunit_try_catch/188
[   33.011549] 
[   33.011617] CPU: 1 UID: 0 PID: 188 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   33.011809] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.011869] Hardware name: linux,dummy-virt (DT)
[   33.011937] Call trace:
[   33.011991]  show_stack+0x20/0x38 (C)
[   33.012189]  dump_stack_lvl+0x8c/0xd0
[   33.012671]  print_report+0x118/0x608
[   33.012806]  kasan_report+0xdc/0x128
[   33.012937]  kasan_check_range+0x100/0x1a8
[   33.013084]  __asan_memset+0x34/0x78
[   33.014505]  kmalloc_oob_memset_8+0x150/0x2f8
[   33.015607]  kunit_try_run_case+0x170/0x3f0
[   33.016141]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.016377]  kthread+0x328/0x630
[   33.016539]  ret_from_fork+0x10/0x20
[   33.016939] 
[   33.016991] Allocated by task 188:
[   33.017089]  kasan_save_stack+0x3c/0x68
[   33.017191]  kasan_save_track+0x20/0x40
[   33.017285]  kasan_save_alloc_info+0x40/0x58
[   33.017922]  __kasan_kmalloc+0xd4/0xd8
[   33.018016]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.018210]  kmalloc_oob_memset_8+0xb0/0x2f8
[   33.018809]  kunit_try_run_case+0x170/0x3f0
[   33.019017]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.019336]  kthread+0x328/0x630
[   33.019418]  ret_from_fork+0x10/0x20
[   33.019503] 
[   33.019550] The buggy address belongs to the object at fff00000c63f7200
[   33.019550]  which belongs to the cache kmalloc-128 of size 128
[   33.019678] The buggy address is located 113 bytes inside of
[   33.019678]  allocated 120-byte region [fff00000c63f7200, fff00000c63f7278)
[   33.019821] 
[   33.020302] The buggy address belongs to the physical page:
[   33.020490] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063f7
[   33.021586] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.021992] page_type: f5(slab)
[   33.022241] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   33.022681] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   33.022842] page dumped because: kasan: bad access detected
[   33.023281] 
[   33.023355] Memory state around the buggy address:
[   33.023451]  fff00000c63f7100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.023630]  fff00000c63f7180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.024295] >fff00000c63f7200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   33.024438]                                                                 ^
[   33.024535]  fff00000c63f7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.024630]  fff00000c63f7300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.024716] ==================================================================

[   21.911353] ==================================================================
[   21.912301] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   21.912693] Write of size 8 at addr ffff8881023ac571 by task kunit_try_catch/205
[   21.913391] 
[   21.913868] CPU: 0 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   21.914028] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.914061] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.914099] Call Trace:
[   21.914128]  <TASK>
[   21.914156]  dump_stack_lvl+0x73/0xb0
[   21.914193]  print_report+0xd1/0x650
[   21.914212]  ? __virt_addr_valid+0x1db/0x2d0
[   21.914232]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.914250]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.914272]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.914290]  kasan_report+0x141/0x180
[   21.914308]  ? kmalloc_oob_memset_8+0x166/0x330
[   21.914331]  kasan_check_range+0x10c/0x1c0
[   21.914351]  __asan_memset+0x27/0x50
[   21.914370]  kmalloc_oob_memset_8+0x166/0x330
[   21.914409]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   21.914429]  ? __schedule+0x10cc/0x2b60
[   21.914448]  ? __pfx_read_tsc+0x10/0x10
[   21.914468]  ? ktime_get_ts64+0x86/0x230
[   21.914490]  kunit_try_run_case+0x1a5/0x480
[   21.914512]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.914531]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.914550]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.914569]  ? __kthread_parkme+0x82/0x180
[   21.914586]  ? preempt_count_sub+0x50/0x80
[   21.914606]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.914626]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.914646]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.914666]  kthread+0x337/0x6f0
[   21.914682]  ? trace_preempt_on+0x20/0xc0
[   21.914702]  ? __pfx_kthread+0x10/0x10
[   21.914719]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.914736]  ? calculate_sigpending+0x7b/0xa0
[   21.914756]  ? __pfx_kthread+0x10/0x10
[   21.914774]  ret_from_fork+0x116/0x1d0
[   21.914790]  ? __pfx_kthread+0x10/0x10
[   21.914807]  ret_from_fork_asm+0x1a/0x30
[   21.914853]  </TASK>
[   21.914867] 
[   21.924738] Allocated by task 205:
[   21.925485]  kasan_save_stack+0x45/0x70
[   21.925803]  kasan_save_track+0x18/0x40
[   21.926283]  kasan_save_alloc_info+0x3b/0x50
[   21.926600]  __kasan_kmalloc+0xb7/0xc0
[   21.926811]  __kmalloc_cache_noprof+0x189/0x420
[   21.927480]  kmalloc_oob_memset_8+0xac/0x330
[   21.927679]  kunit_try_run_case+0x1a5/0x480
[   21.927811]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.928309]  kthread+0x337/0x6f0
[   21.928475]  ret_from_fork+0x116/0x1d0
[   21.928823]  ret_from_fork_asm+0x1a/0x30
[   21.929153] 
[   21.929447] The buggy address belongs to the object at ffff8881023ac500
[   21.929447]  which belongs to the cache kmalloc-128 of size 128
[   21.930317] The buggy address is located 113 bytes inside of
[   21.930317]  allocated 120-byte region [ffff8881023ac500, ffff8881023ac578)
[   21.930749] 
[   21.931010] The buggy address belongs to the physical page:
[   21.931474] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023ac
[   21.931791] flags: 0x200000000000000(node=0|zone=2)
[   21.932220] page_type: f5(slab)
[   21.932596] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   21.932850] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.933755] page dumped because: kasan: bad access detected
[   21.934144] 
[   21.934247] Memory state around the buggy address:
[   21.934417]  ffff8881023ac400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.935187]  ffff8881023ac480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.935484] >ffff8881023ac500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.935762]                                                                 ^
[   21.936754]  ffff8881023ac580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.937113]  ffff8881023ac600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.937437] ==================================================================