Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   24.757316] ==================================================================
[   24.757504] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   24.757646] Write of size 8 at addr fff00000c76cf171 by task kunit_try_catch/178
[   24.757758] 
[   24.757843] CPU: 0 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT 
[   24.758057] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.758211] Hardware name: linux,dummy-virt (DT)
[   24.758330] Call trace:
[   24.758442]  show_stack+0x20/0x38 (C)
[   24.758624]  dump_stack_lvl+0x8c/0xd0
[   24.758755]  print_report+0x118/0x608
[   24.758878]  kasan_report+0xdc/0x128
[   24.758998]  kasan_check_range+0x100/0x1a8
[   24.759125]  __asan_memset+0x34/0x78
[   24.759323]  kmalloc_oob_memset_8+0x150/0x2f8
[   24.759471]  kunit_try_run_case+0x170/0x3f0
[   24.759593]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.759723]  kthread+0x328/0x630
[   24.759832]  ret_from_fork+0x10/0x20
[   24.759945] 
[   24.760028] Allocated by task 178:
[   24.760113]  kasan_save_stack+0x3c/0x68
[   24.760219]  kasan_save_track+0x20/0x40
[   24.760322]  kasan_save_alloc_info+0x40/0x58
[   24.760447]  __kasan_kmalloc+0xd4/0xd8
[   24.760614]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.760758]  kmalloc_oob_memset_8+0xb0/0x2f8
[   24.761019]  kunit_try_run_case+0x170/0x3f0
[   24.761117]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.761235]  kthread+0x328/0x630
[   24.761321]  ret_from_fork+0x10/0x20
[   24.761422] 
[   24.761471] The buggy address belongs to the object at fff00000c76cf100
[   24.761471]  which belongs to the cache kmalloc-128 of size 128
[   24.761592] The buggy address is located 113 bytes inside of
[   24.761592]  allocated 120-byte region [fff00000c76cf100, fff00000c76cf178)
[   24.762244] 
[   24.762626] The buggy address belongs to the physical page:
[   24.762745] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076cf
[   24.763288] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.763426] page_type: f5(slab)
[   24.763833] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   24.763983] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.764673] page dumped because: kasan: bad access detected
[   24.764753] 
[   24.764797] Memory state around the buggy address:
[   24.764871]  fff00000c76cf000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.765365]  fff00000c76cf080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.765680] >fff00000c76cf100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.765996]                                                                 ^
[   24.766225]  fff00000c76cf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.766336]  fff00000c76cf200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.766453] ==================================================================

[   17.369357] ==================================================================
[   17.370444] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   17.371418] Write of size 8 at addr ffff88810a06f671 by task kunit_try_catch/197
[   17.372548] 
[   17.373226] CPU: 1 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   17.373348] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.373383] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   17.373438] Call Trace:
[   17.373475]  <TASK>
[   17.373519]  dump_stack_lvl+0x73/0xb0
[   17.373588]  print_report+0xd1/0x650
[   17.373675]  ? __virt_addr_valid+0x1db/0x2d0
[   17.373765]  ? kmalloc_oob_memset_8+0x166/0x330
[   17.373820]  ? kasan_complete_mode_report_info+0x2a/0x200
[   17.373853]  ? kmalloc_oob_memset_8+0x166/0x330
[   17.373887]  kasan_report+0x141/0x180
[   17.373919]  ? kmalloc_oob_memset_8+0x166/0x330
[   17.373957]  kasan_check_range+0x10c/0x1c0
[   17.373984]  __asan_memset+0x27/0x50
[   17.374012]  kmalloc_oob_memset_8+0x166/0x330
[   17.374045]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   17.374077]  ? __schedule+0x10cc/0x2b60
[   17.374109]  ? __pfx_read_tsc+0x10/0x10
[   17.374137]  ? ktime_get_ts64+0x86/0x230
[   17.374174]  kunit_try_run_case+0x1a5/0x480
[   17.374211]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.374243]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   17.374277]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   17.374309]  ? __kthread_parkme+0x82/0x180
[   17.374339]  ? preempt_count_sub+0x50/0x80
[   17.374402]  ? __pfx_kunit_try_run_case+0x10/0x10
[   17.374440]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.374472]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   17.374504]  kthread+0x337/0x6f0
[   17.374525]  ? trace_preempt_on+0x20/0xc0
[   17.374558]  ? __pfx_kthread+0x10/0x10
[   17.374582]  ? _raw_spin_unlock_irq+0x47/0x80
[   17.374714]  ? calculate_sigpending+0x7b/0xa0
[   17.374756]  ? __pfx_kthread+0x10/0x10
[   17.374783]  ret_from_fork+0x41/0x80
[   17.374814]  ? __pfx_kthread+0x10/0x10
[   17.374839]  ret_from_fork_asm+0x1a/0x30
[   17.374881]  </TASK>
[   17.374895] 
[   17.395559] Allocated by task 197:
[   17.395822]  kasan_save_stack+0x45/0x70
[   17.396085]  kasan_save_track+0x18/0x40
[   17.396332]  kasan_save_alloc_info+0x3b/0x50
[   17.396587]  __kasan_kmalloc+0xb7/0xc0
[   17.400768]  __kmalloc_cache_noprof+0x189/0x420
[   17.403285]  kmalloc_oob_memset_8+0xac/0x330
[   17.404819]  kunit_try_run_case+0x1a5/0x480
[   17.406148]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   17.407730]  kthread+0x337/0x6f0
[   17.409000]  ret_from_fork+0x41/0x80
[   17.410651]  ret_from_fork_asm+0x1a/0x30
[   17.412118] 
[   17.413320] The buggy address belongs to the object at ffff88810a06f600
[   17.413320]  which belongs to the cache kmalloc-128 of size 128
[   17.416481] The buggy address is located 113 bytes inside of
[   17.416481]  allocated 120-byte region [ffff88810a06f600, ffff88810a06f678)
[   17.417078] 
[   17.417226] The buggy address belongs to the physical page:
[   17.417514] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a06f
[   17.421912] flags: 0x200000000000000(node=0|zone=2)
[   17.423665] page_type: f5(slab)
[   17.424945] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   17.427295] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.427751] page dumped because: kasan: bad access detected
[   17.428043] 
[   17.428182] Memory state around the buggy address:
[   17.428443]  ffff88810a06f500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.432290]  ffff88810a06f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.434143] >ffff88810a06f600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.436340]                                                                 ^
[   17.438085]  ffff88810a06f680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.438471]  ffff88810a06f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.438847] ==================================================================