Hay
Date
July 16, 2025, 12:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.676810] ==================================================================
[   30.676874] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   30.676928] Write of size 16 at addr fff00000c6361d69 by task kunit_try_catch/209
[   30.677448] 
[   30.677619] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   30.677717] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.677743] Hardware name: linux,dummy-virt (DT)
[   30.678214] Call trace:
[   30.678256]  show_stack+0x20/0x38 (C)
[   30.678390]  dump_stack_lvl+0x8c/0xd0
[   30.678575]  print_report+0x118/0x5d0
[   30.678638]  kasan_report+0xdc/0x128
[   30.678890]  kasan_check_range+0x100/0x1a8
[   30.678956]  __asan_memset+0x34/0x78
[   30.679000]  kmalloc_oob_memset_16+0x150/0x2f8
[   30.679204]  kunit_try_run_case+0x170/0x3f0
[   30.679257]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.679311]  kthread+0x328/0x630
[   30.679355]  ret_from_fork+0x10/0x20
[   30.679403] 
[   30.679421] Allocated by task 209:
[   30.679800]  kasan_save_stack+0x3c/0x68
[   30.679928]  kasan_save_track+0x20/0x40
[   30.680101]  kasan_save_alloc_info+0x40/0x58
[   30.680143]  __kasan_kmalloc+0xd4/0xd8
[   30.680187]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.680606]  kmalloc_oob_memset_16+0xb0/0x2f8
[   30.680659]  kunit_try_run_case+0x170/0x3f0
[   30.680947]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.681055]  kthread+0x328/0x630
[   30.681094]  ret_from_fork+0x10/0x20
[   30.681130] 
[   30.681171] The buggy address belongs to the object at fff00000c6361d00
[   30.681171]  which belongs to the cache kmalloc-128 of size 128
[   30.681255] The buggy address is located 105 bytes inside of
[   30.681255]  allocated 120-byte region [fff00000c6361d00, fff00000c6361d78)
[   30.681337] 
[   30.681366] The buggy address belongs to the physical page:
[   30.681413] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106361
[   30.681493] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.681936] page_type: f5(slab)
[   30.681977] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   30.682045] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.683048] page dumped because: kasan: bad access detected
[   30.684271] 
[   30.684618] Memory state around the buggy address:
[   30.684715]  fff00000c6361c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.686007]  fff00000c6361c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.686114] >fff00000c6361d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.686208]                                                                 ^
[   30.686279]  fff00000c6361d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.687563]  fff00000c6361e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.687613] ==================================================================

[   23.423813] ==================================================================
[   23.424289] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   23.424666] Write of size 16 at addr ffff88810539fb69 by task kunit_try_catch/227
[   23.425011] 
[   23.425103] CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   23.425152] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.425164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.425185] Call Trace:
[   23.425197]  <TASK>
[   23.425223]  dump_stack_lvl+0x73/0xb0
[   23.425263]  print_report+0xd1/0x610
[   23.425312]  ? __virt_addr_valid+0x1db/0x2d0
[   23.425335]  ? kmalloc_oob_memset_16+0x166/0x330
[   23.425355]  ? kasan_complete_mode_report_info+0x2a/0x200
[   23.425380]  ? kmalloc_oob_memset_16+0x166/0x330
[   23.425401]  kasan_report+0x141/0x180
[   23.425422]  ? kmalloc_oob_memset_16+0x166/0x330
[   23.425457]  kasan_check_range+0x10c/0x1c0
[   23.425480]  __asan_memset+0x27/0x50
[   23.425503]  kmalloc_oob_memset_16+0x166/0x330
[   23.425536]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   23.425565]  ? __schedule+0x10c6/0x2b60
[   23.425589]  ? __pfx_read_tsc+0x10/0x10
[   23.425611]  ? ktime_get_ts64+0x86/0x230
[   23.425637]  kunit_try_run_case+0x1a5/0x480
[   23.425661]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.425682]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.425723]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.425745]  ? __kthread_parkme+0x82/0x180
[   23.425765]  ? preempt_count_sub+0x50/0x80
[   23.425787]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.425822]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.425849]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.425875]  kthread+0x337/0x6f0
[   23.425894]  ? trace_preempt_on+0x20/0xc0
[   23.425918]  ? __pfx_kthread+0x10/0x10
[   23.425937]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.425958]  ? calculate_sigpending+0x7b/0xa0
[   23.425981]  ? __pfx_kthread+0x10/0x10
[   23.426002]  ret_from_fork+0x116/0x1d0
[   23.426020]  ? __pfx_kthread+0x10/0x10
[   23.426040]  ret_from_fork_asm+0x1a/0x30
[   23.426070]  </TASK>
[   23.426081] 
[   23.433726] Allocated by task 227:
[   23.433908]  kasan_save_stack+0x45/0x70
[   23.434229]  kasan_save_track+0x18/0x40
[   23.434457]  kasan_save_alloc_info+0x3b/0x50
[   23.434782]  __kasan_kmalloc+0xb7/0xc0
[   23.435067]  __kmalloc_cache_noprof+0x189/0x420
[   23.435393]  kmalloc_oob_memset_16+0xac/0x330
[   23.435698]  kunit_try_run_case+0x1a5/0x480
[   23.435845]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.436080]  kthread+0x337/0x6f0
[   23.436258]  ret_from_fork+0x116/0x1d0
[   23.436405]  ret_from_fork_asm+0x1a/0x30
[   23.436782] 
[   23.436859] The buggy address belongs to the object at ffff88810539fb00
[   23.436859]  which belongs to the cache kmalloc-128 of size 128
[   23.437317] The buggy address is located 105 bytes inside of
[   23.437317]  allocated 120-byte region [ffff88810539fb00, ffff88810539fb78)
[   23.437884] 
[   23.437956] The buggy address belongs to the physical page:
[   23.438223] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10539f
[   23.438625] flags: 0x200000000000000(node=0|zone=2)
[   23.438898] page_type: f5(slab)
[   23.439018] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   23.439264] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.439670] page dumped because: kasan: bad access detected
[   23.439913] 
[   23.439988] Memory state around the buggy address:
[   23.440137]  ffff88810539fa00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   23.440693]  ffff88810539fa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.441343] >ffff88810539fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.441705]                                                                 ^
[   23.442142]  ffff88810539fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.442491]  ffff88810539fc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.442962] ==================================================================