Hay
Date
June 17, 2025, 3:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   92.689159] ==================================================================
[   92.690347] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0xd4/0x1e8
[   92.691504] Write of size 128 at addr ffff0000c6077300 by task kunit_try_catch/149
[   92.692768] 
[   92.693326] CPU: 0 PID: 149 Comm: kunit_try_catch Tainted: G    B            N 6.6.94-rc1 #1
[   92.694525] Hardware name: linux,dummy-virt (DT)
[   92.696006] Call trace:
[   92.696600]  dump_backtrace+0x9c/0x128
[   92.697268]  show_stack+0x20/0x38
[   92.698342]  dump_stack_lvl+0x60/0xb0
[   92.699074]  print_report+0xf8/0x5e8
[   92.699806]  kasan_report+0xdc/0x128
[   92.700910]  kasan_check_range+0xe8/0x190
[   92.701541]  __asan_memset+0x34/0x78
[   92.702403]  kmalloc_oob_in_memset+0xd4/0x1e8
[   92.703405]  kunit_try_run_case+0x114/0x298
[   92.704292]  kunit_generic_run_threadfn_adapter+0x38/0x60
[   92.705385]  kthread+0x18c/0x1a8
[   92.706217]  ret_from_fork+0x10/0x20
[   92.707072] 
[   92.707456] Allocated by task 149:
[   92.707996]  kasan_save_stack+0x3c/0x68
[   92.709249]  kasan_set_track+0x2c/0x40
[   92.709968]  kasan_save_alloc_info+0x24/0x38
[   92.710876]  __kasan_kmalloc+0xd4/0xd8
[   92.712037]  kmalloc_trace+0x68/0x130
[   92.714077]  kmalloc_oob_in_memset+0xa0/0x1e8
[   92.716628]  kunit_try_run_case+0x114/0x298
[   92.717852]  kunit_generic_run_threadfn_adapter+0x38/0x60
[   92.719309]  kthread+0x18c/0x1a8
[   92.720702]  ret_from_fork+0x10/0x20
[   92.722567] 
[   92.722942] The buggy address belongs to the object at ffff0000c6077300
[   92.722942]  which belongs to the cache kmalloc-128 of size 128
[   92.724552] The buggy address is located 0 bytes inside of
[   92.724552]  allocated 120-byte region [ffff0000c6077300, ffff0000c6077378)
[   92.726184] 
[   92.726590] The buggy address belongs to the physical page:
[   92.727572] page:000000001b5b04a5 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106077
[   92.728644] flags: 0xbfffc0000000800(slab|node=0|zone=2|lastcpupid=0xffff)
[   92.729559] page_type: 0xffffffff()
[   92.729896] raw: 0bfffc0000000800 ffff0000c00018c0 dead000000000122 0000000000000000
[   92.730374] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
[   92.732015] page dumped because: kasan: bad access detected
[   92.732958] 
[   92.733369] Memory state around the buggy address:
[   92.734193]  ffff0000c6077200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
[   92.736293]  ffff0000c6077280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   92.737357] >ffff0000c6077300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   92.738380]                                                                 ^
[   92.739427]  ffff0000c6077380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   92.740541]  ffff0000c6077400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   92.742016] ==================================================================


[   33.902840] ==================================================================
[   33.903501] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0xda/0x1e0
[   33.904263] Write of size 128 at addr ffff888102862200 by task kunit_try_catch/164
[   33.904634] 
[   33.904775] CPU: 0 PID: 164 Comm: kunit_try_catch Tainted: G    B            N 6.6.94-rc1 #1
[   33.905291] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   33.906234] Call Trace:
[   33.906594]  <TASK>
[   33.906794]  dump_stack_lvl+0x4e/0x90
[   33.907269]  print_report+0xd2/0x650
[   33.907545]  ? __virt_addr_valid+0x156/0x1e0
[   33.908011]  ? kmalloc_oob_in_memset+0xda/0x1e0
[   33.908330]  ? kasan_complete_mode_report_info+0x2a/0x200
[   33.908891]  ? kmalloc_oob_in_memset+0xda/0x1e0
[   33.909315]  kasan_report+0x147/0x180
[   33.909747]  ? kmalloc_oob_in_memset+0xda/0x1e0
[   33.910103]  kasan_check_range+0x10c/0x1c0
[   33.910544]  __asan_memset+0x27/0x50
[   33.910955]  kmalloc_oob_in_memset+0xda/0x1e0
[   33.911260]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   33.911733]  ? __schedule+0x715/0x11a0
[   33.912115]  ? ktime_get_ts64+0x118/0x140
[   33.912504]  kunit_try_run_case+0x120/0x290
[   33.913001]  ? __pfx_kunit_try_run_case+0x10/0x10
[   33.913311]  ? __kasan_check_write+0x18/0x20
[   33.913698]  ? trace_preempt_on+0x20/0xa0
[   33.914093]  ? __kthread_parkme+0x4f/0xd0
[   33.914386]  ? preempt_count_sub+0x50/0x80
[   33.914825]  ? __pfx_kunit_try_run_case+0x10/0x10
[   33.915254]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   33.915654]  kunit_generic_run_threadfn_adapter+0x33/0x50
[   33.916152]  kthread+0x19e/0x1e0
[   33.916513]  ? __pfx_kthread+0x10/0x10
[   33.916938]  ret_from_fork+0x41/0x70
[   33.917306]  ? __pfx_kthread+0x10/0x10
[   33.917592]  ret_from_fork_asm+0x1b/0x30
[   33.918051]  </TASK>
[   33.918329] 
[   33.918444] Allocated by task 164:
[   33.918789]  kasan_save_stack+0x44/0x70
[   33.919083]  kasan_set_track+0x29/0x40
[   33.919323]  kasan_save_alloc_info+0x22/0x30
[   33.919575]  __kasan_kmalloc+0xb7/0xc0
[   33.919966]  kmalloc_trace+0x4c/0xb0
[   33.920479]  kmalloc_oob_in_memset+0x9f/0x1e0
[   33.920904]  kunit_try_run_case+0x120/0x290
[   33.921296]  kunit_generic_run_threadfn_adapter+0x33/0x50
[   33.921719]  kthread+0x19e/0x1e0
[   33.922080]  ret_from_fork+0x41/0x70
[   33.922334]  ret_from_fork_asm+0x1b/0x30
[   33.922742] 
[   33.922989] The buggy address belongs to the object at ffff888102862200
[   33.922989]  which belongs to the cache kmalloc-128 of size 128
[   33.923752] The buggy address is located 0 bytes inside of
[   33.923752]  allocated 120-byte region [ffff888102862200, ffff888102862278)
[   33.924550] 
[   33.924836] The buggy address belongs to the physical page:
[   33.925261] page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102862
[   33.925976] flags: 0x200000000000800(slab|node=0|zone=2)
[   33.926318] page_type: 0xffffffff()
[   33.926722] raw: 0200000000000800 ffff8881000418c0 dead000000000122 0000000000000000
[   33.927266] raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
[   33.927802] page dumped because: kasan: bad access detected
[   33.928134] 
[   33.928455] Memory state around the buggy address:
[   33.928895]  ffff888102862100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.929382]  ffff888102862180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.929794] >ffff888102862200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   33.930344]                                                                 ^
[   33.930899]  ffff888102862280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.931413]  ffff888102862300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.931946] ==================================================================