Hay
Date
July 12, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.014643] ==================================================================
[   20.014896] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   20.015119] Read of size 1 at addr fff00000c59aa0c8 by task kunit_try_catch/208
[   20.015301] 
[   20.015426] CPU: 0 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   20.015666] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.015770] Hardware name: linux,dummy-virt (DT)
[   20.015872] Call trace:
[   20.015920]  show_stack+0x20/0x38 (C)
[   20.016040]  dump_stack_lvl+0x8c/0xd0
[   20.016318]  print_report+0x118/0x608
[   20.016644]  kasan_report+0xdc/0x128
[   20.016887]  __asan_report_load1_noabort+0x20/0x30
[   20.017049]  kmem_cache_oob+0x344/0x430
[   20.017237]  kunit_try_run_case+0x170/0x3f0
[   20.017371]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.017502]  kthread+0x328/0x630
[   20.017795]  ret_from_fork+0x10/0x20
[   20.017915] 
[   20.017942] Allocated by task 208:
[   20.017981]  kasan_save_stack+0x3c/0x68
[   20.018034]  kasan_save_track+0x20/0x40
[   20.018078]  kasan_save_alloc_info+0x40/0x58
[   20.018122]  __kasan_slab_alloc+0xa8/0xb0
[   20.018166]  kmem_cache_alloc_noprof+0x10c/0x398
[   20.018210]  kmem_cache_oob+0x12c/0x430
[   20.018251]  kunit_try_run_case+0x170/0x3f0
[   20.018294]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.018343]  kthread+0x328/0x630
[   20.018379]  ret_from_fork+0x10/0x20
[   20.018419] 
[   20.018440] The buggy address belongs to the object at fff00000c59aa000
[   20.018440]  which belongs to the cache test_cache of size 200
[   20.018504] The buggy address is located 0 bytes to the right of
[   20.018504]  allocated 200-byte region [fff00000c59aa000, fff00000c59aa0c8)
[   20.018589] 
[   20.018614] The buggy address belongs to the physical page:
[   20.018650] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059aa
[   20.018743] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.018808] page_type: f5(slab)
[   20.018929] raw: 0bfffe0000000000 fff00000c5801640 dead000000000122 0000000000000000
[   20.019069] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   20.019856] page dumped because: kasan: bad access detected
[   20.019926] 
[   20.019964] Memory state around the buggy address:
[   20.020037]  fff00000c59a9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.020199]  fff00000c59aa000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.020498] >fff00000c59aa080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   20.020649]                                               ^
[   20.020926]  fff00000c59aa100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.021031]  fff00000c59aa180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.021124] ==================================================================

[   13.257833] ==================================================================
[   13.258273] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.258553] Read of size 1 at addr ffff888103ac30c8 by task kunit_try_catch/225
[   13.258923] 
[   13.259055] CPU: 0 UID: 0 PID: 225 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.259145] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.259156] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.259176] Call Trace:
[   13.259188]  <TASK>
[   13.259204]  dump_stack_lvl+0x73/0xb0
[   13.259232]  print_report+0xd1/0x650
[   13.259254]  ? __virt_addr_valid+0x1db/0x2d0
[   13.259278]  ? kmem_cache_oob+0x402/0x530
[   13.259300]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.259323]  ? kmem_cache_oob+0x402/0x530
[   13.259345]  kasan_report+0x141/0x180
[   13.259366]  ? kmem_cache_oob+0x402/0x530
[   13.259393]  __asan_report_load1_noabort+0x18/0x20
[   13.259418]  kmem_cache_oob+0x402/0x530
[   13.259452]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.259474]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   13.259503]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.259530]  kunit_try_run_case+0x1a5/0x480
[   13.259554]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.259577]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.259600]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.259624]  ? __kthread_parkme+0x82/0x180
[   13.259656]  ? preempt_count_sub+0x50/0x80
[   13.259681]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.259705]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.259729]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.259765]  kthread+0x337/0x6f0
[   13.259784]  ? trace_preempt_on+0x20/0xc0
[   13.259808]  ? __pfx_kthread+0x10/0x10
[   13.259829]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.259850]  ? calculate_sigpending+0x7b/0xa0
[   13.259873]  ? __pfx_kthread+0x10/0x10
[   13.259894]  ret_from_fork+0x116/0x1d0
[   13.259913]  ? __pfx_kthread+0x10/0x10
[   13.259933]  ret_from_fork_asm+0x1a/0x30
[   13.259963]  </TASK>
[   13.259974] 
[   13.274206] Allocated by task 225:
[   13.274393]  kasan_save_stack+0x45/0x70
[   13.274539]  kasan_save_track+0x18/0x40
[   13.274742]  kasan_save_alloc_info+0x3b/0x50
[   13.275156]  __kasan_slab_alloc+0x91/0xa0
[   13.275536]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.276103]  kmem_cache_oob+0x157/0x530
[   13.276460]  kunit_try_run_case+0x1a5/0x480
[   13.276888]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.277085]  kthread+0x337/0x6f0
[   13.277203]  ret_from_fork+0x116/0x1d0
[   13.277333]  ret_from_fork_asm+0x1a/0x30
[   13.277467] 
[   13.277535] The buggy address belongs to the object at ffff888103ac3000
[   13.277535]  which belongs to the cache test_cache of size 200
[   13.278460] The buggy address is located 0 bytes to the right of
[   13.278460]  allocated 200-byte region [ffff888103ac3000, ffff888103ac30c8)
[   13.279843] 
[   13.280006] The buggy address belongs to the physical page:
[   13.280473] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ac3
[   13.281242] flags: 0x200000000000000(node=0|zone=2)
[   13.281575] page_type: f5(slab)
[   13.281941] raw: 0200000000000000 ffff888101342280 dead000000000122 0000000000000000
[   13.282533] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.283069] page dumped because: kasan: bad access detected
[   13.283558] 
[   13.283727] Memory state around the buggy address:
[   13.284226]  ffff888103ac2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.284958]  ffff888103ac3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.285176] >ffff888103ac3080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.285381]                                               ^
[   13.285545]  ffff888103ac3100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.285778]  ffff888103ac3180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.286198] ==================================================================