Hay
Date
June 24, 2025, 12:47 p.m.

Environment
qemu-arm64
qemu-x86_64

[   23.877097] ==================================================================
[   23.877226] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   23.877366] Write of size 2 at addr fff00000c59ef077 by task kunit_try_catch/174
[   23.877500] 
[   23.877594] CPU: 0 UID: 0 PID: 174 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   23.877792] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.877855] Hardware name: linux,dummy-virt (DT)
[   23.877929] Call trace:
[   23.877982]  show_stack+0x20/0x38 (C)
[   23.878111]  dump_stack_lvl+0x8c/0xd0
[   23.878237]  print_report+0x118/0x608
[   23.878348]  kasan_report+0xdc/0x128
[   23.879193]  kasan_check_range+0x100/0x1a8
[   23.879429]  __asan_memset+0x34/0x78
[   23.879624]  kmalloc_oob_memset_2+0x150/0x2f8
[   23.879751]  kunit_try_run_case+0x170/0x3f0
[   23.880619]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.880765]  kthread+0x328/0x630
[   23.881124]  ret_from_fork+0x10/0x20
[   23.881609] 
[   23.881773] Allocated by task 174:
[   23.881854]  kasan_save_stack+0x3c/0x68
[   23.882179]  kasan_save_track+0x20/0x40
[   23.882554]  kasan_save_alloc_info+0x40/0x58
[   23.882890]  __kasan_kmalloc+0xd4/0xd8
[   23.883077]  __kmalloc_cache_noprof+0x16c/0x3c0
[   23.883265]  kmalloc_oob_memset_2+0xb0/0x2f8
[   23.883448]  kunit_try_run_case+0x170/0x3f0
[   23.883562]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.883762]  kthread+0x328/0x630
[   23.884089]  ret_from_fork+0x10/0x20
[   23.884249] 
[   23.884491] The buggy address belongs to the object at fff00000c59ef000
[   23.884491]  which belongs to the cache kmalloc-128 of size 128
[   23.884630] The buggy address is located 119 bytes inside of
[   23.884630]  allocated 120-byte region [fff00000c59ef000, fff00000c59ef078)
[   23.884975] 
[   23.885170] The buggy address belongs to the physical page:
[   23.885545] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059ef
[   23.885731] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.886123] page_type: f5(slab)
[   23.886374] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   23.886632] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   23.886731] page dumped because: kasan: bad access detected
[   23.886811] 
[   23.886857] Memory state around the buggy address:
[   23.887603]  fff00000c59eef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.887895]  fff00000c59eef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.888057] >fff00000c59ef000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   23.888168]                                                                 ^
[   23.888442]  fff00000c59ef080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.888729]  fff00000c59ef100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.889074] ==================================================================

[   11.805165] ==================================================================
[   11.805716] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   11.806347] Write of size 2 at addr ffff8881029da277 by task kunit_try_catch/192
[   11.806793] 
[   11.807031] CPU: 1 UID: 0 PID: 192 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   11.807118] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.807136] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.807171] Call Trace:
[   11.807196]  <TASK>
[   11.807228]  dump_stack_lvl+0x73/0xb0
[   11.807285]  print_report+0xd1/0x650
[   11.807322]  ? __virt_addr_valid+0x1db/0x2d0
[   11.807356]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.807392]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.807430]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.807466]  kasan_report+0x141/0x180
[   11.807507]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.807552]  kasan_check_range+0x10c/0x1c0
[   11.807585]  __asan_memset+0x27/0x50
[   11.807618]  kmalloc_oob_memset_2+0x166/0x330
[   11.807671]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.807706]  ? __schedule+0x10cc/0x2b60
[   11.807741]  ? __pfx_read_tsc+0x10/0x10
[   11.807775]  ? ktime_get_ts64+0x86/0x230
[   11.807821]  kunit_try_run_case+0x1a5/0x480
[   11.807869]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.807910]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.807956]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.808000]  ? __kthread_parkme+0x82/0x180
[   11.808042]  ? preempt_count_sub+0x50/0x80
[   11.808087]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.808120]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.808151]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.808210]  kthread+0x337/0x6f0
[   11.808238]  ? trace_preempt_on+0x20/0xc0
[   11.808270]  ? __pfx_kthread+0x10/0x10
[   11.808307]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.808337]  ? calculate_sigpending+0x7b/0xa0
[   11.808366]  ? __pfx_kthread+0x10/0x10
[   11.808391]  ret_from_fork+0x41/0x80
[   11.808419]  ? __pfx_kthread+0x10/0x10
[   11.808446]  ret_from_fork_asm+0x1a/0x30
[   11.808489]  </TASK>
[   11.808508] 
[   11.820878] Allocated by task 192:
[   11.821104]  kasan_save_stack+0x45/0x70
[   11.821359]  kasan_save_track+0x18/0x40
[   11.821586]  kasan_save_alloc_info+0x3b/0x50
[   11.822866]  __kasan_kmalloc+0xb7/0xc0
[   11.823076]  __kmalloc_cache_noprof+0x189/0x420
[   11.823489]  kmalloc_oob_memset_2+0xac/0x330
[   11.824045]  kunit_try_run_case+0x1a5/0x480
[   11.824299]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.824648]  kthread+0x337/0x6f0
[   11.824907]  ret_from_fork+0x41/0x80
[   11.825079]  ret_from_fork_asm+0x1a/0x30
[   11.825380] 
[   11.825511] The buggy address belongs to the object at ffff8881029da200
[   11.825511]  which belongs to the cache kmalloc-128 of size 128
[   11.826658] The buggy address is located 119 bytes inside of
[   11.826658]  allocated 120-byte region [ffff8881029da200, ffff8881029da278)
[   11.827583] 
[   11.827816] The buggy address belongs to the physical page:
[   11.828031] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029da
[   11.828659] flags: 0x200000000000000(node=0|zone=2)
[   11.829015] page_type: f5(slab)
[   11.829437] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.829782] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.830284] page dumped because: kasan: bad access detected
[   11.831114] 
[   11.831269] Memory state around the buggy address:
[   11.831693]  ffff8881029da100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.832145]  ffff8881029da180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.832827] >ffff8881029da200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.833060]                                                                 ^
[   11.833736]  ffff8881029da280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.834130]  ffff8881029da300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.834998] ==================================================================