Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   30.603157] ==================================================================
[   30.603334] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   30.603471] Write of size 16 at addr fff00000c6466c69 by task kunit_try_catch/189
[   30.603852] 
[   30.604003] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT 
[   30.604234] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.604304] Hardware name: linux,dummy-virt (DT)
[   30.604383] Call trace:
[   30.604438]  show_stack+0x20/0x38 (C)
[   30.604570]  dump_stack_lvl+0x8c/0xd0
[   30.604695]  print_report+0x118/0x608
[   30.604811]  kasan_report+0xdc/0x128
[   30.604939]  kasan_check_range+0x100/0x1a8
[   30.605061]  __asan_memset+0x34/0x78
[   30.605170]  kmalloc_oob_memset_16+0x150/0x2f8
[   30.605292]  kunit_try_run_case+0x170/0x3f0
[   30.605694]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.606021]  kthread+0x328/0x630
[   30.606255]  ret_from_fork+0x10/0x20
[   30.606424] 
[   30.606466] Allocated by task 189:
[   30.606526]  kasan_save_stack+0x3c/0x68
[   30.606845]  kasan_save_track+0x20/0x40
[   30.607046]  kasan_save_alloc_info+0x40/0x58
[   30.607152]  __kasan_kmalloc+0xd4/0xd8
[   30.607235]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.607346]  kmalloc_oob_memset_16+0xb0/0x2f8
[   30.607444]  kunit_try_run_case+0x170/0x3f0
[   30.607533]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.607634]  kthread+0x328/0x630
[   30.607966]  ret_from_fork+0x10/0x20
[   30.608054] 
[   30.608184] The buggy address belongs to the object at fff00000c6466c00
[   30.608184]  which belongs to the cache kmalloc-128 of size 128
[   30.608505] The buggy address is located 105 bytes inside of
[   30.608505]  allocated 120-byte region [fff00000c6466c00, fff00000c6466c78)
[   30.608943] 
[   30.609127] The buggy address belongs to the physical page:
[   30.609361] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106466
[   30.609735] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.610069] page_type: f5(slab)
[   30.610169] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   30.610309] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.610413] page dumped because: kasan: bad access detected
[   30.610486] 
[   30.610529] Memory state around the buggy address:
[   30.610610]  fff00000c6466b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.610723]  fff00000c6466b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.610938] >fff00000c6466c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.611117]                                                                 ^
[   30.611321]  fff00000c6466c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.611437]  fff00000c6466d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.611913] ==================================================================

[   27.078731] ==================================================================
[   27.079220] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   27.079706] Write of size 16 at addr ffff888103259169 by task kunit_try_catch/207
[   27.080316] 
[   27.080741] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   27.080860] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.080887] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.080935] Call Trace:
[   27.080968]  <TASK>
[   27.081011]  dump_stack_lvl+0x73/0xb0
[   27.081094]  print_report+0xd1/0x650
[   27.081155]  ? __virt_addr_valid+0x1db/0x2d0
[   27.081206]  ? kmalloc_oob_memset_16+0x166/0x330
[   27.081290]  ? kasan_complete_mode_report_info+0x2a/0x200
[   27.081388]  ? kmalloc_oob_memset_16+0x166/0x330
[   27.081574]  kasan_report+0x141/0x180
[   27.081618]  ? kmalloc_oob_memset_16+0x166/0x330
[   27.081670]  kasan_check_range+0x10c/0x1c0
[   27.081719]  __asan_memset+0x27/0x50
[   27.081805]  kmalloc_oob_memset_16+0x166/0x330
[   27.081871]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   27.081919]  ? __schedule+0x10cc/0x2b60
[   27.081963]  ? __pfx_read_tsc+0x10/0x10
[   27.082124]  ? ktime_get_ts64+0x86/0x230
[   27.082217]  kunit_try_run_case+0x1a5/0x480
[   27.082292]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.082339]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.082384]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.082421]  ? __kthread_parkme+0x82/0x180
[   27.082446]  ? preempt_count_sub+0x50/0x80
[   27.082472]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.082497]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.082522]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.082547]  kthread+0x337/0x6f0
[   27.082568]  ? trace_preempt_on+0x20/0xc0
[   27.082594]  ? __pfx_kthread+0x10/0x10
[   27.082616]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.082639]  ? calculate_sigpending+0x7b/0xa0
[   27.082666]  ? __pfx_kthread+0x10/0x10
[   27.082689]  ret_from_fork+0x116/0x1d0
[   27.082710]  ? __pfx_kthread+0x10/0x10
[   27.082732]  ret_from_fork_asm+0x1a/0x30
[   27.082765]  </TASK>
[   27.082779] 
[   27.094118] Allocated by task 207:
[   27.094674]  kasan_save_stack+0x45/0x70
[   27.095184]  kasan_save_track+0x18/0x40
[   27.095539]  kasan_save_alloc_info+0x3b/0x50
[   27.095889]  __kasan_kmalloc+0xb7/0xc0
[   27.096434]  __kmalloc_cache_noprof+0x189/0x420
[   27.096884]  kmalloc_oob_memset_16+0xac/0x330
[   27.097153]  kunit_try_run_case+0x1a5/0x480
[   27.097374]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.097776]  kthread+0x337/0x6f0
[   27.098116]  ret_from_fork+0x116/0x1d0
[   27.098666]  ret_from_fork_asm+0x1a/0x30
[   27.099052] 
[   27.099248] The buggy address belongs to the object at ffff888103259100
[   27.099248]  which belongs to the cache kmalloc-128 of size 128
[   27.099977] The buggy address is located 105 bytes inside of
[   27.099977]  allocated 120-byte region [ffff888103259100, ffff888103259178)
[   27.100417] 
[   27.100527] The buggy address belongs to the physical page:
[   27.100734] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103259
[   27.101023] flags: 0x200000000000000(node=0|zone=2)
[   27.101617] page_type: f5(slab)
[   27.101930] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   27.102711] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   27.103520] page dumped because: kasan: bad access detected
[   27.103946] 
[   27.104268] Memory state around the buggy address:
[   27.104860]  ffff888103259000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.105456]  ffff888103259080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.105767] >ffff888103259100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.106210]                                                                 ^
[   27.107052]  ffff888103259180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.107528]  ffff888103259200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.107790] ==================================================================