Hay
Date
July 17, 2025, 10:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.548230] ==================================================================
[   29.548320] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   29.548685] Write of size 128 at addr fff00000c59f9e00 by task kunit_try_catch/201
[   29.549154] 
[   29.549197] CPU: 1 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT 
[   29.549281] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.549306] Hardware name: linux,dummy-virt (DT)
[   29.549336] Call trace:
[   29.549360]  show_stack+0x20/0x38 (C)
[   29.549411]  dump_stack_lvl+0x8c/0xd0
[   29.549795]  print_report+0x118/0x5d0
[   29.549862]  kasan_report+0xdc/0x128
[   29.549906]  kasan_check_range+0x100/0x1a8
[   29.549950]  __asan_memset+0x34/0x78
[   29.549993]  kmalloc_oob_in_memset+0x144/0x2d0
[   29.550040]  kunit_try_run_case+0x170/0x3f0
[   29.550099]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.550539]  kthread+0x328/0x630
[   29.550856]  ret_from_fork+0x10/0x20
[   29.550927] 
[   29.550947] Allocated by task 201:
[   29.551161]  kasan_save_stack+0x3c/0x68
[   29.551440]  kasan_save_track+0x20/0x40
[   29.551519]  kasan_save_alloc_info+0x40/0x58
[   29.551671]  __kasan_kmalloc+0xd4/0xd8
[   29.551751]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.552123]  kmalloc_oob_in_memset+0xb0/0x2d0
[   29.552177]  kunit_try_run_case+0x170/0x3f0
[   29.552437]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.552566]  kthread+0x328/0x630
[   29.552669]  ret_from_fork+0x10/0x20
[   29.552752] 
[   29.552809] The buggy address belongs to the object at fff00000c59f9e00
[   29.552809]  which belongs to the cache kmalloc-128 of size 128
[   29.552948] The buggy address is located 0 bytes inside of
[   29.552948]  allocated 120-byte region [fff00000c59f9e00, fff00000c59f9e78)
[   29.553072] 
[   29.553194] The buggy address belongs to the physical page:
[   29.553251] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059f9
[   29.553363] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.553489] page_type: f5(slab)
[   29.553534] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   29.553583] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.553621] page dumped because: kasan: bad access detected
[   29.553914] 
[   29.553958] Memory state around the buggy address:
[   29.554010]  fff00000c59f9d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.554161]  fff00000c59f9d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.554246] >fff00000c59f9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.554396]                                                                 ^
[   29.554573]  fff00000c59f9e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.554716]  fff00000c59f9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.554807] ==================================================================

[   25.738207] ==================================================================
[   25.738657] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   25.739004] Write of size 128 at addr ffff888105f2fa00 by task kunit_try_catch/219
[   25.739333] 
[   25.739454] CPU: 1 UID: 0 PID: 219 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   25.739502] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.739513] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.739534] Call Trace:
[   25.739547]  <TASK>
[   25.739563]  dump_stack_lvl+0x73/0xb0
[   25.739594]  print_report+0xd1/0x610
[   25.739616]  ? __virt_addr_valid+0x1db/0x2d0
[   25.739639]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.739660]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.739684]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.739705]  kasan_report+0x141/0x180
[   25.739726]  ? kmalloc_oob_in_memset+0x15f/0x320
[   25.739753]  kasan_check_range+0x10c/0x1c0
[   25.739777]  __asan_memset+0x27/0x50
[   25.739800]  kmalloc_oob_in_memset+0x15f/0x320
[   25.739821]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   25.739843]  ? __schedule+0x10c6/0x2b60
[   25.739866]  ? __pfx_read_tsc+0x10/0x10
[   25.739887]  ? ktime_get_ts64+0x86/0x230
[   25.739911]  kunit_try_run_case+0x1a5/0x480
[   25.739934]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.739955]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.739977]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.740000]  ? __kthread_parkme+0x82/0x180
[   25.740023]  ? preempt_count_sub+0x50/0x80
[   25.740045]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.740069]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.740101]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.740123]  kthread+0x337/0x6f0
[   25.740141]  ? trace_preempt_on+0x20/0xc0
[   25.740164]  ? __pfx_kthread+0x10/0x10
[   25.740184]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.740204]  ? calculate_sigpending+0x7b/0xa0
[   25.740257]  ? __pfx_kthread+0x10/0x10
[   25.740277]  ret_from_fork+0x116/0x1d0
[   25.740309]  ? __pfx_kthread+0x10/0x10
[   25.740329]  ret_from_fork_asm+0x1a/0x30
[   25.740360]  </TASK>
[   25.740369] 
[   25.747481] Allocated by task 219:
[   25.747808]  kasan_save_stack+0x45/0x70
[   25.747948]  kasan_save_track+0x18/0x40
[   25.748076]  kasan_save_alloc_info+0x3b/0x50
[   25.748226]  __kasan_kmalloc+0xb7/0xc0
[   25.748358]  __kmalloc_cache_noprof+0x189/0x420
[   25.748572]  kmalloc_oob_in_memset+0xac/0x320
[   25.748782]  kunit_try_run_case+0x1a5/0x480
[   25.748987]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.749350]  kthread+0x337/0x6f0
[   25.749516]  ret_from_fork+0x116/0x1d0
[   25.749672]  ret_from_fork_asm+0x1a/0x30
[   25.749816] 
[   25.749880] The buggy address belongs to the object at ffff888105f2fa00
[   25.749880]  which belongs to the cache kmalloc-128 of size 128
[   25.750431] The buggy address is located 0 bytes inside of
[   25.750431]  allocated 120-byte region [ffff888105f2fa00, ffff888105f2fa78)
[   25.750784] 
[   25.750852] The buggy address belongs to the physical page:
[   25.751037] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105f2f
[   25.751381] flags: 0x200000000000000(node=0|zone=2)
[   25.751602] page_type: f5(slab)
[   25.751762] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.752334] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.752652] page dumped because: kasan: bad access detected
[   25.752859] 
[   25.752921] Memory state around the buggy address:
[   25.753070]  ffff888105f2f900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.753474]  ffff888105f2f980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.753790] >ffff888105f2fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.754109]                                                                 ^
[   25.754499]  ffff888105f2fa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.754773]  ffff888105f2fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.755025] ==================================================================