Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.661275] ==================================================================
[   22.661974] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   22.662166] Write of size 16 at addr fff00000c76c5269 by task kunit_try_catch/182
[   22.662304] 
[   22.662908] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   22.663137] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.663625] Hardware name: linux,dummy-virt (DT)
[   22.663815] Call trace:
[   22.663908]  show_stack+0x20/0x38 (C)
[   22.664307]  dump_stack_lvl+0x8c/0xd0
[   22.664853]  print_report+0x118/0x608
[   22.665298]  kasan_report+0xdc/0x128
[   22.665667]  kasan_check_range+0x100/0x1a8
[   22.666032]  __asan_memset+0x34/0x78
[   22.666345]  kmalloc_oob_memset_16+0x150/0x2f8
[   22.666708]  kunit_try_run_case+0x170/0x3f0
[   22.666942]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.667099]  kthread+0x328/0x630
[   22.667195]  ret_from_fork+0x10/0x20
[   22.667292] 
[   22.667589] Allocated by task 182:
[   22.667783]  kasan_save_stack+0x3c/0x68
[   22.668328]  kasan_save_track+0x20/0x40
[   22.668477]  kasan_save_alloc_info+0x40/0x58
[   22.668587]  __kasan_kmalloc+0xd4/0xd8
[   22.668682]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.669373]  kmalloc_oob_memset_16+0xb0/0x2f8
[   22.669518]  kunit_try_run_case+0x170/0x3f0
[   22.669870]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.670134]  kthread+0x328/0x630
[   22.670833]  ret_from_fork+0x10/0x20
[   22.670966] 
[   22.671014] The buggy address belongs to the object at fff00000c76c5200
[   22.671014]  which belongs to the cache kmalloc-128 of size 128
[   22.671133] The buggy address is located 105 bytes inside of
[   22.671133]  allocated 120-byte region [fff00000c76c5200, fff00000c76c5278)
[   22.671581] 
[   22.671902] The buggy address belongs to the physical page:
[   22.672457] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076c5
[   22.672681] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.673201] page_type: f5(slab)
[   22.673331] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.673540] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.673635] page dumped because: kasan: bad access detected
[   22.673950] 
[   22.674170] Memory state around the buggy address:
[   22.674265]  fff00000c76c5100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.674487]  fff00000c76c5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.675060] >fff00000c76c5200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.675237]                                                                 ^
[   22.675370]  fff00000c76c5280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.675602]  fff00000c76c5300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.675879] ==================================================================

[   13.887458] ==================================================================
[   13.888432] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   13.888875] Write of size 16 at addr ffff888102d90e69 by task kunit_try_catch/198
[   13.889961] 
[   13.890157] CPU: 1 UID: 0 PID: 198 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   13.890269] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.890286] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.890309] Call Trace:
[   13.890334]  <TASK>
[   13.890355]  dump_stack_lvl+0x73/0xb0
[   13.890408]  print_report+0xd1/0x650
[   13.890441]  ? __virt_addr_valid+0x1db/0x2d0
[   13.890464]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.890486]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.890508]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.890529]  kasan_report+0x141/0x180
[   13.890551]  ? kmalloc_oob_memset_16+0x166/0x330
[   13.890597]  kasan_check_range+0x10c/0x1c0
[   13.890631]  __asan_memset+0x27/0x50
[   13.890658]  kmalloc_oob_memset_16+0x166/0x330
[   13.890689]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   13.890712]  ? __schedule+0x10cc/0x2b30
[   13.890734]  ? __pfx_read_tsc+0x10/0x10
[   13.890755]  ? ktime_get_ts64+0x86/0x230
[   13.890780]  kunit_try_run_case+0x1a5/0x480
[   13.890807]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.890828]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.890853]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.890875]  ? __kthread_parkme+0x82/0x180
[   13.890899]  ? preempt_count_sub+0x50/0x80
[   13.890926]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.890949]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.890973]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.890995]  kthread+0x337/0x6f0
[   13.891013]  ? trace_preempt_on+0x20/0xc0
[   13.891038]  ? __pfx_kthread+0x10/0x10
[   13.891057]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.891078]  ? calculate_sigpending+0x7b/0xa0
[   13.891100]  ? __pfx_kthread+0x10/0x10
[   13.891119]  ret_from_fork+0x41/0x80
[   13.891153]  ? __pfx_kthread+0x10/0x10
[   13.891174]  ret_from_fork_asm+0x1a/0x30
[   13.891206]  </TASK>
[   13.891220] 
[   13.902116] Allocated by task 198:
[   13.902501]  kasan_save_stack+0x45/0x70
[   13.903026]  kasan_save_track+0x18/0x40
[   13.903295]  kasan_save_alloc_info+0x3b/0x50
[   13.903459]  __kasan_kmalloc+0xb7/0xc0
[   13.904876]  __kmalloc_cache_noprof+0x189/0x420
[   13.905260]  kmalloc_oob_memset_16+0xac/0x330
[   13.905429]  kunit_try_run_case+0x1a5/0x480
[   13.905999]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.906295]  kthread+0x337/0x6f0
[   13.906955]  ret_from_fork+0x41/0x80
[   13.907153]  ret_from_fork_asm+0x1a/0x30
[   13.907308] 
[   13.907393] The buggy address belongs to the object at ffff888102d90e00
[   13.907393]  which belongs to the cache kmalloc-128 of size 128
[   13.908532] The buggy address is located 105 bytes inside of
[   13.908532]  allocated 120-byte region [ffff888102d90e00, ffff888102d90e78)
[   13.909493] 
[   13.909739] The buggy address belongs to the physical page:
[   13.909973] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d90
[   13.910674] flags: 0x200000000000000(node=0|zone=2)
[   13.910874] page_type: f5(slab)
[   13.911021] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.911274] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.911504] page dumped because: kasan: bad access detected
[   13.911690] 
[   13.911775] Memory state around the buggy address:
[   13.911941]  ffff888102d90d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.912154]  ffff888102d90d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.912367] >ffff888102d90e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.913423]                                                                 ^
[   13.913938]  ffff888102d90e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.914201]  ffff888102d90f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.914445] ==================================================================