Hay
Date
July 9, 2025, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.008065] ==================================================================
[   18.008167] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   18.008229] Read of size 1 at addr fff00000c77910c8 by task kunit_try_catch/207
[   18.008281] 
[   18.008350] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc5 #1 PREEMPT 
[   18.008490] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   18.008522] Hardware name: linux,dummy-virt (DT)
[   18.008561] Call trace:
[   18.008618]  show_stack+0x20/0x38 (C)
[   18.008669]  dump_stack_lvl+0x8c/0xd0
[   18.008738]  print_report+0x118/0x608
[   18.008789]  kasan_report+0xdc/0x128
[   18.008903]  __asan_report_load1_noabort+0x20/0x30
[   18.008957]  kmem_cache_oob+0x344/0x430
[   18.009048]  kunit_try_run_case+0x170/0x3f0
[   18.009417]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.009489]  kthread+0x328/0x630
[   18.009570]  ret_from_fork+0x10/0x20
[   18.009758] 
[   18.009799] Allocated by task 207:
[   18.009861]  kasan_save_stack+0x3c/0x68
[   18.010038]  kasan_save_track+0x20/0x40
[   18.010131]  kasan_save_alloc_info+0x40/0x58
[   18.010240]  __kasan_slab_alloc+0xa8/0xb0
[   18.010300]  kmem_cache_alloc_noprof+0x10c/0x398
[   18.010342]  kmem_cache_oob+0x12c/0x430
[   18.010729]  kunit_try_run_case+0x170/0x3f0
[   18.010882]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.011094]  kthread+0x328/0x630
[   18.011142]  ret_from_fork+0x10/0x20
[   18.011276] 
[   18.011367] The buggy address belongs to the object at fff00000c7791000
[   18.011367]  which belongs to the cache test_cache of size 200
[   18.011510] The buggy address is located 0 bytes to the right of
[   18.011510]  allocated 200-byte region [fff00000c7791000, fff00000c77910c8)
[   18.011597] 
[   18.011618] The buggy address belongs to the physical page:
[   18.011695] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107791
[   18.011985] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.012157] page_type: f5(slab)
[   18.012376] raw: 0bfffe0000000000 fff00000c1ba2280 dead000000000122 0000000000000000
[   18.012626] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   18.012697] page dumped because: kasan: bad access detected
[   18.012740] 
[   18.012865] Memory state around the buggy address:
[   18.012899]  fff00000c7790f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   18.012976]  fff00000c7791000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   18.013442] >fff00000c7791080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   18.013788]                                               ^
[   18.014068]  fff00000c7791100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.014184]  fff00000c7791180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.014226] ==================================================================

[   13.419142] ==================================================================
[   13.419577] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.419943] Read of size 1 at addr ffff88810395a0c8 by task kunit_try_catch/224
[   13.420309] 
[   13.420424] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.420473] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.420483] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.420504] Call Trace:
[   13.420517]  <TASK>
[   13.420535]  dump_stack_lvl+0x73/0xb0
[   13.420567]  print_report+0xd1/0x650
[   13.420591]  ? __virt_addr_valid+0x1db/0x2d0
[   13.420629]  ? kmem_cache_oob+0x402/0x530
[   13.420651]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.420674]  ? kmem_cache_oob+0x402/0x530
[   13.420697]  kasan_report+0x141/0x180
[   13.420718]  ? kmem_cache_oob+0x402/0x530
[   13.420745]  __asan_report_load1_noabort+0x18/0x20
[   13.420769]  kmem_cache_oob+0x402/0x530
[   13.420800]  ? trace_hardirqs_on+0x37/0xe0
[   13.420908]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.420936]  ? finish_task_switch.isra.0+0x153/0x700
[   13.420960]  ? __switch_to+0x47/0xf50
[   13.420988]  ? __pfx_read_tsc+0x10/0x10
[   13.421010]  ? ktime_get_ts64+0x86/0x230
[   13.421036]  kunit_try_run_case+0x1a5/0x480
[   13.421062]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.421085]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.421110]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.421134]  ? __kthread_parkme+0x82/0x180
[   13.421158]  ? preempt_count_sub+0x50/0x80
[   13.421181]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.421208]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.421233]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.421257]  kthread+0x337/0x6f0
[   13.421276]  ? trace_preempt_on+0x20/0xc0
[   13.421299]  ? __pfx_kthread+0x10/0x10
[   13.421320]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.421341]  ? calculate_sigpending+0x7b/0xa0
[   13.421365]  ? __pfx_kthread+0x10/0x10
[   13.421386]  ret_from_fork+0x116/0x1d0
[   13.421404]  ? __pfx_kthread+0x10/0x10
[   13.421424]  ret_from_fork_asm+0x1a/0x30
[   13.421455]  </TASK>
[   13.421465] 
[   13.429663] Allocated by task 224:
[   13.429801]  kasan_save_stack+0x45/0x70
[   13.429950]  kasan_save_track+0x18/0x40
[   13.430146]  kasan_save_alloc_info+0x3b/0x50
[   13.430535]  __kasan_slab_alloc+0x91/0xa0
[   13.430754]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.431097]  kmem_cache_oob+0x157/0x530
[   13.431239]  kunit_try_run_case+0x1a5/0x480
[   13.431425]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.431696]  kthread+0x337/0x6f0
[   13.431943]  ret_from_fork+0x116/0x1d0
[   13.432141]  ret_from_fork_asm+0x1a/0x30
[   13.432333] 
[   13.432419] The buggy address belongs to the object at ffff88810395a000
[   13.432419]  which belongs to the cache test_cache of size 200
[   13.432821] The buggy address is located 0 bytes to the right of
[   13.432821]  allocated 200-byte region [ffff88810395a000, ffff88810395a0c8)
[   13.433306] 
[   13.433403] The buggy address belongs to the physical page:
[   13.433778] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10395a
[   13.434068] flags: 0x200000000000000(node=0|zone=2)
[   13.434234] page_type: f5(slab)
[   13.434356] raw: 0200000000000000 ffff8881018c9c80 dead000000000122 0000000000000000
[   13.434699] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.435140] page dumped because: kasan: bad access detected
[   13.435398] 
[   13.435491] Memory state around the buggy address:
[   13.435682]  ffff888103959f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.437504]  ffff88810395a000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.438030] >ffff88810395a080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.438258]                                               ^
[   13.438442]  ffff88810395a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.438673]  ffff88810395a180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.438902] ==================================================================