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

Environment
qemu-arm64
qemu-x86_64

[   20.079320] ==================================================================
[   20.080031] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   20.080363] Read of size 1 at addr fff00000c6e280c8 by task kunit_try_catch/216
[   20.080490] 
[   20.080786] CPU: 0 UID: 0 PID: 216 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT 
[   20.081445] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.081506] Hardware name: linux,dummy-virt (DT)
[   20.081946] Call trace:
[   20.082004]  show_stack+0x20/0x38 (C)
[   20.082090]  dump_stack_lvl+0x8c/0xd0
[   20.082151]  print_report+0x118/0x608
[   20.082246]  kasan_report+0xdc/0x128
[   20.082383]  __asan_report_load1_noabort+0x20/0x30
[   20.082569]  kmem_cache_oob+0x344/0x430
[   20.082702]  kunit_try_run_case+0x170/0x3f0
[   20.082849]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.082970]  kthread+0x328/0x630
[   20.083121]  ret_from_fork+0x10/0x20
[   20.083245] 
[   20.083301] Allocated by task 216:
[   20.083387]  kasan_save_stack+0x3c/0x68
[   20.083469]  kasan_save_track+0x20/0x40
[   20.083555]  kasan_save_alloc_info+0x40/0x58
[   20.083646]  __kasan_slab_alloc+0xa8/0xb0
[   20.083733]  kmem_cache_alloc_noprof+0x10c/0x398
[   20.083826]  kmem_cache_oob+0x12c/0x430
[   20.083916]  kunit_try_run_case+0x170/0x3f0
[   20.084005]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.084103]  kthread+0x328/0x630
[   20.084198]  ret_from_fork+0x10/0x20
[   20.084286] 
[   20.084335] The buggy address belongs to the object at fff00000c6e28000
[   20.084335]  which belongs to the cache test_cache of size 200
[   20.084475] The buggy address is located 0 bytes to the right of
[   20.084475]  allocated 200-byte region [fff00000c6e28000, fff00000c6e280c8)
[   20.084621] 
[   20.084669] The buggy address belongs to the physical page:
[   20.084741] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e28
[   20.084893] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.085007] page_type: f5(slab)
[   20.085106] raw: 0bfffe0000000000 fff00000c5c86c80 dead000000000122 0000000000000000
[   20.085226] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   20.085336] page dumped because: kasan: bad access detected
[   20.085404] 
[   20.085448] Memory state around the buggy address:
[   20.085536]  fff00000c6e27f80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
[   20.085687]  fff00000c6e28000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.085936] >fff00000c6e28080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   20.086046]                                               ^
[   20.086147]  fff00000c6e28100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.086256]  fff00000c6e28180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.086440] ==================================================================

[   12.131237] ==================================================================
[   12.131727] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   12.131975] Read of size 1 at addr ffff888102a2c0c8 by task kunit_try_catch/232
[   12.132189] 
[   12.132275] CPU: 0 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250616 #1 PREEMPT(voluntary) 
[   12.132324] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.132335] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.132355] Call Trace:
[   12.132368]  <TASK>
[   12.132387]  dump_stack_lvl+0x73/0xb0
[   12.132416]  print_report+0xd1/0x650
[   12.132438]  ? __virt_addr_valid+0x1db/0x2d0
[   12.132461]  ? kmem_cache_oob+0x402/0x530
[   12.132482]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.132502]  ? kmem_cache_oob+0x402/0x530
[   12.132523]  kasan_report+0x141/0x180
[   12.132543]  ? kmem_cache_oob+0x402/0x530
[   12.132568]  __asan_report_load1_noabort+0x18/0x20
[   12.132591]  kmem_cache_oob+0x402/0x530
[   12.132611]  ? trace_hardirqs_on+0x37/0xe0
[   12.132635]  ? __pfx_kmem_cache_oob+0x10/0x10
[   12.132656]  ? finish_task_switch.isra.0+0x153/0x700
[   12.132678]  ? __switch_to+0x47/0xf50
[   12.132705]  ? __pfx_read_tsc+0x10/0x10
[   12.132726]  ? ktime_get_ts64+0x86/0x230
[   12.132750]  kunit_try_run_case+0x1a5/0x480
[   12.132775]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.132795]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.132816]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.132837]  ? __kthread_parkme+0x82/0x180
[   12.132857]  ? preempt_count_sub+0x50/0x80
[   12.132878]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.132900]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.132921]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.132964]  kthread+0x337/0x6f0
[   12.132982]  ? trace_preempt_on+0x20/0xc0
[   12.133003]  ? __pfx_kthread+0x10/0x10
[   12.133022]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.133041]  ? calculate_sigpending+0x7b/0xa0
[   12.133065]  ? __pfx_kthread+0x10/0x10
[   12.133085]  ret_from_fork+0x116/0x1d0
[   12.133102]  ? __pfx_kthread+0x10/0x10
[   12.133121]  ret_from_fork_asm+0x1a/0x30
[   12.133150]  </TASK>
[   12.133162] 
[   12.145820] Allocated by task 232:
[   12.146038]  kasan_save_stack+0x45/0x70
[   12.146331]  kasan_save_track+0x18/0x40
[   12.146737]  kasan_save_alloc_info+0x3b/0x50
[   12.147054]  __kasan_slab_alloc+0x91/0xa0
[   12.147357]  kmem_cache_alloc_noprof+0x123/0x3f0
[   12.147785]  kmem_cache_oob+0x157/0x530
[   12.148082]  kunit_try_run_case+0x1a5/0x480
[   12.148304]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.148589]  kthread+0x337/0x6f0
[   12.149185]  ret_from_fork+0x116/0x1d0
[   12.149645]  ret_from_fork_asm+0x1a/0x30
[   12.149851] 
[   12.149957] The buggy address belongs to the object at ffff888102a2c000
[   12.149957]  which belongs to the cache test_cache of size 200
[   12.150833] The buggy address is located 0 bytes to the right of
[   12.150833]  allocated 200-byte region [ffff888102a2c000, ffff888102a2c0c8)
[   12.151599] 
[   12.151731] The buggy address belongs to the physical page:
[   12.152070] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a2c
[   12.152622] flags: 0x200000000000000(node=0|zone=2)
[   12.152989] page_type: f5(slab)
[   12.153280] raw: 0200000000000000 ffff888101d34500 dead000000000122 0000000000000000
[   12.153771] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   12.154264] page dumped because: kasan: bad access detected
[   12.154666] 
[   12.154763] Memory state around the buggy address:
[   12.155001]  ffff888102a2bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.155376]  ffff888102a2c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.155683] >ffff888102a2c080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   12.156072]                                               ^
[   12.156338]  ffff888102a2c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.156684]  ffff888102a2c180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.157051] ==================================================================