Hay
Date
July 5, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.695642] ==================================================================
[   19.696206] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   19.696329] Read of size 1 at addr fff00000c792e0c8 by task kunit_try_catch/208
[   19.696561] 
[   19.696646] CPU: 0 UID: 0 PID: 208 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.697321] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.697410] Hardware name: linux,dummy-virt (DT)
[   19.697499] Call trace:
[   19.697619]  show_stack+0x20/0x38 (C)
[   19.697734]  dump_stack_lvl+0x8c/0xd0
[   19.698274]  print_report+0x118/0x608
[   19.698830]  kasan_report+0xdc/0x128
[   19.698998]  __asan_report_load1_noabort+0x20/0x30
[   19.699207]  kmem_cache_oob+0x344/0x430
[   19.699322]  kunit_try_run_case+0x170/0x3f0
[   19.699456]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.699574]  kthread+0x328/0x630
[   19.699742]  ret_from_fork+0x10/0x20
[   19.699858] 
[   19.699906] Allocated by task 208:
[   19.699968]  kasan_save_stack+0x3c/0x68
[   19.700061]  kasan_save_track+0x20/0x40
[   19.700144]  kasan_save_alloc_info+0x40/0x58
[   19.700242]  __kasan_slab_alloc+0xa8/0xb0
[   19.700324]  kmem_cache_alloc_noprof+0x10c/0x398
[   19.701003]  kmem_cache_oob+0x12c/0x430
[   19.701205]  kunit_try_run_case+0x170/0x3f0
[   19.701299]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.701414]  kthread+0x328/0x630
[   19.701701]  ret_from_fork+0x10/0x20
[   19.701795] 
[   19.701968] The buggy address belongs to the object at fff00000c792e000
[   19.701968]  which belongs to the cache test_cache of size 200
[   19.702325] The buggy address is located 0 bytes to the right of
[   19.702325]  allocated 200-byte region [fff00000c792e000, fff00000c792e0c8)
[   19.702509] 
[   19.702553] The buggy address belongs to the physical page:
[   19.702608] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10792e
[   19.702722] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.702837] page_type: f5(slab)
[   19.702929] raw: 0bfffe0000000000 fff00000c1afa8c0 dead000000000122 0000000000000000
[   19.703047] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   19.703678] page dumped because: kasan: bad access detected
[   19.703767] 
[   19.704084] Memory state around the buggy address:
[   19.704478]  fff00000c792df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.704704]  fff00000c792e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   19.704821] >fff00000c792e080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   19.704913]                                               ^
[   19.704994]  fff00000c792e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.705500]  fff00000c792e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.705783] ==================================================================

[   14.353988] ==================================================================
[   14.354594] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   14.355056] Read of size 1 at addr ffff8881038df0c8 by task kunit_try_catch/224
[   14.355500] 
[   14.355644] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   14.355767] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.355784] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.355844] Call Trace:
[   14.355888]  <TASK>
[   14.355911]  dump_stack_lvl+0x73/0xb0
[   14.355951]  print_report+0xd1/0x650
[   14.355980]  ? __virt_addr_valid+0x1db/0x2d0
[   14.356015]  ? kmem_cache_oob+0x402/0x530
[   14.356048]  ? kasan_complete_mode_report_info+0x2a/0x200
[   14.356078]  ? kmem_cache_oob+0x402/0x530
[   14.356109]  kasan_report+0x141/0x180
[   14.356138]  ? kmem_cache_oob+0x402/0x530
[   14.356175]  __asan_report_load1_noabort+0x18/0x20
[   14.356207]  kmem_cache_oob+0x402/0x530
[   14.356236]  ? trace_hardirqs_on+0x37/0xe0
[   14.356308]  ? __pfx_kmem_cache_oob+0x10/0x10
[   14.356338]  ? finish_task_switch.isra.0+0x153/0x700
[   14.356368]  ? __switch_to+0x47/0xf50
[   14.356406]  ? __pfx_read_tsc+0x10/0x10
[   14.356437]  ? ktime_get_ts64+0x86/0x230
[   14.356470]  kunit_try_run_case+0x1a5/0x480
[   14.356503]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.356571]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.356604]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.356635]  ? __kthread_parkme+0x82/0x180
[   14.356673]  ? preempt_count_sub+0x50/0x80
[   14.356704]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.356735]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.356767]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.356816]  kthread+0x337/0x6f0
[   14.356842]  ? trace_preempt_on+0x20/0xc0
[   14.356871]  ? __pfx_kthread+0x10/0x10
[   14.356898]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.356926]  ? calculate_sigpending+0x7b/0xa0
[   14.356958]  ? __pfx_kthread+0x10/0x10
[   14.356986]  ret_from_fork+0x116/0x1d0
[   14.357011]  ? __pfx_kthread+0x10/0x10
[   14.357038]  ret_from_fork_asm+0x1a/0x30
[   14.357079]  </TASK>
[   14.357093] 
[   14.369407] Allocated by task 224:
[   14.369628]  kasan_save_stack+0x45/0x70
[   14.370437]  kasan_save_track+0x18/0x40
[   14.370789]  kasan_save_alloc_info+0x3b/0x50
[   14.371175]  __kasan_slab_alloc+0x91/0xa0
[   14.371523]  kmem_cache_alloc_noprof+0x123/0x3f0
[   14.371904]  kmem_cache_oob+0x157/0x530
[   14.372127]  kunit_try_run_case+0x1a5/0x480
[   14.372490]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.373065]  kthread+0x337/0x6f0
[   14.373264]  ret_from_fork+0x116/0x1d0
[   14.373665]  ret_from_fork_asm+0x1a/0x30
[   14.374031] 
[   14.374242] The buggy address belongs to the object at ffff8881038df000
[   14.374242]  which belongs to the cache test_cache of size 200
[   14.375166] The buggy address is located 0 bytes to the right of
[   14.375166]  allocated 200-byte region [ffff8881038df000, ffff8881038df0c8)
[   14.376084] 
[   14.376216] The buggy address belongs to the physical page:
[   14.376467] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038df
[   14.377262] flags: 0x200000000000000(node=0|zone=2)
[   14.377549] page_type: f5(slab)
[   14.377779] raw: 0200000000000000 ffff888101b9ba00 dead000000000122 0000000000000000
[   14.378545] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   14.379213] page dumped because: kasan: bad access detected
[   14.379492] 
[   14.379614] Memory state around the buggy address:
[   14.380191]  ffff8881038def80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.380595]  ffff8881038df000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   14.381234] >ffff8881038df080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   14.381688]                                               ^
[   14.382140]  ffff8881038df100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.382469]  ffff8881038df180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.382988] ==================================================================