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

Environment
qemu-arm64
qemu-x86_64

[   23.743217] ==================================================================
[   23.744375] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x33c/0x428
[   23.745117] Read of size 1 at addr fff00000c64f60c8 by task kunit_try_catch/196
[   23.746442] 
[   23.747013] CPU: 0 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   23.747227] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.747298] Hardware name: linux,dummy-virt (DT)
[   23.747433] Call trace:
[   23.747489]  show_stack+0x20/0x38 (C)
[   23.747609]  dump_stack_lvl+0x8c/0xd0
[   23.747726]  print_report+0x118/0x608
[   23.747846]  kasan_report+0xdc/0x128
[   23.748021]  __asan_report_load1_noabort+0x20/0x30
[   23.748165]  kmem_cache_oob+0x33c/0x428
[   23.748285]  kunit_try_run_case+0x170/0x3f0
[   23.748355]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.748421]  kthread+0x318/0x620
[   23.748478]  ret_from_fork+0x10/0x20
[   23.748539] 
[   23.755354] Allocated by task 196:
[   23.755776]  kasan_save_stack+0x3c/0x68
[   23.756259]  kasan_save_track+0x20/0x40
[   23.756791]  kasan_save_alloc_info+0x40/0x58
[   23.757356]  __kasan_slab_alloc+0xa8/0xb0
[   23.757877]  kmem_cache_alloc_noprof+0x10c/0x398
[   23.758463]  kmem_cache_oob+0x12c/0x428
[   23.758940]  kunit_try_run_case+0x170/0x3f0
[   23.759501]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   23.760205]  kthread+0x318/0x620
[   23.760734]  ret_from_fork+0x10/0x20
[   23.761256] 
[   23.761552] The buggy address belongs to the object at fff00000c64f6000
[   23.761552]  which belongs to the cache test_cache of size 200
[   23.762723] The buggy address is located 0 bytes to the right of
[   23.762723]  allocated 200-byte region [fff00000c64f6000, fff00000c64f60c8)
[   23.763732] 
[   23.764059] The buggy address belongs to the physical page:
[   23.764658] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1064f6
[   23.765413] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   23.766014] page_type: f5(slab)
[   23.766509] raw: 0bfffe0000000000 fff00000c1bcab40 dead000000000122 0000000000000000
[   23.767303] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   23.768020] page dumped because: kasan: bad access detected
[   23.768544] 
[   23.768832] Memory state around the buggy address:
[   23.769423]  fff00000c64f5f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   23.770139]  fff00000c64f6000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   23.770912] >fff00000c64f6080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   23.771698]                                               ^
[   23.772282]  fff00000c64f6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.773050]  fff00000c64f6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.773807] ==================================================================

[   18.549798] ==================================================================
[   18.550413] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x404/0x530
[   18.551084] Read of size 1 at addr ffff8881029850c8 by task kunit_try_catch/215
[   18.551463] 
[   18.551637] CPU: 1 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G    B            N 6.14.11-rc1 #1
[   18.551755] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.551788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.551828] Call Trace:
[   18.551849]  <TASK>
[   18.552024]  dump_stack_lvl+0x73/0xb0
[   18.552133]  print_report+0xd1/0x650
[   18.552184]  ? __virt_addr_valid+0x1db/0x2d0
[   18.552233]  ? kmem_cache_oob+0x404/0x530
[   18.552287]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.552391]  ? kmem_cache_oob+0x404/0x530
[   18.552445]  kasan_report+0x140/0x180
[   18.552492]  ? kmem_cache_oob+0x404/0x530
[   18.552549]  __asan_report_load1_noabort+0x18/0x20
[   18.552607]  kmem_cache_oob+0x404/0x530
[   18.552661]  ? trace_hardirqs_on+0x37/0xe0
[   18.552727]  ? __pfx_kmem_cache_oob+0x10/0x10
[   18.552783]  ? finish_task_switch.isra.0+0x153/0x700
[   18.552842]  ? __switch_to+0x5d9/0xf60
[   18.552936]  ? __pfx_read_tsc+0x10/0x10
[   18.552994]  ? ktime_get_ts64+0x86/0x230
[   18.553046]  kunit_try_run_case+0x1a6/0x480
[   18.553093]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.553130]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   18.553175]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.553218]  ? __kthread_parkme+0x82/0x160
[   18.553260]  ? preempt_count_sub+0x50/0x80
[   18.553291]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.553346]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.553381]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.553414]  kthread+0x324/0x6e0
[   18.553452]  ? trace_preempt_on+0x20/0xc0
[   18.553498]  ? __pfx_kthread+0x10/0x10
[   18.553540]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.553569]  ? calculate_sigpending+0x7b/0xa0
[   18.553598]  ? __pfx_kthread+0x10/0x10
[   18.553626]  ret_from_fork+0x41/0x80
[   18.553651]  ? __pfx_kthread+0x10/0x10
[   18.553679]  ret_from_fork_asm+0x1a/0x30
[   18.553720]  </TASK>
[   18.553735] 
[   18.569317] Allocated by task 215:
[   18.570364]  kasan_save_stack+0x45/0x70
[   18.571395]  kasan_save_track+0x18/0x40
[   18.572004]  kasan_save_alloc_info+0x3b/0x50
[   18.572480]  __kasan_slab_alloc+0x91/0xa0
[   18.572703]  kmem_cache_alloc_noprof+0x124/0x400
[   18.573189]  kmem_cache_oob+0x158/0x530
[   18.573512]  kunit_try_run_case+0x1a6/0x480
[   18.573771]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.574709]  kthread+0x324/0x6e0
[   18.574963]  ret_from_fork+0x41/0x80
[   18.575328]  ret_from_fork_asm+0x1a/0x30
[   18.575940] 
[   18.576155] The buggy address belongs to the object at ffff888102985000
[   18.576155]  which belongs to the cache test_cache of size 200
[   18.577825] The buggy address is located 0 bytes to the right of
[   18.577825]  allocated 200-byte region [ffff888102985000, ffff8881029850c8)
[   18.578943] 
[   18.579086] The buggy address belongs to the physical page:
[   18.579444] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102985
[   18.580826] flags: 0x200000000000000(node=0|zone=2)
[   18.581467] page_type: f5(slab)
[   18.582017] raw: 0200000000000000 ffff888101da9500 dead000000000122 0000000000000000
[   18.582293] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   18.582985] page dumped because: kasan: bad access detected
[   18.583481] 
[   18.583647] Memory state around the buggy address:
[   18.584059]  ffff888102984f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.584637]  ffff888102985000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.585848] >ffff888102985080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   18.586376]                                               ^
[   18.586966]  ffff888102985100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.587974]  ffff888102985180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.588366] ==================================================================