Hay
Date
June 5, 2025, 7:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   24.657423] ==================================================================
[   24.657553] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x2a4/0x2f0
[   24.657674] Write of size 1 at addr fff00000c77e9f00 by task kunit_try_catch/144
[   24.657789] 
[   24.657862] CPU: 1 UID: 0 PID: 144 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT 
[   24.658059] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.658124] Hardware name: linux,dummy-virt (DT)
[   24.658211] Call trace:
[   24.658843]  show_stack+0x20/0x38 (C)
[   24.659321]  dump_stack_lvl+0x8c/0xd0
[   24.660011]  print_report+0x118/0x608
[   24.660246]  kasan_report+0xdc/0x128
[   24.660424]  __asan_report_store1_noabort+0x20/0x30
[   24.660552]  kmalloc_big_oob_right+0x2a4/0x2f0
[   24.660676]  kunit_try_run_case+0x170/0x3f0
[   24.660804]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.660936]  kthread+0x328/0x630
[   24.661056]  ret_from_fork+0x10/0x20
[   24.661499] 
[   24.661603] Allocated by task 144:
[   24.661837]  kasan_save_stack+0x3c/0x68
[   24.661943]  kasan_save_track+0x20/0x40
[   24.662043]  kasan_save_alloc_info+0x40/0x58
[   24.662323]  __kasan_kmalloc+0xd4/0xd8
[   24.662480]  __kmalloc_cache_noprof+0x16c/0x3c0
[   24.662644]  kmalloc_big_oob_right+0xb8/0x2f0
[   24.662838]  kunit_try_run_case+0x170/0x3f0
[   24.663054]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.663167]  kthread+0x328/0x630
[   24.663248]  ret_from_fork+0x10/0x20
[   24.663354] 
[   24.663401] The buggy address belongs to the object at fff00000c77e8000
[   24.663401]  which belongs to the cache kmalloc-8k of size 8192
[   24.663955] The buggy address is located 0 bytes to the right of
[   24.663955]  allocated 7936-byte region [fff00000c77e8000, fff00000c77e9f00)
[   24.664306] 
[   24.664374] The buggy address belongs to the physical page:
[   24.664456] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077e8
[   24.664592] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   24.664709] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   24.664836] page_type: f5(slab)
[   24.665434] raw: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   24.665624] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   24.665749] head: 0bfffe0000000040 fff00000c0002280 dead000000000122 0000000000000000
[   24.665866] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   24.665985] head: 0bfffe0000000003 ffffc1ffc31dfa01 00000000ffffffff 00000000ffffffff
[   24.666132] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   24.666600] page dumped because: kasan: bad access detected
[   24.666726] 
[   24.666803] Memory state around the buggy address:
[   24.666882]  fff00000c77e9e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.667029]  fff00000c77e9e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.667203] >fff00000c77e9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.667503]                    ^
[   24.667759]  fff00000c77e9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.667963]  fff00000c77ea000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.668061] ==================================================================


[   10.822009] ==================================================================
[   10.823004] BUG: KASAN: slab-out-of-bounds in kmalloc_big_oob_right+0x316/0x370
[   10.823492] Write of size 1 at addr ffff888102a0df00 by task kunit_try_catch/161
[   10.824809] 
[   10.825995] CPU: 0 UID: 0 PID: 161 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250605 #1 PREEMPT(voluntary) 
[   10.826452] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.826466] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.826486] Call Trace:
[   10.826498]  <TASK>
[   10.826512]  dump_stack_lvl+0x73/0xb0
[   10.826541]  print_report+0xd1/0x650
[   10.826563]  ? __virt_addr_valid+0x1db/0x2d0
[   10.826591]  ? kmalloc_big_oob_right+0x316/0x370
[   10.826635]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.826658]  ? kmalloc_big_oob_right+0x316/0x370
[   10.826680]  kasan_report+0x141/0x180
[   10.826701]  ? kmalloc_big_oob_right+0x316/0x370
[   10.826727]  __asan_report_store1_noabort+0x1b/0x30
[   10.826747]  kmalloc_big_oob_right+0x316/0x370
[   10.826769]  ? __pfx_kmalloc_big_oob_right+0x10/0x10
[   10.826791]  ? __schedule+0x10cc/0x2b60
[   10.826814]  ? __pfx_read_tsc+0x10/0x10
[   10.826834]  ? ktime_get_ts64+0x86/0x230
[   10.826856]  kunit_try_run_case+0x1a5/0x480
[   10.826877]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.826908]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.826950]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.826976]  ? __kthread_parkme+0x82/0x180
[   10.826995]  ? preempt_count_sub+0x50/0x80
[   10.827019]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.827039]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.827062]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.827086]  kthread+0x337/0x6f0
[   10.827104]  ? trace_preempt_on+0x20/0xc0
[   10.827126]  ? __pfx_kthread+0x10/0x10
[   10.827145]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.827167]  ? calculate_sigpending+0x7b/0xa0
[   10.827191]  ? __pfx_kthread+0x10/0x10
[   10.827212]  ret_from_fork+0x116/0x1d0
[   10.827229]  ? __pfx_kthread+0x10/0x10
[   10.827249]  ret_from_fork_asm+0x1a/0x30
[   10.827278]  </TASK>
[   10.827288] 
[   10.840973] Allocated by task 161:
[   10.841441]  kasan_save_stack+0x45/0x70
[   10.841860]  kasan_save_track+0x18/0x40
[   10.842337]  kasan_save_alloc_info+0x3b/0x50
[   10.842847]  __kasan_kmalloc+0xb7/0xc0
[   10.843294]  __kmalloc_cache_noprof+0x189/0x420
[   10.843450]  kmalloc_big_oob_right+0xa9/0x370
[   10.843595]  kunit_try_run_case+0x1a5/0x480
[   10.843998]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.844586]  kthread+0x337/0x6f0
[   10.845005]  ret_from_fork+0x116/0x1d0
[   10.845452]  ret_from_fork_asm+0x1a/0x30
[   10.845903] 
[   10.846133] The buggy address belongs to the object at ffff888102a0c000
[   10.846133]  which belongs to the cache kmalloc-8k of size 8192
[   10.847121] The buggy address is located 0 bytes to the right of
[   10.847121]  allocated 7936-byte region [ffff888102a0c000, ffff888102a0df00)
[   10.847995] 
[   10.848220] The buggy address belongs to the physical page:
[   10.848868] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a08
[   10.849816] head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   10.850397] flags: 0x200000000000040(head|node=0|zone=2)
[   10.850687] page_type: f5(slab)
[   10.851073] raw: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.851694] raw: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.851940] head: 0200000000000040 ffff888100042280 dead000000000122 0000000000000000
[   10.852174] head: 0000000000000000 0000000080020002 00000000f5000000 0000000000000000
[   10.852407] head: 0200000000000003 ffffea00040a8201 00000000ffffffff 00000000ffffffff
[   10.852639] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
[   10.852880] page dumped because: kasan: bad access detected
[   10.853455] 
[   10.853614] Memory state around the buggy address:
[   10.854204]  ffff888102a0de00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.854729]  ffff888102a0de80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   10.854961] >ffff888102a0df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.855172]                    ^
[   10.855287]  ffff888102a0df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.855501]  ffff888102a0e000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.855733] ==================================================================