Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.721804] ==================================================================
[   33.722070] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   33.722211] Read of size 1 at addr fff00000c64500c8 by task kunit_try_catch/219
[   33.722333] 
[   33.722418] CPU: 1 UID: 0 PID: 219 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   33.722631] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.722697] Hardware name: linux,dummy-virt (DT)
[   33.722783] Call trace:
[   33.722838]  show_stack+0x20/0x38 (C)
[   33.722961]  dump_stack_lvl+0x8c/0xd0
[   33.723096]  print_report+0x118/0x608
[   33.723217]  kasan_report+0xdc/0x128
[   33.723335]  __asan_report_load1_noabort+0x20/0x30
[   33.723457]  kmem_cache_oob+0x344/0x430
[   33.723569]  kunit_try_run_case+0x170/0x3f0
[   33.723756]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.723883]  kthread+0x328/0x630
[   33.723988]  ret_from_fork+0x10/0x20
[   33.730832] 
[   33.731351] Allocated by task 219:
[   33.731445]  kasan_save_stack+0x3c/0x68
[   33.731565]  kasan_save_track+0x20/0x40
[   33.731666]  kasan_save_alloc_info+0x40/0x58
[   33.731825]  __kasan_slab_alloc+0xa8/0xb0
[   33.731963]  kmem_cache_alloc_noprof+0x10c/0x398
[   33.732091]  kmem_cache_oob+0x12c/0x430
[   33.732180]  kunit_try_run_case+0x170/0x3f0
[   33.732275]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.732721]  kthread+0x328/0x630
[   33.732827]  ret_from_fork+0x10/0x20
[   33.732941] 
[   33.733053] The buggy address belongs to the object at fff00000c6450000
[   33.733053]  which belongs to the cache test_cache of size 200
[   33.733249] The buggy address is located 0 bytes to the right of
[   33.733249]  allocated 200-byte region [fff00000c6450000, fff00000c64500c8)
[   33.733657] 
[   33.733789] The buggy address belongs to the physical page:
[   33.733864] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106450
[   33.733990] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.734129] page_type: f5(slab)
[   33.734315] raw: 0bfffe0000000000 fff00000c5641640 dead000000000122 0000000000000000
[   33.734509] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   33.734898] page dumped because: kasan: bad access detected
[   33.735044] 
[   33.736294] Memory state around the buggy address:
[   33.736383]  fff00000c644ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.736486]  fff00000c6450000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.736588] >fff00000c6450080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   33.737159]                                               ^
[   33.737456]  fff00000c6450100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.737773]  fff00000c6450180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.738425] ==================================================================

[   22.487307] ==================================================================
[   22.487778] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   22.488489] Read of size 1 at addr ffff8881023c20c8 by task kunit_try_catch/236
[   22.488765] 
[   22.488951] CPU: 0 UID: 0 PID: 236 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   22.489033] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.489055] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.489088] Call Trace:
[   22.489110]  <TASK>
[   22.489138]  dump_stack_lvl+0x73/0xb0
[   22.489189]  print_report+0xd1/0x650
[   22.489220]  ? __virt_addr_valid+0x1db/0x2d0
[   22.489261]  ? kmem_cache_oob+0x402/0x530
[   22.489300]  ? kasan_complete_mode_report_info+0x2a/0x200
[   22.489339]  ? kmem_cache_oob+0x402/0x530
[   22.489374]  kasan_report+0x141/0x180
[   22.489426]  ? kmem_cache_oob+0x402/0x530
[   22.489465]  __asan_report_load1_noabort+0x18/0x20
[   22.489503]  kmem_cache_oob+0x402/0x530
[   22.489533]  ? trace_hardirqs_on+0x37/0xe0
[   22.489572]  ? __pfx_kmem_cache_oob+0x10/0x10
[   22.489605]  ? finish_task_switch.isra.0+0x153/0x700
[   22.489642]  ? __switch_to+0x47/0xf50
[   22.489686]  ? __pfx_read_tsc+0x10/0x10
[   22.489718]  ? ktime_get_ts64+0x86/0x230
[   22.489759]  kunit_try_run_case+0x1a5/0x480
[   22.489798]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.489834]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.489874]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.489910]  ? __kthread_parkme+0x82/0x180
[   22.489940]  ? preempt_count_sub+0x50/0x80
[   22.489976]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.490023]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.490101]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.490169]  kthread+0x337/0x6f0
[   22.490249]  ? trace_preempt_on+0x20/0xc0
[   22.490273]  ? __pfx_kthread+0x10/0x10
[   22.490293]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.490313]  ? calculate_sigpending+0x7b/0xa0
[   22.490337]  ? __pfx_kthread+0x10/0x10
[   22.490356]  ret_from_fork+0x116/0x1d0
[   22.490374]  ? __pfx_kthread+0x10/0x10
[   22.490416]  ret_from_fork_asm+0x1a/0x30
[   22.490446]  </TASK>
[   22.490459] 
[   22.499958] Allocated by task 236:
[   22.500288]  kasan_save_stack+0x45/0x70
[   22.500476]  kasan_save_track+0x18/0x40
[   22.500711]  kasan_save_alloc_info+0x3b/0x50
[   22.500975]  __kasan_slab_alloc+0x91/0xa0
[   22.501280]  kmem_cache_alloc_noprof+0x123/0x3f0
[   22.501577]  kmem_cache_oob+0x157/0x530
[   22.501861]  kunit_try_run_case+0x1a5/0x480
[   22.502189]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.502523]  kthread+0x337/0x6f0
[   22.502675]  ret_from_fork+0x116/0x1d0
[   22.502853]  ret_from_fork_asm+0x1a/0x30
[   22.503020] 
[   22.503122] The buggy address belongs to the object at ffff8881023c2000
[   22.503122]  which belongs to the cache test_cache of size 200
[   22.503858] The buggy address is located 0 bytes to the right of
[   22.503858]  allocated 200-byte region [ffff8881023c2000, ffff8881023c20c8)
[   22.504629] 
[   22.504720] The buggy address belongs to the physical page:
[   22.504897] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023c2
[   22.505350] flags: 0x200000000000000(node=0|zone=2)
[   22.506335] page_type: f5(slab)
[   22.506620] raw: 0200000000000000 ffff8881009aec80 dead000000000122 0000000000000000
[   22.507002] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   22.507432] page dumped because: kasan: bad access detected
[   22.507742] 
[   22.507910] Memory state around the buggy address:
[   22.508268]  ffff8881023c1f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.508479]  ffff8881023c2000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.508694] >ffff8881023c2080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   22.508900]                                               ^
[   22.509242]  ffff8881023c2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.509705]  ffff8881023c2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.510207] ==================================================================