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

Environment
qemu-arm64
qemu-x86_64

[   17.045722] ==================================================================
[   17.045801] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   17.045859] Read of size 1 at addr fff00000c78a40c8 by task kunit_try_catch/207
[   17.045911] 
[   17.045959] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   17.046045] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.046073] Hardware name: linux,dummy-virt (DT)
[   17.046105] Call trace:
[   17.046127]  show_stack+0x20/0x38 (C)
[   17.046791]  dump_stack_lvl+0x8c/0xd0
[   17.046862]  print_report+0x118/0x5d0
[   17.046920]  kasan_report+0xdc/0x128
[   17.046978]  __asan_report_load1_noabort+0x20/0x30
[   17.047032]  kmem_cache_oob+0x344/0x430
[   17.047077]  kunit_try_run_case+0x170/0x3f0
[   17.047181]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.047284]  kthread+0x328/0x630
[   17.047629]  ret_from_fork+0x10/0x20
[   17.047819] 
[   17.047888] Allocated by task 207:
[   17.048000]  kasan_save_stack+0x3c/0x68
[   17.048103]  kasan_save_track+0x20/0x40
[   17.048278]  kasan_save_alloc_info+0x40/0x58
[   17.048375]  __kasan_slab_alloc+0xa8/0xb0
[   17.048809]  kmem_cache_alloc_noprof+0x10c/0x398
[   17.048901]  kmem_cache_oob+0x12c/0x430
[   17.048961]  kunit_try_run_case+0x170/0x3f0
[   17.049100]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.049258]  kthread+0x328/0x630
[   17.049405]  ret_from_fork+0x10/0x20
[   17.049508] 
[   17.049529] The buggy address belongs to the object at fff00000c78a4000
[   17.049529]  which belongs to the cache test_cache of size 200
[   17.049849] The buggy address is located 0 bytes to the right of
[   17.049849]  allocated 200-byte region [fff00000c78a4000, fff00000c78a40c8)
[   17.050000] 
[   17.050050] The buggy address belongs to the physical page:
[   17.050121] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078a4
[   17.050292] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.050393] page_type: f5(slab)
[   17.050719] raw: 0bfffe0000000000 fff00000c47158c0 dead000000000122 0000000000000000
[   17.050820] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   17.050981] page dumped because: kasan: bad access detected
[   17.051056] 
[   17.051208] Memory state around the buggy address:
[   17.051256]  fff00000c78a3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.051374]  fff00000c78a4000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.051554] >fff00000c78a4080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   17.051617]                                               ^
[   17.051658]  fff00000c78a4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.051702]  fff00000c78a4180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.052101] ==================================================================

[   13.637559] ==================================================================
[   13.638131] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.638500] Read of size 1 at addr ffff888103a590c8 by task kunit_try_catch/224
[   13.638866] 
[   13.638976] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.639318] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.639335] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.639377] Call Trace:
[   13.639391]  <TASK>
[   13.639422]  dump_stack_lvl+0x73/0xb0
[   13.639562]  print_report+0xd1/0x610
[   13.639587]  ? __virt_addr_valid+0x1db/0x2d0
[   13.639611]  ? kmem_cache_oob+0x402/0x530
[   13.639633]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.639656]  ? kmem_cache_oob+0x402/0x530
[   13.639679]  kasan_report+0x141/0x180
[   13.639700]  ? kmem_cache_oob+0x402/0x530
[   13.639727]  __asan_report_load1_noabort+0x18/0x20
[   13.639752]  kmem_cache_oob+0x402/0x530
[   13.639772]  ? trace_hardirqs_on+0x37/0xe0
[   13.639796]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.639819]  ? finish_task_switch.isra.0+0x153/0x700
[   13.639842]  ? __switch_to+0x47/0xf50
[   13.639869]  ? __pfx_read_tsc+0x10/0x10
[   13.639890]  ? ktime_get_ts64+0x86/0x230
[   13.639913]  kunit_try_run_case+0x1a5/0x480
[   13.639938]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.639960]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.640065]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.640090]  ? __kthread_parkme+0x82/0x180
[   13.640111]  ? preempt_count_sub+0x50/0x80
[   13.640134]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.640159]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.640184]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.640209]  kthread+0x337/0x6f0
[   13.640228]  ? trace_preempt_on+0x20/0xc0
[   13.640250]  ? __pfx_kthread+0x10/0x10
[   13.640283]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.640304]  ? calculate_sigpending+0x7b/0xa0
[   13.640329]  ? __pfx_kthread+0x10/0x10
[   13.640351]  ret_from_fork+0x116/0x1d0
[   13.640369]  ? __pfx_kthread+0x10/0x10
[   13.640389]  ret_from_fork_asm+0x1a/0x30
[   13.640420]  </TASK>
[   13.640431] 
[   13.648157] Allocated by task 224:
[   13.648336]  kasan_save_stack+0x45/0x70
[   13.648522]  kasan_save_track+0x18/0x40
[   13.648695]  kasan_save_alloc_info+0x3b/0x50
[   13.648888]  __kasan_slab_alloc+0x91/0xa0
[   13.649133]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.649353]  kmem_cache_oob+0x157/0x530
[   13.649527]  kunit_try_run_case+0x1a5/0x480
[   13.649717]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.649952]  kthread+0x337/0x6f0
[   13.650945]  ret_from_fork+0x116/0x1d0
[   13.651213]  ret_from_fork_asm+0x1a/0x30
[   13.651970] 
[   13.652184] The buggy address belongs to the object at ffff888103a59000
[   13.652184]  which belongs to the cache test_cache of size 200
[   13.652692] The buggy address is located 0 bytes to the right of
[   13.652692]  allocated 200-byte region [ffff888103a59000, ffff888103a590c8)
[   13.653319] 
[   13.653421] The buggy address belongs to the physical page:
[   13.653697] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a59
[   13.654111] flags: 0x200000000000000(node=0|zone=2)
[   13.654392] page_type: f5(slab)
[   13.654519] raw: 0200000000000000 ffff888103a56000 dead000000000122 0000000000000000
[   13.654824] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.655446] page dumped because: kasan: bad access detected
[   13.655664] 
[   13.655758] Memory state around the buggy address:
[   13.656289]  ffff888103a58f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.656613]  ffff888103a59000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.656880] >ffff888103a59080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.657634]                                               ^
[   13.657814]  ffff888103a59100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.658097]  ffff888103a59180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.659338] ==================================================================