Hay
Date
May 26, 2025, 9:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   18.161746] ==================================================================
[   18.162895] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   18.163466] Read of size 1 at addr fff00000c79490c8 by task kunit_try_catch/207
[   18.163616] 
[   18.163707] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT 
[   18.163904] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.163959] Hardware name: linux,dummy-virt (DT)
[   18.164020] Call trace:
[   18.164101]  show_stack+0x20/0x38 (C)
[   18.164231]  dump_stack_lvl+0x8c/0xd0
[   18.164395]  print_report+0x118/0x608
[   18.164529]  kasan_report+0xdc/0x128
[   18.164650]  __asan_report_load1_noabort+0x20/0x30
[   18.165650]  kmem_cache_oob+0x344/0x430
[   18.165808]  kunit_try_run_case+0x170/0x3f0
[   18.166214]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.166532]  kthread+0x328/0x630
[   18.166673]  ret_from_fork+0x10/0x20
[   18.167092] 
[   18.167400] Allocated by task 207:
[   18.167930]  kasan_save_stack+0x3c/0x68
[   18.168400]  kasan_save_track+0x20/0x40
[   18.169544]  kasan_save_alloc_info+0x40/0x58
[   18.169675]  __kasan_slab_alloc+0xa8/0xb0
[   18.171206]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   18.171570]  kmem_cache_oob+0x12c/0x430
[   18.171685]  kunit_try_run_case+0x170/0x3f0
[   18.172250]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.172481]  kthread+0x328/0x630
[   18.172716]  ret_from_fork+0x10/0x20
[   18.173221] 
[   18.173293] The buggy address belongs to the object at fff00000c7949000
[   18.173293]  which belongs to the cache test_cache of size 200
[   18.173452] The buggy address is located 0 bytes to the right of
[   18.173452]  allocated 200-byte region [fff00000c7949000, fff00000c79490c8)
[   18.174713] 
[   18.175167] The buggy address belongs to the physical page:
[   18.175248] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107949
[   18.175643] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.175815] page_type: f5(slab)
[   18.175912] raw: 0bfffe0000000000 fff00000c3e3cc80 dead000000000122 0000000000000000
[   18.176028] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   18.176129] page dumped because: kasan: bad access detected
[   18.177547] 
[   18.177740] Memory state around the buggy address:
[   18.178067]  fff00000c7948f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.178224]  fff00000c7949000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.178351] >fff00000c7949080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   18.178442]                                               ^
[   18.178524]  fff00000c7949100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.178624]  fff00000c7949180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.178714] ==================================================================


[   11.623130] ==================================================================
[   11.623937] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   11.624170] Read of size 1 at addr ffff88810282f0c8 by task kunit_try_catch/225
[   11.624406] 
[   11.624499] CPU: 0 UID: 0 PID: 225 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) 
[   11.624544] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.624556] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.624579] Call Trace:
[   11.624592]  <TASK>
[   11.624609]  dump_stack_lvl+0x73/0xb0
[   11.624635]  print_report+0xd1/0x650
[   11.624657]  ? __virt_addr_valid+0x1db/0x2d0
[   11.624679]  ? kmem_cache_oob+0x402/0x530
[   11.624697]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.624718]  ? kmem_cache_oob+0x402/0x530
[   11.624736]  kasan_report+0x141/0x180
[   11.624759]  ? kmem_cache_oob+0x402/0x530
[   11.624782]  __asan_report_load1_noabort+0x18/0x20
[   11.624802]  kmem_cache_oob+0x402/0x530
[   11.624819]  ? trace_hardirqs_on+0x37/0xe0
[   11.624842]  ? __pfx_kmem_cache_oob+0x10/0x10
[   11.624860]  ? finish_task_switch.isra.0+0x153/0x700
[   11.624881]  ? __switch_to+0x47/0xf50
[   11.624910]  ? __pfx_read_tsc+0x10/0x10
[   11.624929]  ? ktime_get_ts64+0x86/0x230
[   11.624953]  kunit_try_run_case+0x1a5/0x480
[   11.624974]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.624993]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.625017]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.625040]  ? __kthread_parkme+0x82/0x180
[   11.625060]  ? preempt_count_sub+0x50/0x80
[   11.625082]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.625101]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.625124]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.625147]  kthread+0x337/0x6f0
[   11.625166]  ? trace_preempt_on+0x20/0xc0
[   11.625187]  ? __pfx_kthread+0x10/0x10
[   11.625206]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.625228]  ? calculate_sigpending+0x7b/0xa0
[   11.625251]  ? __pfx_kthread+0x10/0x10
[   11.625271]  ret_from_fork+0x116/0x1d0
[   11.625288]  ? __pfx_kthread+0x10/0x10
[   11.625308]  ret_from_fork_asm+0x1a/0x30
[   11.625338]  </TASK>
[   11.625348] 
[   11.641216] Allocated by task 225:
[   11.641570]  kasan_save_stack+0x45/0x70
[   11.642117]  kasan_save_track+0x18/0x40
[   11.642499]  kasan_save_alloc_info+0x3b/0x50
[   11.642651]  __kasan_slab_alloc+0x91/0xa0
[   11.642980]  kmem_cache_alloc_noprof+0x123/0x3f0
[   11.643498]  kmem_cache_oob+0x157/0x530
[   11.643896]  kunit_try_run_case+0x1a5/0x480
[   11.644305]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.644611]  kthread+0x337/0x6f0
[   11.644755]  ret_from_fork+0x116/0x1d0
[   11.645200]  ret_from_fork_asm+0x1a/0x30
[   11.645602] 
[   11.645765] The buggy address belongs to the object at ffff88810282f000
[   11.645765]  which belongs to the cache test_cache of size 200
[   11.646805] The buggy address is located 0 bytes to the right of
[   11.646805]  allocated 200-byte region [ffff88810282f000, ffff88810282f0c8)
[   11.647692] 
[   11.647972] The buggy address belongs to the physical page:
[   11.648492] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10282f
[   11.648763] flags: 0x200000000000000(node=0|zone=2)
[   11.649319] page_type: f5(slab)
[   11.649657] raw: 0200000000000000 ffff88810189c780 dead000000000122 0000000000000000
[   11.650475] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   11.650909] page dumped because: kasan: bad access detected
[   11.651317] 
[   11.651490] Memory state around the buggy address:
[   11.652003]  ffff88810282ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.652523]  ffff88810282f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.652799] >ffff88810282f080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   11.653546]                                               ^
[   11.654167]  ffff88810282f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.654840]  ffff88810282f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.655163] ==================================================================