Hay
Date
July 11, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   16.693971] ==================================================================
[   16.694027] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   16.694077] Write of size 4 at addr fff00000c6f3f675 by task kunit_try_catch/175
[   16.694125] 
[   16.695734] CPU: 0 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   16.696945] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.697048] Hardware name: linux,dummy-virt (DT)
[   16.697382] Call trace:
[   16.697936]  show_stack+0x20/0x38 (C)
[   16.698196]  dump_stack_lvl+0x8c/0xd0
[   16.698696]  print_report+0x118/0x608
[   16.699151]  kasan_report+0xdc/0x128
[   16.699300]  kasan_check_range+0x100/0x1a8
[   16.699673]  __asan_memset+0x34/0x78
[   16.700141]  kmalloc_oob_memset_4+0x150/0x300
[   16.700201]  kunit_try_run_case+0x170/0x3f0
[   16.700248]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.700299]  kthread+0x328/0x630
[   16.701483]  ret_from_fork+0x10/0x20
[   16.701923] 
[   16.701944] Allocated by task 175:
[   16.702467]  kasan_save_stack+0x3c/0x68
[   16.702620]  kasan_save_track+0x20/0x40
[   16.703076]  kasan_save_alloc_info+0x40/0x58
[   16.703128]  __kasan_kmalloc+0xd4/0xd8
[   16.703165]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.703203]  kmalloc_oob_memset_4+0xb0/0x300
[   16.704333]  kunit_try_run_case+0x170/0x3f0
[   16.704386]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.705295]  kthread+0x328/0x630
[   16.705529]  ret_from_fork+0x10/0x20
[   16.706059] 
[   16.706224] The buggy address belongs to the object at fff00000c6f3f600
[   16.706224]  which belongs to the cache kmalloc-128 of size 128
[   16.706705] The buggy address is located 117 bytes inside of
[   16.706705]  allocated 120-byte region [fff00000c6f3f600, fff00000c6f3f678)
[   16.706999] 
[   16.707023] The buggy address belongs to the physical page:
[   16.707928] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106f3f
[   16.708368] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.708693] page_type: f5(slab)
[   16.709102] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.709588] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.710130] page dumped because: kasan: bad access detected
[   16.710356] 
[   16.710559] Memory state around the buggy address:
[   16.710942]  fff00000c6f3f500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.710989]  fff00000c6f3f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.711030] >fff00000c6f3f600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.711066]                                                                 ^
[   16.711105]  fff00000c6f3f680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.711146]  fff00000c6f3f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.712315] ==================================================================

[   12.482935] ==================================================================
[   12.483458] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   12.483756] Write of size 4 at addr ffff888100a73f75 by task kunit_try_catch/191
[   12.484390] 
[   12.484501] CPU: 0 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.484543] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.484554] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.484573] Call Trace:
[   12.484584]  <TASK>
[   12.484598]  dump_stack_lvl+0x73/0xb0
[   12.484627]  print_report+0xd1/0x650
[   12.484649]  ? __virt_addr_valid+0x1db/0x2d0
[   12.484672]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.484693]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.484716]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.484738]  kasan_report+0x141/0x180
[   12.484760]  ? kmalloc_oob_memset_4+0x166/0x330
[   12.484787]  kasan_check_range+0x10c/0x1c0
[   12.484810]  __asan_memset+0x27/0x50
[   12.484830]  kmalloc_oob_memset_4+0x166/0x330
[   12.484851]  ? __kasan_check_write+0x18/0x20
[   12.484870]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.484892]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   12.484944]  ? trace_hardirqs_on+0x37/0xe0
[   12.484968]  ? __pfx_read_tsc+0x10/0x10
[   12.484988]  ? ktime_get_ts64+0x86/0x230
[   12.485013]  kunit_try_run_case+0x1a5/0x480
[   12.485037]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.485062]  ? queued_spin_lock_slowpath+0x116/0xb40
[   12.485086]  ? __kthread_parkme+0x82/0x180
[   12.485191]  ? preempt_count_sub+0x50/0x80
[   12.485215]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.485239]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.485263]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.485288]  kthread+0x337/0x6f0
[   12.485306]  ? trace_preempt_on+0x20/0xc0
[   12.485328]  ? __pfx_kthread+0x10/0x10
[   12.485348]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.485370]  ? calculate_sigpending+0x7b/0xa0
[   12.485394]  ? __pfx_kthread+0x10/0x10
[   12.485415]  ret_from_fork+0x116/0x1d0
[   12.485433]  ? __pfx_kthread+0x10/0x10
[   12.485453]  ret_from_fork_asm+0x1a/0x30
[   12.485484]  </TASK>
[   12.485494] 
[   12.493439] Allocated by task 191:
[   12.493569]  kasan_save_stack+0x45/0x70
[   12.493847]  kasan_save_track+0x18/0x40
[   12.494053]  kasan_save_alloc_info+0x3b/0x50
[   12.494339]  __kasan_kmalloc+0xb7/0xc0
[   12.494530]  __kmalloc_cache_noprof+0x189/0x420
[   12.494693]  kmalloc_oob_memset_4+0xac/0x330
[   12.495291]  kunit_try_run_case+0x1a5/0x480
[   12.495486]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.495663]  kthread+0x337/0x6f0
[   12.495783]  ret_from_fork+0x116/0x1d0
[   12.495982]  ret_from_fork_asm+0x1a/0x30
[   12.496186] 
[   12.496394] The buggy address belongs to the object at ffff888100a73f00
[   12.496394]  which belongs to the cache kmalloc-128 of size 128
[   12.496847] The buggy address is located 117 bytes inside of
[   12.496847]  allocated 120-byte region [ffff888100a73f00, ffff888100a73f78)
[   12.497582] 
[   12.497665] The buggy address belongs to the physical page:
[   12.497943] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a73
[   12.498261] flags: 0x200000000000000(node=0|zone=2)
[   12.498425] page_type: f5(slab)
[   12.498594] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.498947] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.499370] page dumped because: kasan: bad access detected
[   12.499849] 
[   12.499952] Memory state around the buggy address:
[   12.500217]  ffff888100a73e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.500489]  ffff888100a73e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.500810] >ffff888100a73f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.501217]                                                                 ^
[   12.501512]  ffff888100a73f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.501817]  ffff888100a74000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.502060] ==================================================================