Hay
Date
July 10, 2025, 6:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.479946] ==================================================================
[   17.480024] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   17.480373] Read of size 1 at addr fff00000c5a380c8 by task kunit_try_catch/207
[   17.480699] 
[   17.480824] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   17.480916] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.480944] Hardware name: linux,dummy-virt (DT)
[   17.480976] Call trace:
[   17.480999]  show_stack+0x20/0x38 (C)
[   17.481054]  dump_stack_lvl+0x8c/0xd0
[   17.481104]  print_report+0x118/0x608
[   17.481153]  kasan_report+0xdc/0x128
[   17.481200]  __asan_report_load1_noabort+0x20/0x30
[   17.481492]  kmem_cache_oob+0x344/0x430
[   17.481691]  kunit_try_run_case+0x170/0x3f0
[   17.481744]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.482245]  kthread+0x328/0x630
[   17.482526]  ret_from_fork+0x10/0x20
[   17.482607] 
[   17.482902] Allocated by task 207:
[   17.482936]  kasan_save_stack+0x3c/0x68
[   17.482982]  kasan_save_track+0x20/0x40
[   17.483153]  kasan_save_alloc_info+0x40/0x58
[   17.483234]  __kasan_slab_alloc+0xa8/0xb0
[   17.483296]  kmem_cache_alloc_noprof+0x10c/0x398
[   17.483464]  kmem_cache_oob+0x12c/0x430
[   17.483618]  kunit_try_run_case+0x170/0x3f0
[   17.483732]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.483810]  kthread+0x328/0x630
[   17.484234]  ret_from_fork+0x10/0x20
[   17.484599] 
[   17.484643] The buggy address belongs to the object at fff00000c5a38000
[   17.484643]  which belongs to the cache test_cache of size 200
[   17.484756] The buggy address is located 0 bytes to the right of
[   17.484756]  allocated 200-byte region [fff00000c5a38000, fff00000c5a380c8)
[   17.484877] 
[   17.484963] The buggy address belongs to the physical page:
[   17.485026] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a38
[   17.485084] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.485183] page_type: f5(slab)
[   17.485389] raw: 0bfffe0000000000 fff00000c5973280 dead000000000122 0000000000000000
[   17.485455] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   17.485595] page dumped because: kasan: bad access detected
[   17.485627] 
[   17.485644] Memory state around the buggy address:
[   17.485699]  fff00000c5a37f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.485786]  fff00000c5a38000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   17.485963] >fff00000c5a38080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   17.486001]                                               ^
[   17.486036]  fff00000c5a38100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.486078]  fff00000c5a38180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.486116] ==================================================================

[   13.126797] ==================================================================
[   13.127260] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.127494] Read of size 1 at addr ffff888103a090c8 by task kunit_try_catch/224
[   13.127715] 
[   13.127805] CPU: 0 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.127850] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.127862] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.127882] Call Trace:
[   13.127894]  <TASK>
[   13.127911]  dump_stack_lvl+0x73/0xb0
[   13.127959]  print_report+0xd1/0x650
[   13.128284]  ? __virt_addr_valid+0x1db/0x2d0
[   13.128323]  ? kmem_cache_oob+0x402/0x530
[   13.128346]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.128369]  ? kmem_cache_oob+0x402/0x530
[   13.128392]  kasan_report+0x141/0x180
[   13.128413]  ? kmem_cache_oob+0x402/0x530
[   13.128447]  __asan_report_load1_noabort+0x18/0x20
[   13.128471]  kmem_cache_oob+0x402/0x530
[   13.128492]  ? trace_hardirqs_on+0x37/0xe0
[   13.128516]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.128539]  ? finish_task_switch.isra.0+0x153/0x700
[   13.128562]  ? __switch_to+0x47/0xf50
[   13.128590]  ? __pfx_read_tsc+0x10/0x10
[   13.128611]  ? ktime_get_ts64+0x86/0x230
[   13.128679]  kunit_try_run_case+0x1a5/0x480
[   13.128705]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.129129]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.129163]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.129188]  ? __kthread_parkme+0x82/0x180
[   13.129209]  ? preempt_count_sub+0x50/0x80
[   13.129233]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.129259]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.129284]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.129309]  kthread+0x337/0x6f0
[   13.129327]  ? trace_preempt_on+0x20/0xc0
[   13.129349]  ? __pfx_kthread+0x10/0x10
[   13.129369]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.129390]  ? calculate_sigpending+0x7b/0xa0
[   13.129414]  ? __pfx_kthread+0x10/0x10
[   13.129435]  ret_from_fork+0x116/0x1d0
[   13.129453]  ? __pfx_kthread+0x10/0x10
[   13.129472]  ret_from_fork_asm+0x1a/0x30
[   13.129503]  </TASK>
[   13.129513] 
[   13.142738] Allocated by task 224:
[   13.143214]  kasan_save_stack+0x45/0x70
[   13.143574]  kasan_save_track+0x18/0x40
[   13.143779]  kasan_save_alloc_info+0x3b/0x50
[   13.144279]  __kasan_slab_alloc+0x91/0xa0
[   13.144608]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.144786]  kmem_cache_oob+0x157/0x530
[   13.145221]  kunit_try_run_case+0x1a5/0x480
[   13.145423]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.145786]  kthread+0x337/0x6f0
[   13.146111]  ret_from_fork+0x116/0x1d0
[   13.146513]  ret_from_fork_asm+0x1a/0x30
[   13.146667] 
[   13.146994] The buggy address belongs to the object at ffff888103a09000
[   13.146994]  which belongs to the cache test_cache of size 200
[   13.147773] The buggy address is located 0 bytes to the right of
[   13.147773]  allocated 200-byte region [ffff888103a09000, ffff888103a090c8)
[   13.148944] 
[   13.149022] The buggy address belongs to the physical page:
[   13.149614] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a09
[   13.150455] flags: 0x200000000000000(node=0|zone=2)
[   13.150626] page_type: f5(slab)
[   13.150745] raw: 0200000000000000 ffff888101654a00 dead000000000122 0000000000000000
[   13.151007] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.151532] page dumped because: kasan: bad access detected
[   13.151732] 
[   13.151805] Memory state around the buggy address:
[   13.152156]  ffff888103a08f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.152499]  ffff888103a09000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.152784] >ffff888103a09080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.153156]                                               ^
[   13.153331]  ffff888103a09100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.153633]  ffff888103a09180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.154110] ==================================================================