Hay
Date
July 20, 2025, 8:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.232606] ==================================================================
[   15.232789] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   15.233063] Write of size 8 at addr fff00000c6094d71 by task kunit_try_catch/177
[   15.233295] 
[   15.233367] CPU: 1 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.233528] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.233591] Hardware name: linux,dummy-virt (DT)
[   15.233637] Call trace:
[   15.233734]  show_stack+0x20/0x38 (C)
[   15.233793]  dump_stack_lvl+0x8c/0xd0
[   15.234234]  print_report+0x118/0x5d0
[   15.234331]  kasan_report+0xdc/0x128
[   15.234478]  kasan_check_range+0x100/0x1a8
[   15.234564]  __asan_memset+0x34/0x78
[   15.234711]  kmalloc_oob_memset_8+0x150/0x2f8
[   15.234798]  kunit_try_run_case+0x170/0x3f0
[   15.234938]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.235178]  kthread+0x328/0x630
[   15.235255]  ret_from_fork+0x10/0x20
[   15.235488] 
[   15.235559] Allocated by task 177:
[   15.235674]  kasan_save_stack+0x3c/0x68
[   15.235762]  kasan_save_track+0x20/0x40
[   15.236489]  kasan_save_alloc_info+0x40/0x58
[   15.236819]  __kasan_kmalloc+0xd4/0xd8
[   15.236895]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.236954]  kmalloc_oob_memset_8+0xb0/0x2f8
[   15.237032]  kunit_try_run_case+0x170/0x3f0
[   15.237175]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.237434]  kthread+0x328/0x630
[   15.237663]  ret_from_fork+0x10/0x20
[   15.237889] 
[   15.237931] The buggy address belongs to the object at fff00000c6094d00
[   15.237931]  which belongs to the cache kmalloc-128 of size 128
[   15.238058] The buggy address is located 113 bytes inside of
[   15.238058]  allocated 120-byte region [fff00000c6094d00, fff00000c6094d78)
[   15.238152] 
[   15.238221] The buggy address belongs to the physical page:
[   15.238253] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106094
[   15.238307] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.238354] page_type: f5(slab)
[   15.238423] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.238477] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.238525] page dumped because: kasan: bad access detected
[   15.238556] 
[   15.238574] Memory state around the buggy address:
[   15.238618]  fff00000c6094c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.238671]  fff00000c6094c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.238719] >fff00000c6094d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.238757]                                                                 ^
[   15.238808]  fff00000c6094d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.238847]  fff00000c6094e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.238884] ==================================================================

[   13.074300] ==================================================================
[   13.074811] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   13.075108] Write of size 8 at addr ffff8881029df671 by task kunit_try_catch/194
[   13.075652] 
[   13.075779] CPU: 1 UID: 0 PID: 194 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.075826] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.075837] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.075859] Call Trace:
[   13.075873]  <TASK>
[   13.075889]  dump_stack_lvl+0x73/0xb0
[   13.075921]  print_report+0xd1/0x610
[   13.075945]  ? __virt_addr_valid+0x1db/0x2d0
[   13.075967]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.075989]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.076011]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.076034]  kasan_report+0x141/0x180
[   13.076295]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.076327]  kasan_check_range+0x10c/0x1c0
[   13.076352]  __asan_memset+0x27/0x50
[   13.076371]  kmalloc_oob_memset_8+0x166/0x330
[   13.076394]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   13.076417]  ? __schedule+0x10c6/0x2b60
[   13.076440]  ? __pfx_read_tsc+0x10/0x10
[   13.076461]  ? ktime_get_ts64+0x86/0x230
[   13.076501]  kunit_try_run_case+0x1a5/0x480
[   13.076527]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.076549]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.076574]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.076598]  ? __kthread_parkme+0x82/0x180
[   13.076618]  ? preempt_count_sub+0x50/0x80
[   13.076642]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.076666]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.076690]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.076716]  kthread+0x337/0x6f0
[   13.076737]  ? trace_preempt_on+0x20/0xc0
[   13.076760]  ? __pfx_kthread+0x10/0x10
[   13.076780]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.076803]  ? calculate_sigpending+0x7b/0xa0
[   13.076827]  ? __pfx_kthread+0x10/0x10
[   13.076849]  ret_from_fork+0x116/0x1d0
[   13.076868]  ? __pfx_kthread+0x10/0x10
[   13.076890]  ret_from_fork_asm+0x1a/0x30
[   13.076921]  </TASK>
[   13.076931] 
[   13.087692] Allocated by task 194:
[   13.087996]  kasan_save_stack+0x45/0x70
[   13.088541]  kasan_save_track+0x18/0x40
[   13.088881]  kasan_save_alloc_info+0x3b/0x50
[   13.089413]  __kasan_kmalloc+0xb7/0xc0
[   13.089626]  __kmalloc_cache_noprof+0x189/0x420
[   13.090172]  kmalloc_oob_memset_8+0xac/0x330
[   13.090476]  kunit_try_run_case+0x1a5/0x480
[   13.090687]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.091420]  kthread+0x337/0x6f0
[   13.091679]  ret_from_fork+0x116/0x1d0
[   13.091967]  ret_from_fork_asm+0x1a/0x30
[   13.092443] 
[   13.092566] The buggy address belongs to the object at ffff8881029df600
[   13.092566]  which belongs to the cache kmalloc-128 of size 128
[   13.093682] The buggy address is located 113 bytes inside of
[   13.093682]  allocated 120-byte region [ffff8881029df600, ffff8881029df678)
[   13.094576] 
[   13.094864] The buggy address belongs to the physical page:
[   13.095196] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029df
[   13.095873] flags: 0x200000000000000(node=0|zone=2)
[   13.096491] page_type: f5(slab)
[   13.096726] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.097314] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.097653] page dumped because: kasan: bad access detected
[   13.098001] 
[   13.098461] Memory state around the buggy address:
[   13.098717]  ffff8881029df500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.099686]  ffff8881029df580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.100399] >ffff8881029df600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.100716]                                                                 ^
[   13.101343]  ffff8881029df680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.101698]  ffff8881029df700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.102052] ==================================================================