Hay
Date
July 4, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.081249] ==================================================================
[   18.081325] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   18.081394] Write of size 2 at addr fff00000c638eb77 by task kunit_try_catch/172
[   18.081443] 
[   18.081480] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   18.081560] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.081596] Hardware name: linux,dummy-virt (DT)
[   18.081628] Call trace:
[   18.081650]  show_stack+0x20/0x38 (C)
[   18.081708]  dump_stack_lvl+0x8c/0xd0
[   18.081756]  print_report+0x118/0x608
[   18.081801]  kasan_report+0xdc/0x128
[   18.082794]  kasan_check_range+0x100/0x1a8
[   18.082905]  __asan_memset+0x34/0x78
[   18.082978]  kmalloc_oob_memset_2+0x150/0x2f8
[   18.083052]  kunit_try_run_case+0x170/0x3f0
[   18.083098]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.083258]  kthread+0x328/0x630
[   18.083498]  ret_from_fork+0x10/0x20
[   18.083656] 
[   18.083839] Allocated by task 172:
[   18.083910]  kasan_save_stack+0x3c/0x68
[   18.084357]  kasan_save_track+0x20/0x40
[   18.084531]  kasan_save_alloc_info+0x40/0x58
[   18.084787]  __kasan_kmalloc+0xd4/0xd8
[   18.084876]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.085030]  kmalloc_oob_memset_2+0xb0/0x2f8
[   18.085440]  kunit_try_run_case+0x170/0x3f0
[   18.085728]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.085859]  kthread+0x328/0x630
[   18.085938]  ret_from_fork+0x10/0x20
[   18.086266] 
[   18.086396] The buggy address belongs to the object at fff00000c638eb00
[   18.086396]  which belongs to the cache kmalloc-128 of size 128
[   18.086774] The buggy address is located 119 bytes inside of
[   18.086774]  allocated 120-byte region [fff00000c638eb00, fff00000c638eb78)
[   18.086893] 
[   18.086942] The buggy address belongs to the physical page:
[   18.086972] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10638e
[   18.087296] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.087670] page_type: f5(slab)
[   18.087736] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   18.088076] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.088149] page dumped because: kasan: bad access detected
[   18.088275] 
[   18.088718] Memory state around the buggy address:
[   18.088849]  fff00000c638ea00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.088992]  fff00000c638ea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.089074] >fff00000c638eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.089435]                                                                 ^
[   18.089499]  fff00000c638eb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.089690]  fff00000c638ec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.090150] ==================================================================

[   11.972139] ==================================================================
[   11.973179] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   11.973871] Write of size 2 at addr ffff888102be6f77 by task kunit_try_catch/189
[   11.974567] 
[   11.974837] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.974891] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.974913] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.974936] Call Trace:
[   11.974952]  <TASK>
[   11.974971]  dump_stack_lvl+0x73/0xb0
[   11.975009]  print_report+0xd1/0x650
[   11.975033]  ? __virt_addr_valid+0x1db/0x2d0
[   11.975056]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.975077]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.975097]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.975118]  kasan_report+0x141/0x180
[   11.975138]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.975163]  kasan_check_range+0x10c/0x1c0
[   11.975186]  __asan_memset+0x27/0x50
[   11.975205]  kmalloc_oob_memset_2+0x166/0x330
[   11.975236]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.975363]  ? __schedule+0x10cc/0x2b60
[   11.975393]  ? __pfx_read_tsc+0x10/0x10
[   11.975495]  ? ktime_get_ts64+0x86/0x230
[   11.975576]  kunit_try_run_case+0x1a5/0x480
[   11.975602]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.975624]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.975647]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.975668]  ? __kthread_parkme+0x82/0x180
[   11.975688]  ? preempt_count_sub+0x50/0x80
[   11.975710]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.975732]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.975753]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.975774]  kthread+0x337/0x6f0
[   11.975792]  ? trace_preempt_on+0x20/0xc0
[   11.975815]  ? __pfx_kthread+0x10/0x10
[   11.975834]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.975853]  ? calculate_sigpending+0x7b/0xa0
[   11.975875]  ? __pfx_kthread+0x10/0x10
[   11.975895]  ret_from_fork+0x116/0x1d0
[   11.975914]  ? __pfx_kthread+0x10/0x10
[   11.975933]  ret_from_fork_asm+0x1a/0x30
[   11.975963]  </TASK>
[   11.975974] 
[   11.987122] Allocated by task 189:
[   11.987689]  kasan_save_stack+0x45/0x70
[   11.988157]  kasan_save_track+0x18/0x40
[   11.988996]  kasan_save_alloc_info+0x3b/0x50
[   11.989377]  __kasan_kmalloc+0xb7/0xc0
[   11.989545]  __kmalloc_cache_noprof+0x189/0x420
[   11.989709]  kmalloc_oob_memset_2+0xac/0x330
[   11.989865]  kunit_try_run_case+0x1a5/0x480
[   11.990056]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.991017]  kthread+0x337/0x6f0
[   11.991867]  ret_from_fork+0x116/0x1d0
[   11.992058]  ret_from_fork_asm+0x1a/0x30
[   11.992427] 
[   11.992533] The buggy address belongs to the object at ffff888102be6f00
[   11.992533]  which belongs to the cache kmalloc-128 of size 128
[   11.993189] The buggy address is located 119 bytes inside of
[   11.993189]  allocated 120-byte region [ffff888102be6f00, ffff888102be6f78)
[   11.994320] 
[   11.994434] The buggy address belongs to the physical page:
[   11.994886] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102be6
[   11.995718] flags: 0x200000000000000(node=0|zone=2)
[   11.996179] page_type: f5(slab)
[   11.996629] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.997099] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.997678] page dumped because: kasan: bad access detected
[   11.997993] 
[   11.998084] Memory state around the buggy address:
[   11.998548]  ffff888102be6e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.999258]  ffff888102be6e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.999834] >ffff888102be6f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.000331]                                                                 ^
[   12.000648]  ffff888102be6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.000961]  ffff888102be7000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.001519] ==================================================================