Hay
Date
July 17, 2025, 10:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.084027] ==================================================================
[   30.085027] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   30.085160] Read of size 1 at addr fff00000c9ace0c8 by task kunit_try_catch/238
[   30.085213] 
[   30.085250] CPU: 1 UID: 0 PID: 238 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT 
[   30.085337] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.085364] Hardware name: linux,dummy-virt (DT)
[   30.085398] Call trace:
[   30.085517]  show_stack+0x20/0x38 (C)
[   30.085608]  dump_stack_lvl+0x8c/0xd0
[   30.086235]  print_report+0x118/0x5d0
[   30.086312]  kasan_report+0xdc/0x128
[   30.087006]  __asan_report_load1_noabort+0x20/0x30
[   30.087625]  kmem_cache_oob+0x344/0x430
[   30.087730]  kunit_try_run_case+0x170/0x3f0
[   30.088414]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.088638]  kthread+0x328/0x630
[   30.088685]  ret_from_fork+0x10/0x20
[   30.088735] 
[   30.088754] Allocated by task 238:
[   30.088783]  kasan_save_stack+0x3c/0x68
[   30.089049]  kasan_save_track+0x20/0x40
[   30.089193]  kasan_save_alloc_info+0x40/0x58
[   30.089545]  __kasan_slab_alloc+0xa8/0xb0
[   30.089624]  kmem_cache_alloc_noprof+0x10c/0x398
[   30.089670]  kmem_cache_oob+0x12c/0x430
[   30.090243]  kunit_try_run_case+0x170/0x3f0
[   30.090622]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.090695]  kthread+0x328/0x630
[   30.091110]  ret_from_fork+0x10/0x20
[   30.091152] 
[   30.091427] The buggy address belongs to the object at fff00000c9ace000
[   30.091427]  which belongs to the cache test_cache of size 200
[   30.091823] The buggy address is located 0 bytes to the right of
[   30.091823]  allocated 200-byte region [fff00000c9ace000, fff00000c9ace0c8)
[   30.092024] 
[   30.092048] The buggy address belongs to the physical page:
[   30.092401] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109ace
[   30.092504] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.092563] page_type: f5(slab)
[   30.092842] raw: 0bfffe0000000000 fff00000c5817140 dead000000000122 0000000000000000
[   30.093049] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   30.093389] page dumped because: kasan: bad access detected
[   30.093426] 
[   30.093691] Memory state around the buggy address:
[   30.094228]  fff00000c9acdf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   30.094468]  fff00000c9ace000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.094731] >fff00000c9ace080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   30.094778]                                               ^
[   30.095320]  fff00000c9ace100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.095631]  fff00000c9ace180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.095679] ==================================================================

[   26.294769] ==================================================================
[   26.295892] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   26.296659] Read of size 1 at addr ffff8881060060c8 by task kunit_try_catch/256
[   26.297468] 
[   26.297739] CPU: 1 UID: 0 PID: 256 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   26.297796] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.297808] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.297829] Call Trace:
[   26.297841]  <TASK>
[   26.297859]  dump_stack_lvl+0x73/0xb0
[   26.297890]  print_report+0xd1/0x610
[   26.297912]  ? __virt_addr_valid+0x1db/0x2d0
[   26.297943]  ? kmem_cache_oob+0x402/0x530
[   26.297964]  ? kasan_complete_mode_report_info+0x2a/0x200
[   26.297988]  ? kmem_cache_oob+0x402/0x530
[   26.298010]  kasan_report+0x141/0x180
[   26.298031]  ? kmem_cache_oob+0x402/0x530
[   26.298058]  __asan_report_load1_noabort+0x18/0x20
[   26.298092]  kmem_cache_oob+0x402/0x530
[   26.298137]  ? __pfx_kmem_cache_oob+0x10/0x10
[   26.298160]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   26.298190]  ? __pfx_kmem_cache_oob+0x10/0x10
[   26.298217]  kunit_try_run_case+0x1a5/0x480
[   26.298285]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.298309]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.298332]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.298354]  ? __kthread_parkme+0x82/0x180
[   26.298378]  ? preempt_count_sub+0x50/0x80
[   26.298401]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.298424]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.298447]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.298469]  kthread+0x337/0x6f0
[   26.298487]  ? trace_preempt_on+0x20/0xc0
[   26.298512]  ? __pfx_kthread+0x10/0x10
[   26.298532]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.298553]  ? calculate_sigpending+0x7b/0xa0
[   26.298577]  ? __pfx_kthread+0x10/0x10
[   26.298597]  ret_from_fork+0x116/0x1d0
[   26.299011]  ? __pfx_kthread+0x10/0x10
[   26.299038]  ret_from_fork_asm+0x1a/0x30
[   26.299070]  </TASK>
[   26.299096] 
[   26.311167] Allocated by task 256:
[   26.311637]  kasan_save_stack+0x45/0x70
[   26.311976]  kasan_save_track+0x18/0x40
[   26.312166]  kasan_save_alloc_info+0x3b/0x50
[   26.312660]  __kasan_slab_alloc+0x91/0xa0
[   26.312974]  kmem_cache_alloc_noprof+0x123/0x3f0
[   26.313208]  kmem_cache_oob+0x157/0x530
[   26.313434]  kunit_try_run_case+0x1a5/0x480
[   26.313626]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.313855]  kthread+0x337/0x6f0
[   26.314012]  ret_from_fork+0x116/0x1d0
[   26.314196]  ret_from_fork_asm+0x1a/0x30
[   26.314507] 
[   26.314591] The buggy address belongs to the object at ffff888106006000
[   26.314591]  which belongs to the cache test_cache of size 200
[   26.315061] The buggy address is located 0 bytes to the right of
[   26.315061]  allocated 200-byte region [ffff888106006000, ffff8881060060c8)
[   26.315843] 
[   26.315942] The buggy address belongs to the physical page:
[   26.316130] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106006
[   26.316587] flags: 0x200000000000000(node=0|zone=2)
[   26.316828] page_type: f5(slab)
[   26.316975] raw: 0200000000000000 ffff8881015d8640 dead000000000122 0000000000000000
[   26.317374] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   26.317641] page dumped because: kasan: bad access detected
[   26.317886] 
[   26.317965] Memory state around the buggy address:
[   26.318181]  ffff888106005f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.318619]  ffff888106006000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.318925] >ffff888106006080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   26.319223]                                               ^
[   26.319573]  ffff888106006100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.319887]  ffff888106006180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.320195] ==================================================================