Hay
Date
June 2, 2025, 2:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.811416] ==================================================================
[   18.812008] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   18.812365] Write of size 4 at addr fff00000c3e3ef75 by task kunit_try_catch/164
[   18.812677] 
[   18.812821] CPU: 0 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   18.812912] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.812942] Hardware name: linux,dummy-virt (DT)
[   18.812976] Call trace:
[   18.813001]  show_stack+0x20/0x38 (C)
[   18.813056]  dump_stack_lvl+0x8c/0xd0
[   18.813106]  print_report+0x118/0x608
[   18.814378]  kasan_report+0xdc/0x128
[   18.814479]  kasan_check_range+0x100/0x1a8
[   18.814531]  __asan_memset+0x34/0x78
[   18.814578]  kmalloc_oob_memset_4+0x150/0x300
[   18.814629]  kunit_try_run_case+0x170/0x3f0
[   18.814683]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.814737]  kthread+0x318/0x620
[   18.814785]  ret_from_fork+0x10/0x20
[   18.814840] 
[   18.821667] Allocated by task 164:
[   18.822147]  kasan_save_stack+0x3c/0x68
[   18.822872]  kasan_save_track+0x20/0x40
[   18.823828]  kasan_save_alloc_info+0x40/0x58
[   18.824259]  __kasan_kmalloc+0xd4/0xd8
[   18.824742]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.825121]  kmalloc_oob_memset_4+0xb0/0x300
[   18.825529]  kunit_try_run_case+0x170/0x3f0
[   18.825897]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.826894]  kthread+0x318/0x620
[   18.827413]  ret_from_fork+0x10/0x20
[   18.827826] 
[   18.828178] The buggy address belongs to the object at fff00000c3e3ef00
[   18.828178]  which belongs to the cache kmalloc-128 of size 128
[   18.829070] The buggy address is located 117 bytes inside of
[   18.829070]  allocated 120-byte region [fff00000c3e3ef00, fff00000c3e3ef78)
[   18.829987] 
[   18.831020] The buggy address belongs to the physical page:
[   18.831322] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103e3e
[   18.832101] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.832620] page_type: f5(slab)
[   18.833050] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.833750] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.834515] page dumped because: kasan: bad access detected
[   18.835410] 
[   18.835814] Memory state around the buggy address:
[   18.836454]  fff00000c3e3ee00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.837005]  fff00000c3e3ee80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.837597] >fff00000c3e3ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.838115]                                                                 ^
[   18.839596]  fff00000c3e3ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.840336]  fff00000c3e3f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.841019] ==================================================================

[   12.800402] ==================================================================
[   12.800988] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x167/0x330
[   12.801346] Write of size 4 at addr ffff888102a2c175 by task kunit_try_catch/182
[   12.802122] 
[   12.802387] CPU: 0 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N 6.14.10-rc1 #1
[   12.802437] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.802449] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.802470] Call Trace:
[   12.802483]  <TASK>
[   12.802500]  dump_stack_lvl+0x73/0xb0
[   12.802533]  print_report+0xd1/0x650
[   12.802557]  ? __virt_addr_valid+0x1db/0x2d0
[   12.802583]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.802606]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.802634]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.802658]  kasan_report+0x140/0x180
[   12.802683]  ? kmalloc_oob_memset_4+0x167/0x330
[   12.802710]  kasan_check_range+0x10c/0x1c0
[   12.802735]  __asan_memset+0x27/0x50
[   12.802761]  kmalloc_oob_memset_4+0x167/0x330
[   12.802784]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   12.802809]  ? __schedule+0xce8/0x2840
[   12.802836]  ? __pfx_read_tsc+0x10/0x10
[   12.802860]  ? ktime_get_ts64+0x86/0x230
[   12.802889]  kunit_try_run_case+0x1a6/0x480
[   12.802915]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.802938]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.802964]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.802989]  ? __kthread_parkme+0x82/0x160
[   12.803014]  ? preempt_count_sub+0x50/0x80
[   12.803054]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.803081]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.803109]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.803137]  kthread+0x324/0x6e0
[   12.803160]  ? trace_preempt_on+0x20/0xc0
[   12.803187]  ? __pfx_kthread+0x10/0x10
[   12.803212]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.803237]  ? calculate_sigpending+0x7b/0xa0
[   12.803261]  ? __pfx_kthread+0x10/0x10
[   12.803286]  ret_from_fork+0x41/0x80
[   12.803306]  ? __pfx_kthread+0x10/0x10
[   12.803330]  ret_from_fork_asm+0x1a/0x30
[   12.803365]  </TASK>
[   12.803374] 
[   12.814035] Allocated by task 182:
[   12.814390]  kasan_save_stack+0x45/0x70
[   12.814725]  kasan_save_track+0x18/0x40
[   12.815079]  kasan_save_alloc_info+0x3b/0x50
[   12.815393]  __kasan_kmalloc+0xb7/0xc0
[   12.815617]  __kmalloc_cache_noprof+0x18a/0x420
[   12.815911]  kmalloc_oob_memset_4+0xad/0x330
[   12.816103]  kunit_try_run_case+0x1a6/0x480
[   12.816317]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.816557]  kthread+0x324/0x6e0
[   12.816747]  ret_from_fork+0x41/0x80
[   12.816902]  ret_from_fork_asm+0x1a/0x30
[   12.817543] 
[   12.817669] The buggy address belongs to the object at ffff888102a2c100
[   12.817669]  which belongs to the cache kmalloc-128 of size 128
[   12.818760] The buggy address is located 117 bytes inside of
[   12.818760]  allocated 120-byte region [ffff888102a2c100, ffff888102a2c178)
[   12.819738] 
[   12.819854] The buggy address belongs to the physical page:
[   12.820120] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a2c
[   12.820455] flags: 0x200000000000000(node=0|zone=2)
[   12.821147] page_type: f5(slab)
[   12.821523] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.822216] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.822447] page dumped because: kasan: bad access detected
[   12.822932] 
[   12.823243] Memory state around the buggy address:
[   12.823882]  ffff888102a2c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.824951]  ffff888102a2c080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.825479] >ffff888102a2c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.826055]                                                                 ^
[   12.826813]  ffff888102a2c180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.827370]  ffff888102a2c200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.827720] ==================================================================