Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.524241] ==================================================================
[   31.524298] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   31.524347] Write of size 128 at addr fff00000c3efd800 by task kunit_try_catch/201
[   31.524396] 
[   31.524428] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   31.524845] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.524972] Hardware name: linux,dummy-virt (DT)
[   31.525145] Call trace:
[   31.525215]  show_stack+0x20/0x38 (C)
[   31.525363]  dump_stack_lvl+0x8c/0xd0
[   31.525424]  print_report+0x118/0x5e8
[   31.525752]  kasan_report+0xdc/0x128
[   31.525896]  kasan_check_range+0x100/0x1a8
[   31.526009]  __asan_memset+0x34/0x78
[   31.526188]  kmalloc_oob_in_memset+0x144/0x2d0
[   31.526287]  kunit_try_run_case+0x170/0x3f0
[   31.526409]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.526488]  kthread+0x328/0x630
[   31.526755]  ret_from_fork+0x10/0x20
[   31.526860] 
[   31.527103] Allocated by task 201:
[   31.527305]  kasan_save_stack+0x3c/0x68
[   31.527477]  kasan_save_track+0x20/0x40
[   31.527673]  kasan_save_alloc_info+0x40/0x58
[   31.527894]  __kasan_kmalloc+0xd4/0xd8
[   31.527970]  __kmalloc_cache_noprof+0x16c/0x3c0
[   31.528036]  kmalloc_oob_in_memset+0xb0/0x2d0
[   31.529242]  kunit_try_run_case+0x170/0x3f0
[   31.529290]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.529332]  kthread+0x328/0x630
[   31.529365]  ret_from_fork+0x10/0x20
[   31.529400] 
[   31.529419] The buggy address belongs to the object at fff00000c3efd800
[   31.529419]  which belongs to the cache kmalloc-128 of size 128
[   31.529475] The buggy address is located 0 bytes inside of
[   31.529475]  allocated 120-byte region [fff00000c3efd800, fff00000c3efd878)
[   31.529533] 
[   31.529552] The buggy address belongs to the physical page:
[   31.529581] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103efd
[   31.529629] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.529675] page_type: f5(slab)
[   31.529712] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   31.529759] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   31.529796] page dumped because: kasan: bad access detected
[   31.529825] 
[   31.529844] Memory state around the buggy address:
[   31.529875]  fff00000c3efd700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   31.529915]  fff00000c3efd780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.529954] >fff00000c3efd800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   31.529989]                                                                 ^
[   31.530032]  fff00000c3efd880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.530071]  fff00000c3efd900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.530118] ==================================================================


[   24.891920] ==================================================================
[   24.892606] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   24.892869] Write of size 128 at addr ffff8881012bcf00 by task kunit_try_catch/218
[   24.893730] 
[   24.893898] CPU: 0 UID: 0 PID: 218 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   24.893952] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.893963] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.893985] Call Trace:
[   24.893998]  <TASK>
[   24.894014]  dump_stack_lvl+0x73/0xb0
[   24.894047]  print_report+0xd1/0x640
[   24.894070]  ? __virt_addr_valid+0x1db/0x2d0
[   24.894093]  ? kmalloc_oob_in_memset+0x15f/0x320
[   24.894114]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.894139]  ? kmalloc_oob_in_memset+0x15f/0x320
[   24.894160]  kasan_report+0x141/0x180
[   24.894181]  ? kmalloc_oob_in_memset+0x15f/0x320
[   24.894221]  kasan_check_range+0x10c/0x1c0
[   24.894243]  __asan_memset+0x27/0x50
[   24.894266]  kmalloc_oob_in_memset+0x15f/0x320
[   24.894287]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   24.894308]  ? __schedule+0x10da/0x2b60
[   24.894332]  ? __pfx_read_tsc+0x10/0x10
[   24.894354]  ? ktime_get_ts64+0x86/0x230
[   24.894378]  kunit_try_run_case+0x1a5/0x480
[   24.894402]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.894423]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.894456]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.894489]  ? __kthread_parkme+0x82/0x180
[   24.894510]  ? preempt_count_sub+0x50/0x80
[   24.894533]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.894555]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.894577]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.894599]  kthread+0x337/0x6f0
[   24.894622]  ? trace_preempt_on+0x20/0xc0
[   24.894645]  ? __pfx_kthread+0x10/0x10
[   24.894665]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.894694]  ? calculate_sigpending+0x7b/0xa0
[   24.894719]  ? __pfx_kthread+0x10/0x10
[   24.894741]  ret_from_fork+0x116/0x1d0
[   24.894759]  ? __pfx_kthread+0x10/0x10
[   24.894779]  ret_from_fork_asm+0x1a/0x30
[   24.894821]  </TASK>
[   24.894832] 
[   24.906489] Allocated by task 218:
[   24.906626]  kasan_save_stack+0x45/0x70
[   24.906769]  kasan_save_track+0x18/0x40
[   24.907162]  kasan_save_alloc_info+0x3b/0x50
[   24.907542]  __kasan_kmalloc+0xb7/0xc0
[   24.907887]  __kmalloc_cache_noprof+0x189/0x420
[   24.908444]  kmalloc_oob_in_memset+0xac/0x320
[   24.908845]  kunit_try_run_case+0x1a5/0x480
[   24.909270]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.909742]  kthread+0x337/0x6f0
[   24.910030]  ret_from_fork+0x116/0x1d0
[   24.910398]  ret_from_fork_asm+0x1a/0x30
[   24.910813] 
[   24.910969] The buggy address belongs to the object at ffff8881012bcf00
[   24.910969]  which belongs to the cache kmalloc-128 of size 128
[   24.911835] The buggy address is located 0 bytes inside of
[   24.911835]  allocated 120-byte region [ffff8881012bcf00, ffff8881012bcf78)
[   24.912273] 
[   24.912411] The buggy address belongs to the physical page:
[   24.912907] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1012bc
[   24.913643] flags: 0x200000000000000(node=0|zone=2)
[   24.913977] page_type: f5(slab)
[   24.914130] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   24.914518] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.914744] page dumped because: kasan: bad access detected
[   24.915192] 
[   24.915327] Memory state around the buggy address:
[   24.915518]  ffff8881012bce00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.915730]  ffff8881012bce80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.915937] >ffff8881012bcf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.916276]                                                                 ^
[   24.916559]  ffff8881012bcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.916839]  ffff8881012bd000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.917169] ==================================================================