Hay
Date
July 9, 2025, 1:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   29.373921] ==================================================================
[   29.373976] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   29.374615] Write of size 4 at addr fff00000c57d4e75 by task kunit_try_catch/206
[   29.374678] 
[   29.374711] CPU: 0 UID: 0 PID: 206 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250709 #1 PREEMPT 
[   29.374841] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.374868] Hardware name: linux,dummy-virt (DT)
[   29.375000] Call trace:
[   29.375025]  show_stack+0x20/0x38 (C)
[   29.375403]  dump_stack_lvl+0x8c/0xd0
[   29.375901]  print_report+0x118/0x5d0
[   29.375946]  kasan_report+0xdc/0x128
[   29.376232]  kasan_check_range+0x100/0x1a8
[   29.376279]  __asan_memset+0x34/0x78
[   29.376321]  kmalloc_oob_memset_4+0x150/0x300
[   29.376599]  kunit_try_run_case+0x170/0x3f0
[   29.376984]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.377038]  kthread+0x328/0x630
[   29.377575]  ret_from_fork+0x10/0x20
[   29.377623] 
[   29.377643] Allocated by task 206:
[   29.378135]  kasan_save_stack+0x3c/0x68
[   29.378492]  kasan_save_track+0x20/0x40
[   29.378530]  kasan_save_alloc_info+0x40/0x58
[   29.378568]  __kasan_kmalloc+0xd4/0xd8
[   29.378604]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.378645]  kmalloc_oob_memset_4+0xb0/0x300
[   29.379667]  kunit_try_run_case+0x170/0x3f0
[   29.379737]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.379781]  kthread+0x328/0x630
[   29.379814]  ret_from_fork+0x10/0x20
[   29.379849] 
[   29.379869] The buggy address belongs to the object at fff00000c57d4e00
[   29.379869]  which belongs to the cache kmalloc-128 of size 128
[   29.379927] The buggy address is located 117 bytes inside of
[   29.379927]  allocated 120-byte region [fff00000c57d4e00, fff00000c57d4e78)
[   29.380084] 
[   29.380495] The buggy address belongs to the physical page:
[   29.380797] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057d4
[   29.380963] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.381020] page_type: f5(slab)
[   29.381073] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   29.381196] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   29.381360] page dumped because: kasan: bad access detected
[   29.381395] 
[   29.381583] Memory state around the buggy address:
[   29.381620]  fff00000c57d4d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   29.381663]  fff00000c57d4d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.381876] >fff00000c57d4e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   29.382340]                                                                 ^
[   29.382634]  fff00000c57d4e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.382702]  fff00000c57d4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.382739] ==================================================================

[   24.209071] ==================================================================
[   24.209912] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   24.210624] Write of size 4 at addr ffff88810456ad75 by task kunit_try_catch/224
[   24.211073] 
[   24.211170] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc5-next-20250709 #1 PREEMPT(voluntary) 
[   24.211222] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   24.211236] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.211257] Call Trace:
[   24.211271]  <TASK>
[   24.211290]  dump_stack_lvl+0x73/0xb0
[   24.211323]  print_report+0xd1/0x610
[   24.211358]  ? __virt_addr_valid+0x1db/0x2d0
[   24.211383]  ? kmalloc_oob_memset_4+0x166/0x330
[   24.211416]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.211442]  ? kmalloc_oob_memset_4+0x166/0x330
[   24.211463]  kasan_report+0x141/0x180
[   24.211484]  ? kmalloc_oob_memset_4+0x166/0x330
[   24.211510]  kasan_check_range+0x10c/0x1c0
[   24.211532]  __asan_memset+0x27/0x50
[   24.211555]  kmalloc_oob_memset_4+0x166/0x330
[   24.211576]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   24.211598]  ? __schedule+0x10cc/0x2b60
[   24.211622]  ? __pfx_read_tsc+0x10/0x10
[   24.211643]  ? ktime_get_ts64+0x86/0x230
[   24.211669]  kunit_try_run_case+0x1a5/0x480
[   24.211691]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.211720]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.211743]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.211767]  ? __kthread_parkme+0x82/0x180
[   24.211801]  ? preempt_count_sub+0x50/0x80
[   24.211829]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.211850]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.211874]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.211951]  kthread+0x337/0x6f0
[   24.211972]  ? trace_preempt_on+0x20/0xc0
[   24.211995]  ? __pfx_kthread+0x10/0x10
[   24.212016]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.212038]  ? calculate_sigpending+0x7b/0xa0
[   24.212062]  ? __pfx_kthread+0x10/0x10
[   24.212083]  ret_from_fork+0x116/0x1d0
[   24.212101]  ? __pfx_kthread+0x10/0x10
[   24.212122]  ret_from_fork_asm+0x1a/0x30
[   24.212153]  </TASK>
[   24.212164] 
[   24.220192] Allocated by task 224:
[   24.220377]  kasan_save_stack+0x45/0x70
[   24.220520]  kasan_save_track+0x18/0x40
[   24.220729]  kasan_save_alloc_info+0x3b/0x50
[   24.221180]  __kasan_kmalloc+0xb7/0xc0
[   24.221387]  __kmalloc_cache_noprof+0x189/0x420
[   24.221576]  kmalloc_oob_memset_4+0xac/0x330
[   24.221773]  kunit_try_run_case+0x1a5/0x480
[   24.221908]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.222258]  kthread+0x337/0x6f0
[   24.222451]  ret_from_fork+0x116/0x1d0
[   24.222650]  ret_from_fork_asm+0x1a/0x30
[   24.222826] 
[   24.222893] The buggy address belongs to the object at ffff88810456ad00
[   24.222893]  which belongs to the cache kmalloc-128 of size 128
[   24.223291] The buggy address is located 117 bytes inside of
[   24.223291]  allocated 120-byte region [ffff88810456ad00, ffff88810456ad78)
[   24.223846] 
[   24.224028] The buggy address belongs to the physical page:
[   24.224208] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10456a
[   24.224443] flags: 0x200000000000000(node=0|zone=2)
[   24.224672] page_type: f5(slab)
[   24.224963] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   24.225309] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.225803] page dumped because: kasan: bad access detected
[   24.226186] 
[   24.226283] Memory state around the buggy address:
[   24.226497]  ffff88810456ac00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.226845]  ffff88810456ac80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.227228] >ffff88810456ad00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.227494]                                                                 ^
[   24.227715]  ffff88810456ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.228317]  ffff88810456ae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.228875] ==================================================================