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

Environment
qemu-arm64
qemu-x86_64

[   29.627251] ==================================================================
[   29.627320] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   29.627418] Write of size 16 at addr fff00000c5a97e69 by task kunit_try_catch/211
[   29.627499] 
[   29.627576] CPU: 0 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT 
[   29.627684] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.627711] Hardware name: linux,dummy-virt (DT)
[   29.627779] Call trace:
[   29.627828]  show_stack+0x20/0x38 (C)
[   29.628050]  dump_stack_lvl+0x8c/0xd0
[   29.628152]  print_report+0x118/0x608
[   29.628206]  kasan_report+0xdc/0x128
[   29.628252]  kasan_check_range+0x100/0x1a8
[   29.628297]  __asan_memset+0x34/0x78
[   29.628466]  kmalloc_oob_memset_16+0x150/0x2f8
[   29.628613]  kunit_try_run_case+0x170/0x3f0
[   29.628753]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.628810]  kthread+0x328/0x630
[   29.628851]  ret_from_fork+0x10/0x20
[   29.628895] 
[   29.628968] Allocated by task 211:
[   29.629003]  kasan_save_stack+0x3c/0x68
[   29.629093]  kasan_save_track+0x20/0x40
[   29.629185]  kasan_save_alloc_info+0x40/0x58
[   29.629262]  __kasan_kmalloc+0xd4/0xd8
[   29.629347]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.629387]  kmalloc_oob_memset_16+0xb0/0x2f8
[   29.629483]  kunit_try_run_case+0x170/0x3f0
[   29.629571]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.629618]  kthread+0x328/0x630
[   29.629652]  ret_from_fork+0x10/0x20
[   29.629687] 
[   29.629717] The buggy address belongs to the object at fff00000c5a97e00
[   29.629717]  which belongs to the cache kmalloc-128 of size 128
[   29.629776] The buggy address is located 105 bytes inside of
[   29.629776]  allocated 120-byte region [fff00000c5a97e00, fff00000c5a97e78)
[   29.629837] 
[   29.629858] The buggy address belongs to the physical page:
[   29.629922] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a97
[   29.629995] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.630255] page_type: f5(slab)
[   29.630311] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.630466] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.630626] page dumped because: kasan: bad access detected
[   29.630658] 
[   29.630683] Memory state around the buggy address:
[   29.630715]  fff00000c5a97d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.630912]  fff00000c5a97d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.630956] >fff00000c5a97e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.630993]                                                                 ^
[   29.631033]  fff00000c5a97e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.631158]  fff00000c5a97f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.631288] ==================================================================

[   25.071050] ==================================================================
[   25.072498] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   25.073048] Write of size 16 at addr ffff888105aac269 by task kunit_try_catch/227
[   25.073429] 
[   25.073635] CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) 
[   25.073696] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.073711] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.073737] Call Trace:
[   25.073753]  <TASK>
[   25.073776]  dump_stack_lvl+0x73/0xb0
[   25.073811]  print_report+0xd1/0x650
[   25.073837]  ? __virt_addr_valid+0x1db/0x2d0
[   25.073864]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.073888]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.073917]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.073961]  kasan_report+0x141/0x180
[   25.073986]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.074016]  kasan_check_range+0x10c/0x1c0
[   25.074042]  __asan_memset+0x27/0x50
[   25.074068]  kmalloc_oob_memset_16+0x166/0x330
[   25.074094]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   25.074119]  ? __schedule+0x10cc/0x2b60
[   25.074147]  ? __pfx_read_tsc+0x10/0x10
[   25.074184]  ? ktime_get_ts64+0x86/0x230
[   25.074214]  kunit_try_run_case+0x1a5/0x480
[   25.074245]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.074272]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.074300]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.074327]  ? __kthread_parkme+0x82/0x180
[   25.074351]  ? preempt_count_sub+0x50/0x80
[   25.074378]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.074419]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.074448]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.074475]  kthread+0x337/0x6f0
[   25.074498]  ? trace_preempt_on+0x20/0xc0
[   25.074528]  ? __pfx_kthread+0x10/0x10
[   25.074554]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.074582]  ? calculate_sigpending+0x7b/0xa0
[   25.074610]  ? __pfx_kthread+0x10/0x10
[   25.074634]  ret_from_fork+0x116/0x1d0
[   25.074657]  ? __pfx_kthread+0x10/0x10
[   25.074681]  ret_from_fork_asm+0x1a/0x30
[   25.074718]  </TASK>
[   25.074733] 
[   25.084309] Allocated by task 227:
[   25.084534]  kasan_save_stack+0x45/0x70
[   25.084767]  kasan_save_track+0x18/0x40
[   25.085680]  kasan_save_alloc_info+0x3b/0x50
[   25.086088]  __kasan_kmalloc+0xb7/0xc0
[   25.086263]  __kmalloc_cache_noprof+0x189/0x420
[   25.086447]  kmalloc_oob_memset_16+0xac/0x330
[   25.086609]  kunit_try_run_case+0x1a5/0x480
[   25.086766]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.086953]  kthread+0x337/0x6f0
[   25.087079]  ret_from_fork+0x116/0x1d0
[   25.087219]  ret_from_fork_asm+0x1a/0x30
[   25.087367] 
[   25.087553] The buggy address belongs to the object at ffff888105aac200
[   25.087553]  which belongs to the cache kmalloc-128 of size 128
[   25.088665] The buggy address is located 105 bytes inside of
[   25.088665]  allocated 120-byte region [ffff888105aac200, ffff888105aac278)
[   25.090085] 
[   25.090263] The buggy address belongs to the physical page:
[   25.090877] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105aac
[   25.091740] flags: 0x200000000000000(node=0|zone=2)
[   25.092274] page_type: f5(slab)
[   25.092632] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.093524] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.094271] page dumped because: kasan: bad access detected
[   25.094965] 
[   25.095344] Memory state around the buggy address:
[   25.095588]  ffff888105aac100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.095822]  ffff888105aac180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.096494] >ffff888105aac200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.097247]                                                                 ^
[   25.097947]  ffff888105aac280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.098762]  ffff888105aac300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.099628] ==================================================================