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

Environment
qemu-arm64
qemu-x86_64

[   15.409748] ==================================================================
[   15.409863] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   15.409914] Write of size 8 at addr fff00000c786a571 by task kunit_try_catch/177
[   15.410000] 
[   15.410354] CPU: 0 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.410453] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.410479] Hardware name: linux,dummy-virt (DT)
[   15.410607] Call trace:
[   15.410633]  show_stack+0x20/0x38 (C)
[   15.410687]  dump_stack_lvl+0x8c/0xd0
[   15.410732]  print_report+0x118/0x5d0
[   15.410902]  kasan_report+0xdc/0x128
[   15.410949]  kasan_check_range+0x100/0x1a8
[   15.411140]  __asan_memset+0x34/0x78
[   15.411196]  kmalloc_oob_memset_8+0x150/0x2f8
[   15.411395]  kunit_try_run_case+0x170/0x3f0
[   15.411520]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.411615]  kthread+0x328/0x630
[   15.411658]  ret_from_fork+0x10/0x20
[   15.411711] 
[   15.411729] Allocated by task 177:
[   15.411756]  kasan_save_stack+0x3c/0x68
[   15.411871]  kasan_save_track+0x20/0x40
[   15.411911]  kasan_save_alloc_info+0x40/0x58
[   15.411950]  __kasan_kmalloc+0xd4/0xd8
[   15.412325]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.412386]  kmalloc_oob_memset_8+0xb0/0x2f8
[   15.412423]  kunit_try_run_case+0x170/0x3f0
[   15.412478]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.412522]  kthread+0x328/0x630
[   15.412590]  ret_from_fork+0x10/0x20
[   15.412720] 
[   15.412790] The buggy address belongs to the object at fff00000c786a500
[   15.412790]  which belongs to the cache kmalloc-128 of size 128
[   15.412917] The buggy address is located 113 bytes inside of
[   15.412917]  allocated 120-byte region [fff00000c786a500, fff00000c786a578)
[   15.413163] 
[   15.413257] The buggy address belongs to the physical page:
[   15.413519] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10786a
[   15.413635] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.413769] page_type: f5(slab)
[   15.414041] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.414489] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.414560] page dumped because: kasan: bad access detected
[   15.414666] 
[   15.414684] Memory state around the buggy address:
[   15.414970]  fff00000c786a400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.415143]  fff00000c786a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.415253] >fff00000c786a500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.415405]                                                                 ^
[   15.415486]  fff00000c786a580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.415626]  fff00000c786a600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.415762] ==================================================================

[   13.193621] ==================================================================
[   13.194316] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   13.194686] Write of size 8 at addr ffff888102a04871 by task kunit_try_catch/193
[   13.195023] 
[   13.195788] CPU: 0 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.195838] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.195850] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.195872] Call Trace:
[   13.195885]  <TASK>
[   13.195901]  dump_stack_lvl+0x73/0xb0
[   13.196548]  print_report+0xd1/0x610
[   13.196589]  ? __virt_addr_valid+0x1db/0x2d0
[   13.196613]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.196635]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.196659]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.196682]  kasan_report+0x141/0x180
[   13.196704]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.196731]  kasan_check_range+0x10c/0x1c0
[   13.196756]  __asan_memset+0x27/0x50
[   13.196776]  kmalloc_oob_memset_8+0x166/0x330
[   13.196798]  ? __kasan_check_write+0x18/0x20
[   13.196818]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   13.196841]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   13.196868]  ? trace_hardirqs_on+0x37/0xe0
[   13.196892]  ? __pfx_read_tsc+0x10/0x10
[   13.196914]  ? ktime_get_ts64+0x86/0x230
[   13.196939]  kunit_try_run_case+0x1a5/0x480
[   13.196965]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.196991]  ? queued_spin_lock_slowpath+0x116/0xb40
[   13.197016]  ? __kthread_parkme+0x82/0x180
[   13.197038]  ? preempt_count_sub+0x50/0x80
[   13.197063]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.197088]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.197113]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.197139]  kthread+0x337/0x6f0
[   13.197158]  ? trace_preempt_on+0x20/0xc0
[   13.197180]  ? __pfx_kthread+0x10/0x10
[   13.197201]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.197895]  ? calculate_sigpending+0x7b/0xa0
[   13.197934]  ? __pfx_kthread+0x10/0x10
[   13.197956]  ret_from_fork+0x116/0x1d0
[   13.197978]  ? __pfx_kthread+0x10/0x10
[   13.197999]  ret_from_fork_asm+0x1a/0x30
[   13.198031]  </TASK>
[   13.198043] 
[   13.206828] Allocated by task 193:
[   13.207036]  kasan_save_stack+0x45/0x70
[   13.207386]  kasan_save_track+0x18/0x40
[   13.207628]  kasan_save_alloc_info+0x3b/0x50
[   13.207840]  __kasan_kmalloc+0xb7/0xc0
[   13.208048]  __kmalloc_cache_noprof+0x189/0x420
[   13.208269]  kmalloc_oob_memset_8+0xac/0x330
[   13.208623]  kunit_try_run_case+0x1a5/0x480
[   13.208843]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.209058]  kthread+0x337/0x6f0
[   13.209183]  ret_from_fork+0x116/0x1d0
[   13.209495]  ret_from_fork_asm+0x1a/0x30
[   13.209712] 
[   13.209811] The buggy address belongs to the object at ffff888102a04800
[   13.209811]  which belongs to the cache kmalloc-128 of size 128
[   13.210385] The buggy address is located 113 bytes inside of
[   13.210385]  allocated 120-byte region [ffff888102a04800, ffff888102a04878)
[   13.210896] 
[   13.210994] The buggy address belongs to the physical page:
[   13.211428] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a04
[   13.211783] flags: 0x200000000000000(node=0|zone=2)
[   13.212023] page_type: f5(slab)
[   13.212182] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.212578] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.212929] page dumped because: kasan: bad access detected
[   13.213179] 
[   13.213361] Memory state around the buggy address:
[   13.213570]  ffff888102a04700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.213891]  ffff888102a04780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.214118] >ffff888102a04800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.214541]                                                                 ^
[   13.214891]  ffff888102a04880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.215436]  ffff888102a04900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.215832] ==================================================================