Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.836440] ==================================================================
[   19.836510] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   19.836696] Read of size 1 at addr fff00000c64640c8 by task kunit_try_catch/207
[   19.836782] 
[   19.836830] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.836912] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.836951] Hardware name: linux,dummy-virt (DT)
[   19.836984] Call trace:
[   19.837005]  show_stack+0x20/0x38 (C)
[   19.837078]  dump_stack_lvl+0x8c/0xd0
[   19.837130]  print_report+0x118/0x608
[   19.837200]  kasan_report+0xdc/0x128
[   19.837246]  __asan_report_load1_noabort+0x20/0x30
[   19.837603]  kmem_cache_oob+0x344/0x430
[   19.837671]  kunit_try_run_case+0x170/0x3f0
[   19.837760]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.837836]  kthread+0x328/0x630
[   19.837881]  ret_from_fork+0x10/0x20
[   19.837957] 
[   19.837975] Allocated by task 207:
[   19.839460]  kasan_save_stack+0x3c/0x68
[   19.839516]  kasan_save_track+0x20/0x40
[   19.839553]  kasan_save_alloc_info+0x40/0x58
[   19.839593]  __kasan_slab_alloc+0xa8/0xb0
[   19.839628]  kmem_cache_alloc_noprof+0x10c/0x398
[   19.839669]  kmem_cache_oob+0x12c/0x430
[   19.839704]  kunit_try_run_case+0x170/0x3f0
[   19.839752]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.839795]  kthread+0x328/0x630
[   19.839827]  ret_from_fork+0x10/0x20
[   19.839863] 
[   19.839882] The buggy address belongs to the object at fff00000c6464000
[   19.839882]  which belongs to the cache test_cache of size 200
[   19.839940] The buggy address is located 0 bytes to the right of
[   19.839940]  allocated 200-byte region [fff00000c6464000, fff00000c64640c8)
[   19.840007] 
[   19.840028] The buggy address belongs to the physical page:
[   19.840059] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106464
[   19.840119] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.840167] page_type: f5(slab)
[   19.840205] raw: 0bfffe0000000000 fff00000c563c3c0 dead000000000122 0000000000000000
[   19.840261] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   19.840305] page dumped because: kasan: bad access detected
[   19.840337] 
[   19.840354] Memory state around the buggy address:
[   19.840387]  fff00000c6463f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.840430]  fff00000c6464000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.840472] >fff00000c6464080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   19.840508]                                               ^
[   19.840542]  fff00000c6464100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.840583]  fff00000c6464180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.840620] ==================================================================

[   13.609316] ==================================================================
[   13.610526] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.610761] Read of size 1 at addr ffff8881026160c8 by task kunit_try_catch/224
[   13.610978] 
[   13.611374] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.611725] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.611742] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.611765] Call Trace:
[   13.611779]  <TASK>
[   13.611797]  dump_stack_lvl+0x73/0xb0
[   13.611830]  print_report+0xd1/0x650
[   13.611851]  ? __virt_addr_valid+0x1db/0x2d0
[   13.611873]  ? kmem_cache_oob+0x402/0x530
[   13.611894]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.611919]  ? kmem_cache_oob+0x402/0x530
[   13.611940]  kasan_report+0x141/0x180
[   13.611961]  ? kmem_cache_oob+0x402/0x530
[   13.611987]  __asan_report_load1_noabort+0x18/0x20
[   13.612010]  kmem_cache_oob+0x402/0x530
[   13.612032]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.612065]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   13.612094]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.612119]  kunit_try_run_case+0x1a5/0x480
[   13.612143]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.612164]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.612186]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.612208]  ? __kthread_parkme+0x82/0x180
[   13.612227]  ? preempt_count_sub+0x50/0x80
[   13.612250]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.612272]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.612293]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.612314]  kthread+0x337/0x6f0
[   13.612332]  ? trace_preempt_on+0x20/0xc0
[   13.612354]  ? __pfx_kthread+0x10/0x10
[   13.612373]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.612392]  ? calculate_sigpending+0x7b/0xa0
[   13.612415]  ? __pfx_kthread+0x10/0x10
[   13.612435]  ret_from_fork+0x116/0x1d0
[   13.612452]  ? __pfx_kthread+0x10/0x10
[   13.612471]  ret_from_fork_asm+0x1a/0x30
[   13.612502]  </TASK>
[   13.612513] 
[   13.626015] Allocated by task 224:
[   13.626522]  kasan_save_stack+0x45/0x70
[   13.626743]  kasan_save_track+0x18/0x40
[   13.627057]  kasan_save_alloc_info+0x3b/0x50
[   13.627320]  __kasan_slab_alloc+0x91/0xa0
[   13.627707]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.627919]  kmem_cache_oob+0x157/0x530
[   13.628198]  kunit_try_run_case+0x1a5/0x480
[   13.628531]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.628972]  kthread+0x337/0x6f0
[   13.629258]  ret_from_fork+0x116/0x1d0
[   13.629416]  ret_from_fork_asm+0x1a/0x30
[   13.629785] 
[   13.630006] The buggy address belongs to the object at ffff888102616000
[   13.630006]  which belongs to the cache test_cache of size 200
[   13.630946] The buggy address is located 0 bytes to the right of
[   13.630946]  allocated 200-byte region [ffff888102616000, ffff8881026160c8)
[   13.631736] 
[   13.631912] The buggy address belongs to the physical page:
[   13.632142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102616
[   13.632889] flags: 0x200000000000000(node=0|zone=2)
[   13.633220] page_type: f5(slab)
[   13.633563] raw: 0200000000000000 ffff888101f21140 dead000000000122 0000000000000000
[   13.633910] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.634602] page dumped because: kasan: bad access detected
[   13.634936] 
[   13.635267] Memory state around the buggy address:
[   13.635505]  ffff888102615f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.635859]  ffff888102616000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.636456] >ffff888102616080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.636822]                                               ^
[   13.637108]  ffff888102616100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.637679]  ffff888102616180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.637991] ==================================================================