Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.421593] ==================================================================
[   18.421686] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   18.421757] Write of size 4 at addr fff00000c7732275 by task kunit_try_catch/175
[   18.421812] 
[   18.421885] CPU: 1 UID: 0 PID: 175 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.421979] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.422022] Hardware name: linux,dummy-virt (DT)
[   18.422059] Call trace:
[   18.422083]  show_stack+0x20/0x38 (C)
[   18.422151]  dump_stack_lvl+0x8c/0xd0
[   18.422203]  print_report+0x118/0x608
[   18.422252]  kasan_report+0xdc/0x128
[   18.422309]  kasan_check_range+0x100/0x1a8
[   18.422360]  __asan_memset+0x34/0x78
[   18.422411]  kmalloc_oob_memset_4+0x150/0x300
[   18.422460]  kunit_try_run_case+0x170/0x3f0
[   18.422511]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.422566]  kthread+0x328/0x630
[   18.422611]  ret_from_fork+0x10/0x20
[   18.422663] 
[   18.422682] Allocated by task 175:
[   18.422713]  kasan_save_stack+0x3c/0x68
[   18.422768]  kasan_save_track+0x20/0x40
[   18.422808]  kasan_save_alloc_info+0x40/0x58
[   18.422850]  __kasan_kmalloc+0xd4/0xd8
[   18.422889]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.422930]  kmalloc_oob_memset_4+0xb0/0x300
[   18.422979]  kunit_try_run_case+0x170/0x3f0
[   18.423020]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.423072]  kthread+0x328/0x630
[   18.423106]  ret_from_fork+0x10/0x20
[   18.423153] 
[   18.423188] The buggy address belongs to the object at fff00000c7732200
[   18.423188]  which belongs to the cache kmalloc-128 of size 128
[   18.423254] The buggy address is located 117 bytes inside of
[   18.423254]  allocated 120-byte region [fff00000c7732200, fff00000c7732278)
[   18.423348] 
[   18.423387] The buggy address belongs to the physical page:
[   18.423437] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107732
[   18.423513] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.423569] page_type: f5(slab)
[   18.423614] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.423667] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.423711] page dumped because: kasan: bad access detected
[   18.423744] 
[   18.423763] Memory state around the buggy address:
[   18.423799]  fff00000c7732100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.423845]  fff00000c7732180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.423892] >fff00000c7732200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.423968]                                                                 ^
[   18.424088]  fff00000c7732280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.424197]  fff00000c7732300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.424253] ==================================================================

[   11.625034] ==================================================================
[   11.625543] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   11.625949] Write of size 4 at addr ffff888102ef5975 by task kunit_try_catch/191
[   11.626387] 
[   11.626530] CPU: 1 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.626579] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.626591] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.626611] Call Trace:
[   11.626625]  <TASK>
[   11.626643]  dump_stack_lvl+0x73/0xb0
[   11.626675]  print_report+0xd1/0x650
[   11.626699]  ? __virt_addr_valid+0x1db/0x2d0
[   11.626722]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.626742]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.626763]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.626783]  kasan_report+0x141/0x180
[   11.626804]  ? kmalloc_oob_memset_4+0x166/0x330
[   11.626828]  kasan_check_range+0x10c/0x1c0
[   11.626851]  __asan_memset+0x27/0x50
[   11.626869]  kmalloc_oob_memset_4+0x166/0x330
[   11.626890]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   11.626911]  ? __schedule+0x10cc/0x2b60
[   11.627099]  ? __pfx_read_tsc+0x10/0x10
[   11.627123]  ? ktime_get_ts64+0x86/0x230
[   11.627146]  kunit_try_run_case+0x1a5/0x480
[   11.627172]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.627194]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.627218]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.627239]  ? __kthread_parkme+0x82/0x180
[   11.627260]  ? preempt_count_sub+0x50/0x80
[   11.627283]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.627306]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.627329]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.627352]  kthread+0x337/0x6f0
[   11.627370]  ? trace_preempt_on+0x20/0xc0
[   11.627407]  ? __pfx_kthread+0x10/0x10
[   11.627426]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.627446]  ? calculate_sigpending+0x7b/0xa0
[   11.627469]  ? __pfx_kthread+0x10/0x10
[   11.627489]  ret_from_fork+0x116/0x1d0
[   11.627506]  ? __pfx_kthread+0x10/0x10
[   11.627525]  ret_from_fork_asm+0x1a/0x30
[   11.627556]  </TASK>
[   11.627567] 
[   11.635178] Allocated by task 191:
[   11.635385]  kasan_save_stack+0x45/0x70
[   11.635541]  kasan_save_track+0x18/0x40
[   11.635675]  kasan_save_alloc_info+0x3b/0x50
[   11.635908]  __kasan_kmalloc+0xb7/0xc0
[   11.636184]  __kmalloc_cache_noprof+0x189/0x420
[   11.636509]  kmalloc_oob_memset_4+0xac/0x330
[   11.636721]  kunit_try_run_case+0x1a5/0x480
[   11.636938]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.637241]  kthread+0x337/0x6f0
[   11.637428]  ret_from_fork+0x116/0x1d0
[   11.637667]  ret_from_fork_asm+0x1a/0x30
[   11.637811] 
[   11.637883] The buggy address belongs to the object at ffff888102ef5900
[   11.637883]  which belongs to the cache kmalloc-128 of size 128
[   11.638614] The buggy address is located 117 bytes inside of
[   11.638614]  allocated 120-byte region [ffff888102ef5900, ffff888102ef5978)
[   11.639322] 
[   11.639429] The buggy address belongs to the physical page:
[   11.639607] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ef5
[   11.639852] flags: 0x200000000000000(node=0|zone=2)
[   11.640160] page_type: f5(slab)
[   11.640340] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.640704] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.641046] page dumped because: kasan: bad access detected
[   11.641267] 
[   11.641336] Memory state around the buggy address:
[   11.641501]  ffff888102ef5800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.642407]  ffff888102ef5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.642911] >ffff888102ef5900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.643353]                                                                 ^
[   11.643645]  ffff888102ef5980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.643860]  ffff888102ef5a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.644072] ==================================================================