Hay
Date
May 12, 2025, 11:48 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.797512] ==================================================================
[   16.797810] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   16.798051] Write of size 16 at addr fff00000c78d9269 by task kunit_try_catch/178
[   16.798368] 
[   16.798679] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT 
[   16.799063] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.799328] Hardware name: linux,dummy-virt (DT)
[   16.799391] Call trace:
[   16.799455]  show_stack+0x20/0x38 (C)
[   16.799581]  dump_stack_lvl+0x8c/0xd0
[   16.799876]  print_report+0x118/0x608
[   16.800004]  kasan_report+0xdc/0x128
[   16.800115]  kasan_check_range+0x100/0x1a8
[   16.800216]  __asan_memset+0x34/0x78
[   16.800821]  kmalloc_oob_memset_16+0x150/0x2f8
[   16.801061]  kunit_try_run_case+0x170/0x3f0
[   16.801174]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.801297]  kthread+0x328/0x630
[   16.801394]  ret_from_fork+0x10/0x20
[   16.801494] 
[   16.801530] Allocated by task 178:
[   16.801586]  kasan_save_stack+0x3c/0x68
[   16.801994]  kasan_save_track+0x20/0x40
[   16.802211]  kasan_save_alloc_info+0x40/0x58
[   16.802341]  __kasan_kmalloc+0xd4/0xd8
[   16.802582]  __kmalloc_cache_noprof+0x15c/0x3c0
[   16.802678]  kmalloc_oob_memset_16+0xb0/0x2f8
[   16.802754]  kunit_try_run_case+0x170/0x3f0
[   16.802816]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.802894]  kthread+0x328/0x630
[   16.802962]  ret_from_fork+0x10/0x20
[   16.803049] 
[   16.803095] The buggy address belongs to the object at fff00000c78d9200
[   16.803095]  which belongs to the cache kmalloc-128 of size 128
[   16.803220] The buggy address is located 105 bytes inside of
[   16.803220]  allocated 120-byte region [fff00000c78d9200, fff00000c78d9278)
[   16.803786] 
[   16.803848] The buggy address belongs to the physical page:
[   16.804162] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078d9
[   16.804451] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.804660] page_type: f5(slab)
[   16.804862] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.805024] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.805307] page dumped because: kasan: bad access detected
[   16.805586] 
[   16.805710] Memory state around the buggy address:
[   16.805875]  fff00000c78d9100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.805975]  fff00000c78d9180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.806064] >fff00000c78d9200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.806130]                                                                 ^
[   16.806208]  fff00000c78d9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.806296]  fff00000c78d9300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.806378] ==================================================================

[   16.803317] ==================================================================
[   16.803925] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   16.804546] Write of size 16 at addr ffff888102b42869 by task kunit_try_catch/195
[   16.805192] 
[   16.805692] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) 
[   16.805776] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.805791] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.805816] Call Trace:
[   16.805833]  <TASK>
[   16.805856]  dump_stack_lvl+0x73/0xb0
[   16.805912]  print_report+0xd1/0x650
[   16.805953]  ? __virt_addr_valid+0x1db/0x2d0
[   16.805998]  ? kmalloc_oob_memset_16+0x166/0x330
[   16.806037]  ? kasan_complete_mode_report_info+0x2a/0x200
[   16.806080]  ? kmalloc_oob_memset_16+0x166/0x330
[   16.806123]  kasan_report+0x141/0x180
[   16.806162]  ? kmalloc_oob_memset_16+0x166/0x330
[   16.806216]  kasan_check_range+0x10c/0x1c0
[   16.806252]  __asan_memset+0x27/0x50
[   16.806310]  kmalloc_oob_memset_16+0x166/0x330
[   16.806354]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   16.806402]  ? __schedule+0x10cc/0x2b60
[   16.806450]  ? __pfx_read_tsc+0x10/0x10
[   16.806494]  ? ktime_get_ts64+0x86/0x230
[   16.806545]  kunit_try_run_case+0x1a5/0x480
[   16.806597]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.806644]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.806683]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.806736]  ? __kthread_parkme+0x82/0x180
[   16.806759]  ? preempt_count_sub+0x50/0x80
[   16.806783]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.806808]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.806832]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.806856]  kthread+0x337/0x6f0
[   16.806876]  ? trace_preempt_on+0x20/0xc0
[   16.806902]  ? __pfx_kthread+0x10/0x10
[   16.806924]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.806944]  ? calculate_sigpending+0x7b/0xa0
[   16.806971]  ? __pfx_kthread+0x10/0x10
[   16.807002]  ret_from_fork+0x116/0x1d0
[   16.807026]  ? __pfx_kthread+0x10/0x10
[   16.807047]  ret_from_fork_asm+0x1a/0x30
[   16.807079]  </TASK>
[   16.807093] 
[   16.817825] Allocated by task 195:
[   16.818107]  kasan_save_stack+0x45/0x70
[   16.818476]  kasan_save_track+0x18/0x40
[   16.818864]  kasan_save_alloc_info+0x3b/0x50
[   16.819175]  __kasan_kmalloc+0xb7/0xc0
[   16.819491]  __kmalloc_cache_noprof+0x189/0x420
[   16.819889]  kmalloc_oob_memset_16+0xac/0x330
[   16.820179]  kunit_try_run_case+0x1a5/0x480
[   16.820605]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.821041]  kthread+0x337/0x6f0
[   16.821227]  ret_from_fork+0x116/0x1d0
[   16.821575]  ret_from_fork_asm+0x1a/0x30
[   16.821953] 
[   16.822111] The buggy address belongs to the object at ffff888102b42800
[   16.822111]  which belongs to the cache kmalloc-128 of size 128
[   16.822814] The buggy address is located 105 bytes inside of
[   16.822814]  allocated 120-byte region [ffff888102b42800, ffff888102b42878)
[   16.823632] 
[   16.823855] The buggy address belongs to the physical page:
[   16.824230] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b42
[   16.824806] flags: 0x200000000000000(node=0|zone=2)
[   16.825111] page_type: f5(slab)
[   16.825445] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   16.825884] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.826433] page dumped because: kasan: bad access detected
[   16.826774] 
[   16.826978] Memory state around the buggy address:
[   16.827395]  ffff888102b42700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.827865]  ffff888102b42780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.828409] >ffff888102b42800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.828855]                                                                 ^
[   16.829284]  ffff888102b42880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.829823]  ffff888102b42900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.830119] ==================================================================