Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.046404] ==================================================================
[   33.046517] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   33.046673] Write of size 16 at addr fff00000c63f7369 by task kunit_try_catch/190
[   33.047696] 
[   33.047818] CPU: 1 UID: 0 PID: 190 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT 
[   33.048128] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.048194] Hardware name: linux,dummy-virt (DT)
[   33.048269] Call trace:
[   33.048386]  show_stack+0x20/0x38 (C)
[   33.048506]  dump_stack_lvl+0x8c/0xd0
[   33.048618]  print_report+0x118/0x608
[   33.048728]  kasan_report+0xdc/0x128
[   33.048869]  kasan_check_range+0x100/0x1a8
[   33.048989]  __asan_memset+0x34/0x78
[   33.049113]  kmalloc_oob_memset_16+0x150/0x2f8
[   33.049228]  kunit_try_run_case+0x170/0x3f0
[   33.049347]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.049469]  kthread+0x328/0x630
[   33.049582]  ret_from_fork+0x10/0x20
[   33.049907] 
[   33.050444] Allocated by task 190:
[   33.050521]  kasan_save_stack+0x3c/0x68
[   33.050814]  kasan_save_track+0x20/0x40
[   33.050931]  kasan_save_alloc_info+0x40/0x58
[   33.051631]  __kasan_kmalloc+0xd4/0xd8
[   33.052322]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.052431]  kmalloc_oob_memset_16+0xb0/0x2f8
[   33.052526]  kunit_try_run_case+0x170/0x3f0
[   33.052616]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.052716]  kthread+0x328/0x630
[   33.052849]  ret_from_fork+0x10/0x20
[   33.053378] 
[   33.053514] The buggy address belongs to the object at fff00000c63f7300
[   33.053514]  which belongs to the cache kmalloc-128 of size 128
[   33.053931] The buggy address is located 105 bytes inside of
[   33.053931]  allocated 120-byte region [fff00000c63f7300, fff00000c63f7378)
[   33.054298] 
[   33.054500] The buggy address belongs to the physical page:
[   33.054600] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063f7
[   33.054770] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.054939] page_type: f5(slab)
[   33.055148] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   33.055405] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   33.056112] page dumped because: kasan: bad access detected
[   33.057315] 
[   33.057380] Memory state around the buggy address:
[   33.057456]  fff00000c63f7200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   33.057728]  fff00000c63f7280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.058260] >fff00000c63f7300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   33.058676]                                                                 ^
[   33.058818]  fff00000c63f7380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.058948]  fff00000c63f7400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.059066] ==================================================================

[   21.941798] ==================================================================
[   21.942219] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   21.942394] Write of size 16 at addr ffff8881023ac669 by task kunit_try_catch/207
[   21.942660] 
[   21.942828] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   21.942899] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.942912] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.942931] Call Trace:
[   21.942945]  <TASK>
[   21.942959]  dump_stack_lvl+0x73/0xb0
[   21.942986]  print_report+0xd1/0x650
[   21.943004]  ? __virt_addr_valid+0x1db/0x2d0
[   21.943030]  ? kmalloc_oob_memset_16+0x166/0x330
[   21.943061]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.943100]  ? kmalloc_oob_memset_16+0x166/0x330
[   21.943136]  kasan_report+0x141/0x180
[   21.943173]  ? kmalloc_oob_memset_16+0x166/0x330
[   21.943218]  kasan_check_range+0x10c/0x1c0
[   21.943245]  __asan_memset+0x27/0x50
[   21.943266]  kmalloc_oob_memset_16+0x166/0x330
[   21.943284]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   21.943304]  ? __schedule+0x10cc/0x2b60
[   21.943322]  ? __pfx_read_tsc+0x10/0x10
[   21.943341]  ? ktime_get_ts64+0x86/0x230
[   21.943363]  kunit_try_run_case+0x1a5/0x480
[   21.943402]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.943423]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.943442]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.943462]  ? __kthread_parkme+0x82/0x180
[   21.943479]  ? preempt_count_sub+0x50/0x80
[   21.943500]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.943520]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.943540]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.943560]  kthread+0x337/0x6f0
[   21.943576]  ? trace_preempt_on+0x20/0xc0
[   21.943596]  ? __pfx_kthread+0x10/0x10
[   21.943613]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.943631]  ? calculate_sigpending+0x7b/0xa0
[   21.943651]  ? __pfx_kthread+0x10/0x10
[   21.943670]  ret_from_fork+0x116/0x1d0
[   21.943686]  ? __pfx_kthread+0x10/0x10
[   21.943703]  ret_from_fork_asm+0x1a/0x30
[   21.943730]  </TASK>
[   21.943740] 
[   21.954270] Allocated by task 207:
[   21.954674]  kasan_save_stack+0x45/0x70
[   21.954965]  kasan_save_track+0x18/0x40
[   21.955512]  kasan_save_alloc_info+0x3b/0x50
[   21.955733]  __kasan_kmalloc+0xb7/0xc0
[   21.955854]  __kmalloc_cache_noprof+0x189/0x420
[   21.956441]  kmalloc_oob_memset_16+0xac/0x330
[   21.956636]  kunit_try_run_case+0x1a5/0x480
[   21.957114]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.957460]  kthread+0x337/0x6f0
[   21.957715]  ret_from_fork+0x116/0x1d0
[   21.957833]  ret_from_fork_asm+0x1a/0x30
[   21.958271] 
[   21.958395] The buggy address belongs to the object at ffff8881023ac600
[   21.958395]  which belongs to the cache kmalloc-128 of size 128
[   21.958808] The buggy address is located 105 bytes inside of
[   21.958808]  allocated 120-byte region [ffff8881023ac600, ffff8881023ac678)
[   21.959585] 
[   21.959675] The buggy address belongs to the physical page:
[   21.960365] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023ac
[   21.961072] flags: 0x200000000000000(node=0|zone=2)
[   21.961347] page_type: f5(slab)
[   21.961479] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   21.961837] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   21.962537] page dumped because: kasan: bad access detected
[   21.962757] 
[   21.963115] Memory state around the buggy address:
[   21.963437]  ffff8881023ac500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   21.963744]  ffff8881023ac580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.964374] >ffff8881023ac600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   21.964784]                                                                 ^
[   21.965129]  ffff8881023ac680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.965448]  ffff8881023ac700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.965736] ==================================================================