Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.398292] ==================================================================
[   30.398448] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   30.398507] Write of size 8 at addr fff00000c3f71d71 by task kunit_try_catch/207
[   30.398582] 
[   30.398895] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.398999] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   30.399081] Hardware name: linux,dummy-virt (DT)
[   30.399141] Call trace:
[   30.399181]  show_stack+0x20/0x38 (C)
[   30.399248]  dump_stack_lvl+0x8c/0xd0
[   30.399337]  print_report+0x118/0x5e8
[   30.399383]  kasan_report+0xdc/0x128
[   30.399442]  kasan_check_range+0x100/0x1a8
[   30.399740]  __asan_memset+0x34/0x78
[   30.399820]  kmalloc_oob_memset_8+0x150/0x2f8
[   30.399879]  kunit_try_run_case+0x170/0x3f0
[   30.399938]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.400091]  kthread+0x328/0x630
[   30.400157]  ret_from_fork+0x10/0x20
[   30.400275] 
[   30.400316] Allocated by task 207:
[   30.400351]  kasan_save_stack+0x3c/0x68
[   30.400409]  kasan_save_track+0x20/0x40
[   30.400451]  kasan_save_alloc_info+0x40/0x58
[   30.400717]  __kasan_kmalloc+0xd4/0xd8
[   30.400779]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.400831]  kmalloc_oob_memset_8+0xb0/0x2f8
[   30.400954]  kunit_try_run_case+0x170/0x3f0
[   30.401055]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.401113]  kthread+0x328/0x630
[   30.401156]  ret_from_fork+0x10/0x20
[   30.401194] 
[   30.401259] The buggy address belongs to the object at fff00000c3f71d00
[   30.401259]  which belongs to the cache kmalloc-128 of size 128
[   30.401326] The buggy address is located 113 bytes inside of
[   30.401326]  allocated 120-byte region [fff00000c3f71d00, fff00000c3f71d78)
[   30.401386] 
[   30.401406] The buggy address belongs to the physical page:
[   30.401443] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f71
[   30.401496] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.401545] page_type: f5(slab)
[   30.401596] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   30.401646] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.401685] page dumped because: kasan: bad access detected
[   30.401716] 
[   30.401742] Memory state around the buggy address:
[   30.401789]  fff00000c3f71c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.402230]  fff00000c3f71c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.402314] >fff00000c3f71d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.402392]                                                                 ^
[   30.402468]  fff00000c3f71d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.402596]  fff00000c3f71e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.402662] ==================================================================

[   25.247183] ==================================================================
[   25.248042] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   25.248654] Write of size 8 at addr ffff8881058a9471 by task kunit_try_catch/224
[   25.249384] 
[   25.249481] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   25.249531] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.249544] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.249572] Call Trace:
[   25.249586]  <TASK>
[   25.249603]  dump_stack_lvl+0x73/0xb0
[   25.249635]  print_report+0xd1/0x640
[   25.249658]  ? __virt_addr_valid+0x1db/0x2d0
[   25.249682]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.249704]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.249730]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.249752]  kasan_report+0x141/0x180
[   25.249774]  ? kmalloc_oob_memset_8+0x166/0x330
[   25.249800]  kasan_check_range+0x10c/0x1c0
[   25.249823]  __asan_memset+0x27/0x50
[   25.249858]  kmalloc_oob_memset_8+0x166/0x330
[   25.249881]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   25.249904]  ? __schedule+0x10da/0x2b60
[   25.249929]  ? __pfx_read_tsc+0x10/0x10
[   25.249951]  ? ktime_get_ts64+0x86/0x230
[   25.249975]  kunit_try_run_case+0x1a5/0x480
[   25.250023]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.250059]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.250084]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.250109]  ? __kthread_parkme+0x82/0x180
[   25.250140]  ? preempt_count_sub+0x50/0x80
[   25.250163]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.250188]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.250211]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.250235]  kthread+0x337/0x6f0
[   25.250254]  ? trace_preempt_on+0x20/0xc0
[   25.250287]  ? __pfx_kthread+0x10/0x10
[   25.250308]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.250330]  ? calculate_sigpending+0x7b/0xa0
[   25.250353]  ? __pfx_kthread+0x10/0x10
[   25.250375]  ret_from_fork+0x116/0x1d0
[   25.250394]  ? __pfx_kthread+0x10/0x10
[   25.250415]  ret_from_fork_asm+0x1a/0x30
[   25.250446]  </TASK>
[   25.250471] 
[   25.261923] Allocated by task 224:
[   25.262081]  kasan_save_stack+0x45/0x70
[   25.262379]  kasan_save_track+0x18/0x40
[   25.262694]  kasan_save_alloc_info+0x3b/0x50
[   25.262952]  __kasan_kmalloc+0xb7/0xc0
[   25.263119]  __kmalloc_cache_noprof+0x189/0x420
[   25.263313]  kmalloc_oob_memset_8+0xac/0x330
[   25.263626]  kunit_try_run_case+0x1a5/0x480
[   25.263940]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.264215]  kthread+0x337/0x6f0
[   25.264441]  ret_from_fork+0x116/0x1d0
[   25.264653]  ret_from_fork_asm+0x1a/0x30
[   25.264790] 
[   25.264878] The buggy address belongs to the object at ffff8881058a9400
[   25.264878]  which belongs to the cache kmalloc-128 of size 128
[   25.265312] The buggy address is located 113 bytes inside of
[   25.265312]  allocated 120-byte region [ffff8881058a9400, ffff8881058a9478)
[   25.266203] 
[   25.266290] The buggy address belongs to the physical page:
[   25.266591] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9
[   25.267076] flags: 0x200000000000000(node=0|zone=2)
[   25.267511] page_type: f5(slab)
[   25.267794] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.268056] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.268577] page dumped because: kasan: bad access detected
[   25.268788] 
[   25.268964] Memory state around the buggy address:
[   25.269224]  ffff8881058a9300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.269580]  ffff8881058a9380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.269963] >ffff8881058a9400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.270318]                                                                 ^
[   25.270755]  ffff8881058a9480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.271048]  ffff8881058a9500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.271445] ==================================================================