Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.531664] ==================================================================
[   22.531915] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   22.532561] Read of size 1 at addr fff00000c787b0c8 by task kunit_try_catch/207
[   22.532744] 
[   22.532879] CPU: 1 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   22.533093] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.533156] Hardware name: linux,dummy-virt (DT)
[   22.533239] Call trace:
[   22.533297]  show_stack+0x20/0x38 (C)
[   22.533441]  dump_stack_lvl+0x8c/0xd0
[   22.533567]  print_report+0x118/0x608
[   22.533686]  kasan_report+0xdc/0x128
[   22.533800]  __asan_report_load1_noabort+0x20/0x30
[   22.533922]  kmem_cache_oob+0x344/0x430
[   22.534034]  kunit_try_run_case+0x170/0x3f0
[   22.534160]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.534297]  kthread+0x328/0x630
[   22.534458]  ret_from_fork+0x10/0x20
[   22.534623] 
[   22.534903] Allocated by task 207:
[   22.534973]  kasan_save_stack+0x3c/0x68
[   22.535062]  kasan_save_track+0x20/0x40
[   22.535147]  kasan_save_alloc_info+0x40/0x58
[   22.535522]  __kasan_slab_alloc+0xa8/0xb0
[   22.535636]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   22.535772]  kmem_cache_oob+0x12c/0x430
[   22.535876]  kunit_try_run_case+0x170/0x3f0
[   22.536330]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.536458]  kthread+0x328/0x630
[   22.536793]  ret_from_fork+0x10/0x20
[   22.536931] 
[   22.536999] The buggy address belongs to the object at fff00000c787b000
[   22.536999]  which belongs to the cache test_cache of size 200
[   22.537184] The buggy address is located 0 bytes to the right of
[   22.537184]  allocated 200-byte region [fff00000c787b000, fff00000c787b0c8)
[   22.537334] 
[   22.537386] The buggy address belongs to the physical page:
[   22.537484] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10787b
[   22.537893] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.538090] page_type: f5(slab)
[   22.538184] raw: 0bfffe0000000000 fff00000c5696dc0 dead000000000122 0000000000000000
[   22.538414] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   22.538551] page dumped because: kasan: bad access detected
[   22.538666] 
[   22.538731] Memory state around the buggy address:
[   22.538826]  fff00000c787af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.538918]  fff00000c787b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.539019] >fff00000c787b080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   22.539100]                                               ^
[   22.539214]  fff00000c787b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.539757]  fff00000c787b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.539932] ==================================================================


[   11.498377] ==================================================================
[   11.499327] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   11.499564] Read of size 1 at addr ffff8881028a90c8 by task kunit_try_catch/224
[   11.500069] 
[   11.500294] CPU: 1 UID: 0 PID: 224 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   11.500367] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.500408] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.500440] Call Trace:
[   11.500452]  <TASK>
[   11.500468]  dump_stack_lvl+0x73/0xb0
[   11.500496]  print_report+0xd1/0x650
[   11.500519]  ? __virt_addr_valid+0x1db/0x2d0
[   11.500541]  ? kmem_cache_oob+0x402/0x530
[   11.500559]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.500581]  ? kmem_cache_oob+0x402/0x530
[   11.500600]  kasan_report+0x141/0x180
[   11.500634]  ? kmem_cache_oob+0x402/0x530
[   11.500657]  __asan_report_load1_noabort+0x18/0x20
[   11.500678]  kmem_cache_oob+0x402/0x530
[   11.500696]  ? trace_hardirqs_on+0x37/0xe0
[   11.500719]  ? __pfx_kmem_cache_oob+0x10/0x10
[   11.500744]  ? finish_task_switch.isra.0+0x153/0x700
[   11.500765]  ? __switch_to+0x47/0xf50
[   11.500793]  ? __pfx_read_tsc+0x10/0x10
[   11.500814]  ? ktime_get_ts64+0x86/0x230
[   11.500838]  kunit_try_run_case+0x1a5/0x480
[   11.500859]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.500878]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.500902]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.500926]  ? __kthread_parkme+0x82/0x180
[   11.500946]  ? preempt_count_sub+0x50/0x80
[   11.500968]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.500989]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.501013]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.501036]  kthread+0x337/0x6f0
[   11.501055]  ? trace_preempt_on+0x20/0xc0
[   11.501077]  ? __pfx_kthread+0x10/0x10
[   11.501097]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.501119]  ? calculate_sigpending+0x7b/0xa0
[   11.501143]  ? __pfx_kthread+0x10/0x10
[   11.501186]  ret_from_fork+0x116/0x1d0
[   11.501204]  ? __pfx_kthread+0x10/0x10
[   11.501230]  ret_from_fork_asm+0x1a/0x30
[   11.501260]  </TASK>
[   11.501271] 
[   11.515555] Allocated by task 224:
[   11.515972]  kasan_save_stack+0x45/0x70
[   11.516458]  kasan_save_track+0x18/0x40
[   11.516605]  kasan_save_alloc_info+0x3b/0x50
[   11.517082]  __kasan_slab_alloc+0x91/0xa0
[   11.517523]  kmem_cache_alloc_noprof+0x123/0x3f0
[   11.517935]  kmem_cache_oob+0x157/0x530
[   11.518153]  kunit_try_run_case+0x1a5/0x480
[   11.518532]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.518963]  kthread+0x337/0x6f0
[   11.519097]  ret_from_fork+0x116/0x1d0
[   11.519231]  ret_from_fork_asm+0x1a/0x30
[   11.519372] 
[   11.519446] The buggy address belongs to the object at ffff8881028a9000
[   11.519446]  which belongs to the cache test_cache of size 200
[   11.519994] The buggy address is located 0 bytes to the right of
[   11.519994]  allocated 200-byte region [ffff8881028a9000, ffff8881028a90c8)
[   11.520886] 
[   11.521172] The buggy address belongs to the physical page:
[   11.521450] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028a9
[   11.521877] flags: 0x200000000000000(node=0|zone=2)
[   11.522215] page_type: f5(slab)
[   11.522430] raw: 0200000000000000 ffff8881028a7000 dead000000000122 0000000000000000
[   11.522794] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   11.523308] page dumped because: kasan: bad access detected
[   11.523486] 
[   11.523557] Memory state around the buggy address:
[   11.524042]  ffff8881028a8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.525010]  ffff8881028a9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   11.525742] >ffff8881028a9080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   11.526247]                                               ^
[   11.526434]  ffff8881028a9100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.526677]  ffff8881028a9180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.527283] ==================================================================