Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.181260] ==================================================================
[   20.181431] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   20.181566] Read of size 1 at addr fff00000c63910c8 by task kunit_try_catch/207
[   20.181716] 
[   20.181832] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.182013] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.182095] Hardware name: linux,dummy-virt (DT)
[   20.182174] Call trace:
[   20.182223]  show_stack+0x20/0x38 (C)
[   20.182329]  dump_stack_lvl+0x8c/0xd0
[   20.182419]  print_report+0x118/0x608
[   20.182540]  kasan_report+0xdc/0x128
[   20.182655]  __asan_report_load1_noabort+0x20/0x30
[   20.182763]  kmem_cache_oob+0x344/0x430
[   20.182869]  kunit_try_run_case+0x170/0x3f0
[   20.183082]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.183244]  kthread+0x328/0x630
[   20.183495]  ret_from_fork+0x10/0x20
[   20.183800] 
[   20.183852] Allocated by task 207:
[   20.183911]  kasan_save_stack+0x3c/0x68
[   20.184016]  kasan_save_track+0x20/0x40
[   20.184116]  kasan_save_alloc_info+0x40/0x58
[   20.184205]  __kasan_slab_alloc+0xa8/0xb0
[   20.184792]  kmem_cache_alloc_noprof+0x10c/0x398
[   20.185056]  kmem_cache_oob+0x12c/0x430
[   20.185333]  kunit_try_run_case+0x170/0x3f0
[   20.185833]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.186285]  kthread+0x328/0x630
[   20.186379]  ret_from_fork+0x10/0x20
[   20.186460] 
[   20.186513] The buggy address belongs to the object at fff00000c6391000
[   20.186513]  which belongs to the cache test_cache of size 200
[   20.186822] The buggy address is located 0 bytes to the right of
[   20.186822]  allocated 200-byte region [fff00000c6391000, fff00000c63910c8)
[   20.187166] 
[   20.187233] The buggy address belongs to the physical page:
[   20.187516] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106391
[   20.187780] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.188459] page_type: f5(slab)
[   20.188572] raw: 0bfffe0000000000 fff00000c6de6000 dead000000000122 0000000000000000
[   20.188692] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   20.188792] page dumped because: kasan: bad access detected
[   20.188867] 
[   20.188907] Memory state around the buggy address:
[   20.188984]  fff00000c6390f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.189102]  fff00000c6391000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.189194] >fff00000c6391080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   20.189846]                                               ^
[   20.190272]  fff00000c6391100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.190647]  fff00000c6391180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.190841] ==================================================================

[   12.188169] ==================================================================
[   12.189644] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   12.190132] Read of size 1 at addr ffff8881039bc0c8 by task kunit_try_catch/224
[   12.190518] 
[   12.190736] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.190809] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.190821] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.190842] Call Trace:
[   12.190854]  <TASK>
[   12.190869]  dump_stack_lvl+0x73/0xb0
[   12.190908]  print_report+0xd1/0x650
[   12.190929]  ? __virt_addr_valid+0x1db/0x2d0
[   12.190953]  ? kmem_cache_oob+0x402/0x530
[   12.190974]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.190995]  ? kmem_cache_oob+0x402/0x530
[   12.191017]  kasan_report+0x141/0x180
[   12.191038]  ? kmem_cache_oob+0x402/0x530
[   12.191064]  __asan_report_load1_noabort+0x18/0x20
[   12.191087]  kmem_cache_oob+0x402/0x530
[   12.191107]  ? trace_hardirqs_on+0x37/0xe0
[   12.191166]  ? __pfx_kmem_cache_oob+0x10/0x10
[   12.191188]  ? finish_task_switch.isra.0+0x153/0x700
[   12.191210]  ? __switch_to+0x47/0xf50
[   12.191237]  ? __pfx_read_tsc+0x10/0x10
[   12.191257]  ? ktime_get_ts64+0x86/0x230
[   12.191281]  kunit_try_run_case+0x1a5/0x480
[   12.191304]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.191335]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.191357]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.191379]  ? __kthread_parkme+0x82/0x180
[   12.191398]  ? preempt_count_sub+0x50/0x80
[   12.191419]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.191441]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.191462]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.191483]  kthread+0x337/0x6f0
[   12.191501]  ? trace_preempt_on+0x20/0xc0
[   12.191521]  ? __pfx_kthread+0x10/0x10
[   12.191540]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.191559]  ? calculate_sigpending+0x7b/0xa0
[   12.191582]  ? __pfx_kthread+0x10/0x10
[   12.191604]  ret_from_fork+0x116/0x1d0
[   12.191621]  ? __pfx_kthread+0x10/0x10
[   12.191640]  ret_from_fork_asm+0x1a/0x30
[   12.191669]  </TASK>
[   12.191679] 
[   12.203803] Allocated by task 224:
[   12.203944]  kasan_save_stack+0x45/0x70
[   12.204157]  kasan_save_track+0x18/0x40
[   12.204565]  kasan_save_alloc_info+0x3b/0x50
[   12.204831]  __kasan_slab_alloc+0x91/0xa0
[   12.205013]  kmem_cache_alloc_noprof+0x123/0x3f0
[   12.205234]  kmem_cache_oob+0x157/0x530
[   12.205456]  kunit_try_run_case+0x1a5/0x480
[   12.205697]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.205902]  kthread+0x337/0x6f0
[   12.206100]  ret_from_fork+0x116/0x1d0
[   12.206437]  ret_from_fork_asm+0x1a/0x30
[   12.206675] 
[   12.206772] The buggy address belongs to the object at ffff8881039bc000
[   12.206772]  which belongs to the cache test_cache of size 200
[   12.207350] The buggy address is located 0 bytes to the right of
[   12.207350]  allocated 200-byte region [ffff8881039bc000, ffff8881039bc0c8)
[   12.207958] 
[   12.208061] The buggy address belongs to the physical page:
[   12.208375] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039bc
[   12.208807] flags: 0x200000000000000(node=0|zone=2)
[   12.208981] page_type: f5(slab)
[   12.209099] raw: 0200000000000000 ffff8881019c63c0 dead000000000122 0000000000000000
[   12.209536] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   12.209851] page dumped because: kasan: bad access detected
[   12.210057] 
[   12.210172] Memory state around the buggy address:
[   12.210490]  ffff8881039bbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.210719]  ffff8881039bc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.211064] >ffff8881039bc080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   12.211366]                                               ^
[   12.211888]  ffff8881039bc100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.212542]  ffff8881039bc180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.212862] ==================================================================