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

Environment
qemu-arm64
qemu-x86_64

[   19.945640] ==================================================================
[   19.946327] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x15c/0x310
[   19.947417] Write of size 2 at addr fff00000c5cb7277 by task kunit_try_catch/159
[   19.947855] 
[   19.948081] CPU: 0 UID: 0 PID: 159 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   19.948265] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.948323] Hardware name: linux,dummy-virt (DT)
[   19.948387] Call trace:
[   19.948428]  dump_backtrace+0x9c/0x128
[   19.948514]  show_stack+0x20/0x38
[   19.948589]  dump_stack_lvl+0x8c/0xd0
[   19.949183]  print_report+0x118/0x5f0
[   19.949331]  kasan_report+0xdc/0x128
[   19.949423]  kasan_check_range+0x100/0x1a8
[   19.949527]  __asan_memset+0x34/0x78
[   19.949595]  kmalloc_oob_memset_2+0x15c/0x310
[   19.949642]  kunit_try_run_case+0x170/0x3f0
[   19.949692]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.949740]  kthread+0x24c/0x2d0
[   19.949782]  ret_from_fork+0x10/0x20
[   19.949829] 
[   19.953466] Allocated by task 159:
[   19.953645]  kasan_save_stack+0x3c/0x68
[   19.953821]  kasan_save_track+0x20/0x40
[   19.953974]  kasan_save_alloc_info+0x40/0x58
[   19.954135]  __kasan_kmalloc+0xd4/0xd8
[   19.954410]  __kmalloc_cache_noprof+0x154/0x320
[   19.955362]  kmalloc_oob_memset_2+0xb0/0x310
[   19.955967]  kunit_try_run_case+0x170/0x3f0
[   19.956530]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.957177]  kthread+0x24c/0x2d0
[   19.958179]  ret_from_fork+0x10/0x20
[   19.958694] 
[   19.958967] The buggy address belongs to the object at fff00000c5cb7200
[   19.958967]  which belongs to the cache kmalloc-128 of size 128
[   19.960215] The buggy address is located 119 bytes inside of
[   19.960215]  allocated 120-byte region [fff00000c5cb7200, fff00000c5cb7278)
[   19.961460] 
[   19.961777] The buggy address belongs to the physical page:
[   19.962391] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105cb7
[   19.963451] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.964005] page_type: f5(slab)
[   19.964335] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   19.964948] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   19.965569] page dumped because: kasan: bad access detected
[   19.965991] 
[   19.966228] Memory state around the buggy address:
[   19.966702]  fff00000c5cb7100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
[   19.967211]  fff00000c5cb7180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.967910] >fff00000c5cb7200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   19.968495]                                                                 ^
[   19.969147]  fff00000c5cb7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.970036]  fff00000c5cb7300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.970542] ==================================================================

[   12.139731] ==================================================================
[   12.140155] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x167/0x330
[   12.140871] Write of size 2 at addr ffff88810261c177 by task kunit_try_catch/177
[   12.141773] 
[   12.141966] CPU: 0 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   12.142116] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.142141] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.142177] Call Trace:
[   12.142204]  <TASK>
[   12.142233]  dump_stack_lvl+0x73/0xb0
[   12.142290]  print_report+0xd1/0x640
[   12.142333]  ? __virt_addr_valid+0x1db/0x2d0
[   12.142373]  ? kmalloc_oob_memset_2+0x167/0x330
[   12.142432]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.142465]  ? kmalloc_oob_memset_2+0x167/0x330
[   12.142497]  kasan_report+0x140/0x180
[   12.142533]  ? kmalloc_oob_memset_2+0x167/0x330
[   12.142579]  kasan_check_range+0x10c/0x1c0
[   12.142609]  __asan_memset+0x27/0x50
[   12.142638]  kmalloc_oob_memset_2+0x167/0x330
[   12.142685]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   12.142792]  ? __schedule+0xc49/0x27a0
[   12.142832]  ? __pfx_read_tsc+0x10/0x10
[   12.142869]  ? ktime_get_ts64+0x84/0x230
[   12.142921]  kunit_try_run_case+0x1a6/0x480
[   12.142965]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.142990]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.143010]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.143033]  ? __kthread_parkme+0x82/0x160
[   12.143057]  ? preempt_count_sub+0x50/0x80
[   12.143114]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.143134]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.143158]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.143182]  kthread+0x257/0x310
[   12.143199]  ? __pfx_kthread+0x10/0x10
[   12.143217]  ret_from_fork+0x41/0x80
[   12.143235]  ? __pfx_kthread+0x10/0x10
[   12.143252]  ret_from_fork_asm+0x1a/0x30
[   12.143281]  </TASK>
[   12.143293] 
[   12.151075] Allocated by task 177:
[   12.151373]  kasan_save_stack+0x45/0x70
[   12.151592]  kasan_save_track+0x18/0x40
[   12.151909]  kasan_save_alloc_info+0x3b/0x50
[   12.152152]  __kasan_kmalloc+0xb7/0xc0
[   12.152337]  __kmalloc_cache_noprof+0x168/0x350
[   12.152583]  kmalloc_oob_memset_2+0xad/0x330
[   12.152901]  kunit_try_run_case+0x1a6/0x480
[   12.153249]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.153614]  kthread+0x257/0x310
[   12.153877]  ret_from_fork+0x41/0x80
[   12.154208]  ret_from_fork_asm+0x1a/0x30
[   12.154404] 
[   12.154510] The buggy address belongs to the object at ffff88810261c100
[   12.154510]  which belongs to the cache kmalloc-128 of size 128
[   12.155022] The buggy address is located 119 bytes inside of
[   12.155022]  allocated 120-byte region [ffff88810261c100, ffff88810261c178)
[   12.155823] 
[   12.156000] The buggy address belongs to the physical page:
[   12.156279] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10261c
[   12.156539] flags: 0x200000000000000(node=0|zone=2)
[   12.156795] page_type: f5(slab)
[   12.157054] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.157543] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000
[   12.158105] page dumped because: kasan: bad access detected
[   12.158360] 
[   12.158467] Memory state around the buggy address:
[   12.158665]  ffff88810261c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.158905]  ffff88810261c080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.159389] >ffff88810261c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.159876]                                                                 ^
[   12.160358]  ffff88810261c180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.160817]  ffff88810261c200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.161153] ==================================================================