Hay
Date
June 5, 2025, 7:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   26.001872] ==================================================================
[   26.004151] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   26.004398] Read of size 1 at addr fff00000c77970c8 by task kunit_try_catch/207
[   26.004664] 
[   26.004787] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT 
[   26.005222] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.005357] Hardware name: linux,dummy-virt (DT)
[   26.005655] Call trace:
[   26.005717]  show_stack+0x20/0x38 (C)
[   26.005919]  dump_stack_lvl+0x8c/0xd0
[   26.006161]  print_report+0x118/0x608
[   26.006291]  kasan_report+0xdc/0x128
[   26.006847]  __asan_report_load1_noabort+0x20/0x30
[   26.007005]  kmem_cache_oob+0x344/0x430
[   26.007298]  kunit_try_run_case+0x170/0x3f0
[   26.007747]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.007959]  kthread+0x328/0x630
[   26.008180]  ret_from_fork+0x10/0x20
[   26.008346] 
[   26.008398] Allocated by task 207:
[   26.008470]  kasan_save_stack+0x3c/0x68
[   26.009197]  kasan_save_track+0x20/0x40
[   26.009341]  kasan_save_alloc_info+0x40/0x58
[   26.009698]  __kasan_slab_alloc+0xa8/0xb0
[   26.009895]  kmem_cache_alloc_noprof+0x10c/0x398
[   26.010057]  kmem_cache_oob+0x12c/0x430
[   26.010304]  kunit_try_run_case+0x170/0x3f0
[   26.010433]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.011058]  kthread+0x328/0x630
[   26.011769]  ret_from_fork+0x10/0x20
[   26.011935] 
[   26.011983] The buggy address belongs to the object at fff00000c7797000
[   26.011983]  which belongs to the cache test_cache of size 200
[   26.012187] The buggy address is located 0 bytes to the right of
[   26.012187]  allocated 200-byte region [fff00000c7797000, fff00000c77970c8)
[   26.013480] 
[   26.013538] The buggy address belongs to the physical page:
[   26.014001] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107797
[   26.014209] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.014992] page_type: f5(slab)
[   26.015436] raw: 0bfffe0000000000 fff00000c11a6a00 dead000000000122 0000000000000000
[   26.016094] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   26.016703] page dumped because: kasan: bad access detected
[   26.016789] 
[   26.017038] Memory state around the buggy address:
[   26.017139]  fff00000c7796f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.017964]  fff00000c7797000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.018575] >fff00000c7797080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   26.018704]                                               ^
[   26.019197]  fff00000c7797100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.019312]  fff00000c7797180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.020167] ==================================================================


[   12.055856] ==================================================================
[   12.056409] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   12.057509] Read of size 1 at addr ffff888102b3f0c8 by task kunit_try_catch/224
[   12.058733] 
[   12.059274] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT(voluntary) 
[   12.059325] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.059337] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.059359] Call Trace:
[   12.059371]  <TASK>
[   12.059388]  dump_stack_lvl+0x73/0xb0
[   12.059417]  print_report+0xd1/0x650
[   12.059439]  ? __virt_addr_valid+0x1db/0x2d0
[   12.059462]  ? kmem_cache_oob+0x402/0x530
[   12.059484]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.059506]  ? kmem_cache_oob+0x402/0x530
[   12.059528]  kasan_report+0x141/0x180
[   12.059549]  ? kmem_cache_oob+0x402/0x530
[   12.059576]  __asan_report_load1_noabort+0x18/0x20
[   12.059599]  kmem_cache_oob+0x402/0x530
[   12.059627]  ? trace_hardirqs_on+0x37/0xe0
[   12.059651]  ? __pfx_kmem_cache_oob+0x10/0x10
[   12.059673]  ? finish_task_switch.isra.0+0x153/0x700
[   12.059694]  ? __switch_to+0x47/0xf50
[   12.059723]  ? __pfx_read_tsc+0x10/0x10
[   12.059743]  ? ktime_get_ts64+0x86/0x230
[   12.059767]  kunit_try_run_case+0x1a5/0x480
[   12.059789]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.059808]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.059833]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.059857]  ? __kthread_parkme+0x82/0x180
[   12.059876]  ? preempt_count_sub+0x50/0x80
[   12.059907]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.059927]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.059951]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.059974]  kthread+0x337/0x6f0
[   12.059993]  ? trace_preempt_on+0x20/0xc0
[   12.060013]  ? __pfx_kthread+0x10/0x10
[   12.060033]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.060054]  ? calculate_sigpending+0x7b/0xa0
[   12.060078]  ? __pfx_kthread+0x10/0x10
[   12.060098]  ret_from_fork+0x116/0x1d0
[   12.060116]  ? __pfx_kthread+0x10/0x10
[   12.060136]  ret_from_fork_asm+0x1a/0x30
[   12.060166]  </TASK>
[   12.060176] 
[   12.073367] Allocated by task 224:
[   12.073536]  kasan_save_stack+0x45/0x70
[   12.073967]  kasan_save_track+0x18/0x40
[   12.074307]  kasan_save_alloc_info+0x3b/0x50
[   12.074504]  __kasan_slab_alloc+0x91/0xa0
[   12.075024]  kmem_cache_alloc_noprof+0x123/0x3f0
[   12.075251]  kmem_cache_oob+0x157/0x530
[   12.075431]  kunit_try_run_case+0x1a5/0x480
[   12.075618]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.075841]  kthread+0x337/0x6f0
[   12.076345]  ret_from_fork+0x116/0x1d0
[   12.076550]  ret_from_fork_asm+0x1a/0x30
[   12.076795] 
[   12.076866] The buggy address belongs to the object at ffff888102b3f000
[   12.076866]  which belongs to the cache test_cache of size 200
[   12.077613] The buggy address is located 0 bytes to the right of
[   12.077613]  allocated 200-byte region [ffff888102b3f000, ffff888102b3f0c8)
[   12.078254] 
[   12.078360] The buggy address belongs to the physical page:
[   12.078603] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b3f
[   12.078956] flags: 0x200000000000000(node=0|zone=2)
[   12.079199] page_type: f5(slab)
[   12.079428] raw: 0200000000000000 ffff888101b4c8c0 dead000000000122 0000000000000000
[   12.079771] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   12.080279] page dumped because: kasan: bad access detected
[   12.080469] 
[   12.080563] Memory state around the buggy address:
[   12.080884]  ffff888102b3ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.081288]  ffff888102b3f000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.081588] >ffff888102b3f080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   12.081934]                                               ^
[   12.082239]  ffff888102b3f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.082539]  ffff888102b3f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.082859] ==================================================================