Hay
Date
July 4, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.964986] ==================================================================
[   29.965048] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   29.965173] Read of size 1 at addr fff00000c9b130c8 by task kunit_try_catch/240
[   29.965242] 
[   29.965707] CPU: 0 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT 
[   29.965908] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.965977] Hardware name: linux,dummy-virt (DT)
[   29.966165] Call trace:
[   29.966191]  show_stack+0x20/0x38 (C)
[   29.966256]  dump_stack_lvl+0x8c/0xd0
[   29.966835]  print_report+0x118/0x608
[   29.966975]  kasan_report+0xdc/0x128
[   29.967135]  __asan_report_load1_noabort+0x20/0x30
[   29.967302]  kmem_cache_oob+0x344/0x430
[   29.967448]  kunit_try_run_case+0x170/0x3f0
[   29.967817]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.967931]  kthread+0x328/0x630
[   29.968126]  ret_from_fork+0x10/0x20
[   29.968396] 
[   29.968417] Allocated by task 240:
[   29.968705]  kasan_save_stack+0x3c/0x68
[   29.968776]  kasan_save_track+0x20/0x40
[   29.969015]  kasan_save_alloc_info+0x40/0x58
[   29.969126]  __kasan_slab_alloc+0xa8/0xb0
[   29.969243]  kmem_cache_alloc_noprof+0x10c/0x398
[   29.969318]  kmem_cache_oob+0x12c/0x430
[   29.969639]  kunit_try_run_case+0x170/0x3f0
[   29.969786]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.969834]  kthread+0x328/0x630
[   29.969868]  ret_from_fork+0x10/0x20
[   29.969950] 
[   29.970248] The buggy address belongs to the object at fff00000c9b13000
[   29.970248]  which belongs to the cache test_cache of size 200
[   29.970432] The buggy address is located 0 bytes to the right of
[   29.970432]  allocated 200-byte region [fff00000c9b13000, fff00000c9b130c8)
[   29.970676] 
[   29.970713] The buggy address belongs to the physical page:
[   29.970908] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b13
[   29.971272] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.971354] page_type: f5(slab)
[   29.971460] raw: 0bfffe0000000000 fff00000c45b3640 dead000000000122 0000000000000000
[   29.971613] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   29.971982] page dumped because: kasan: bad access detected
[   29.972168] 
[   29.972251] Memory state around the buggy address:
[   29.972401]  fff00000c9b12f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   29.972503]  fff00000c9b13000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   29.972555] >fff00000c9b13080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   29.972660]                                               ^
[   29.972698]  fff00000c9b13100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.972754]  fff00000c9b13180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.972806] ==================================================================

[   25.620406] ==================================================================
[   25.620928] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   25.621174] Read of size 1 at addr ffff888105ab60c8 by task kunit_try_catch/256
[   25.621413] 
[   25.621509] CPU: 0 UID: 0 PID: 256 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) 
[   25.621565] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.621578] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.621603] Call Trace:
[   25.621617]  <TASK>
[   25.621640]  dump_stack_lvl+0x73/0xb0
[   25.621670]  print_report+0xd1/0x650
[   25.621693]  ? __virt_addr_valid+0x1db/0x2d0
[   25.621719]  ? kmem_cache_oob+0x402/0x530
[   25.621742]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.621769]  ? kmem_cache_oob+0x402/0x530
[   25.621792]  kasan_report+0x141/0x180
[   25.621814]  ? kmem_cache_oob+0x402/0x530
[   25.621842]  __asan_report_load1_noabort+0x18/0x20
[   25.621866]  kmem_cache_oob+0x402/0x530
[   25.621887]  ? trace_hardirqs_on+0x37/0xe0
[   25.621914]  ? __pfx_kmem_cache_oob+0x10/0x10
[   25.621936]  ? finish_task_switch.isra.0+0x153/0x700
[   25.621960]  ? __switch_to+0x47/0xf50
[   25.621991]  ? __pfx_read_tsc+0x10/0x10
[   25.622014]  ? ktime_get_ts64+0x86/0x230
[   25.622041]  kunit_try_run_case+0x1a5/0x480
[   25.622069]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.622094]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.622120]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.622145]  ? __kthread_parkme+0x82/0x180
[   25.622166]  ? preempt_count_sub+0x50/0x80
[   25.622190]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.622216]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.622242]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.622267]  kthread+0x337/0x6f0
[   25.622287]  ? trace_preempt_on+0x20/0xc0
[   25.622310]  ? __pfx_kthread+0x10/0x10
[   25.622331]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.622354]  ? calculate_sigpending+0x7b/0xa0
[   25.622380]  ? __pfx_kthread+0x10/0x10
[   25.622790]  ret_from_fork+0x116/0x1d0
[   25.622815]  ? __pfx_kthread+0x10/0x10
[   25.622839]  ret_from_fork_asm+0x1a/0x30
[   25.623102]  </TASK>
[   25.623123] 
[   25.636559] Allocated by task 256:
[   25.636761]  kasan_save_stack+0x45/0x70
[   25.637007]  kasan_save_track+0x18/0x40
[   25.637673]  kasan_save_alloc_info+0x3b/0x50
[   25.638041]  __kasan_slab_alloc+0x91/0xa0
[   25.638429]  kmem_cache_alloc_noprof+0x123/0x3f0
[   25.638788]  kmem_cache_oob+0x157/0x530
[   25.639269]  kunit_try_run_case+0x1a5/0x480
[   25.639633]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.640008]  kthread+0x337/0x6f0
[   25.640496]  ret_from_fork+0x116/0x1d0
[   25.640708]  ret_from_fork_asm+0x1a/0x30
[   25.640998] 
[   25.641098] The buggy address belongs to the object at ffff888105ab6000
[   25.641098]  which belongs to the cache test_cache of size 200
[   25.641808] The buggy address is located 0 bytes to the right of
[   25.641808]  allocated 200-byte region [ffff888105ab6000, ffff888105ab60c8)
[   25.642427] 
[   25.642594] The buggy address belongs to the physical page:
[   25.642844] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ab6
[   25.643539] flags: 0x200000000000000(node=0|zone=2)
[   25.643764] page_type: f5(slab)
[   25.644016] raw: 0200000000000000 ffff888101d9e140 dead000000000122 0000000000000000
[   25.644531] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   25.644882] page dumped because: kasan: bad access detected
[   25.645485] 
[   25.645577] Memory state around the buggy address:
[   25.645960]  ffff888105ab5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.646403]  ffff888105ab6000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   25.646856] >ffff888105ab6080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   25.647310]                                               ^
[   25.647812]  ffff888105ab6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.648241]  ffff888105ab6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.648506] ==================================================================