Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.629774] ==================================================================
[   22.629970] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   22.630140] Write of size 8 at addr fff00000c76c5171 by task kunit_try_catch/180
[   22.630267] 
[   22.631831] CPU: 1 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   22.632564] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.632811] Hardware name: linux,dummy-virt (DT)
[   22.632940] Call trace:
[   22.633103]  show_stack+0x20/0x38 (C)
[   22.633226]  dump_stack_lvl+0x8c/0xd0
[   22.633316]  print_report+0x118/0x608
[   22.633414]  kasan_report+0xdc/0x128
[   22.633519]  kasan_check_range+0x100/0x1a8
[   22.634129]  __asan_memset+0x34/0x78
[   22.634257]  kmalloc_oob_memset_8+0x150/0x2f8
[   22.634387]  kunit_try_run_case+0x170/0x3f0
[   22.634480]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.634544]  kthread+0x328/0x630
[   22.634597]  ret_from_fork+0x10/0x20
[   22.634656] 
[   22.634679] Allocated by task 180:
[   22.634716]  kasan_save_stack+0x3c/0x68
[   22.634771]  kasan_save_track+0x20/0x40
[   22.634815]  kasan_save_alloc_info+0x40/0x58
[   22.634859]  __kasan_kmalloc+0xd4/0xd8
[   22.634900]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.634950]  kmalloc_oob_memset_8+0xb0/0x2f8
[   22.634995]  kunit_try_run_case+0x170/0x3f0
[   22.635039]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.635090]  kthread+0x328/0x630
[   22.635131]  ret_from_fork+0x10/0x20
[   22.635172] 
[   22.635196] The buggy address belongs to the object at fff00000c76c5100
[   22.635196]  which belongs to the cache kmalloc-128 of size 128
[   22.635262] The buggy address is located 113 bytes inside of
[   22.635262]  allocated 120-byte region [fff00000c76c5100, fff00000c76c5178)
[   22.635331] 
[   22.635355] The buggy address belongs to the physical page:
[   22.635394] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076c5
[   22.635578] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.635760] page_type: f5(slab)
[   22.635909] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   22.636084] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   22.636219] page dumped because: kasan: bad access detected
[   22.636285] 
[   22.636320] Memory state around the buggy address:
[   22.636380]  fff00000c76c5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.636474]  fff00000c76c5080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.636566] >fff00000c76c5100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   22.636669]                                                                 ^
[   22.636776]  fff00000c76c5180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.636884]  fff00000c76c5200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.636980] ==================================================================

[   13.857119] ==================================================================
[   13.857617] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   13.858263] Write of size 8 at addr ffff888103391a71 by task kunit_try_catch/196
[   13.858574] 
[   13.858827] CPU: 0 UID: 0 PID: 196 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   13.858962] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.859005] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.859050] Call Trace:
[   13.859079]  <TASK>
[   13.859115]  dump_stack_lvl+0x73/0xb0
[   13.859221]  print_report+0xd1/0x650
[   13.859293]  ? __virt_addr_valid+0x1db/0x2d0
[   13.859343]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.859389]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.859466]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.859526]  kasan_report+0x141/0x180
[   13.859593]  ? kmalloc_oob_memset_8+0x166/0x330
[   13.859642]  kasan_check_range+0x10c/0x1c0
[   13.859679]  __asan_memset+0x27/0x50
[   13.859720]  kmalloc_oob_memset_8+0x166/0x330
[   13.859765]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   13.859846]  ? __schedule+0x10cc/0x2b30
[   13.859932]  ? __pfx_read_tsc+0x10/0x10
[   13.859992]  ? ktime_get_ts64+0x86/0x230
[   13.860049]  kunit_try_run_case+0x1a5/0x480
[   13.860098]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.860133]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.860171]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.860195]  ? __kthread_parkme+0x82/0x180
[   13.860217]  ? preempt_count_sub+0x50/0x80
[   13.860243]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.860266]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.860288]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.860309]  kthread+0x337/0x6f0
[   13.860325]  ? trace_preempt_on+0x20/0xc0
[   13.860349]  ? __pfx_kthread+0x10/0x10
[   13.860367]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.860386]  ? calculate_sigpending+0x7b/0xa0
[   13.860407]  ? __pfx_kthread+0x10/0x10
[   13.860424]  ret_from_fork+0x41/0x80
[   13.860444]  ? __pfx_kthread+0x10/0x10
[   13.860461]  ret_from_fork_asm+0x1a/0x30
[   13.860490]  </TASK>
[   13.860503] 
[   13.869106] Allocated by task 196:
[   13.869449]  kasan_save_stack+0x45/0x70
[   13.869792]  kasan_save_track+0x18/0x40
[   13.870097]  kasan_save_alloc_info+0x3b/0x50
[   13.870480]  __kasan_kmalloc+0xb7/0xc0
[   13.870880]  __kmalloc_cache_noprof+0x189/0x420
[   13.871265]  kmalloc_oob_memset_8+0xac/0x330
[   13.871645]  kunit_try_run_case+0x1a5/0x480
[   13.871885]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.872109]  kthread+0x337/0x6f0
[   13.872274]  ret_from_fork+0x41/0x80
[   13.872442]  ret_from_fork_asm+0x1a/0x30
[   13.872644] 
[   13.872755] The buggy address belongs to the object at ffff888103391a00
[   13.872755]  which belongs to the cache kmalloc-128 of size 128
[   13.873173] The buggy address is located 113 bytes inside of
[   13.873173]  allocated 120-byte region [ffff888103391a00, ffff888103391a78)
[   13.874100] 
[   13.874273] The buggy address belongs to the physical page:
[   13.874673] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103391
[   13.875317] flags: 0x200000000000000(node=0|zone=2)
[   13.875695] page_type: f5(slab)
[   13.875988] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   13.876366] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   13.876964] page dumped because: kasan: bad access detected
[   13.877261] 
[   13.877424] Memory state around the buggy address:
[   13.877841]  ffff888103391900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.878190]  ffff888103391980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.878643] >ffff888103391a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   13.878995]                                                                 ^
[   13.879268]  ffff888103391a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.879527]  ffff888103391b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.879785] ==================================================================