Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.033433] ==================================================================
[   17.033576] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   17.033684] Write of size 16 at addr fff00000c5733a69 by task kunit_try_catch/179
[   17.033768] 
[   17.033804] CPU: 1 UID: 0 PID: 179 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.033932] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.034009] Hardware name: linux,dummy-virt (DT)
[   17.034040] Call trace:
[   17.034062]  show_stack+0x20/0x38 (C)
[   17.034111]  dump_stack_lvl+0x8c/0xd0
[   17.034161]  print_report+0x118/0x608
[   17.034208]  kasan_report+0xdc/0x128
[   17.034253]  kasan_check_range+0x100/0x1a8
[   17.034299]  __asan_memset+0x34/0x78
[   17.034341]  kmalloc_oob_memset_16+0x150/0x2f8
[   17.034387]  kunit_try_run_case+0x170/0x3f0
[   17.034436]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.034487]  kthread+0x328/0x630
[   17.034527]  ret_from_fork+0x10/0x20
[   17.034609] 
[   17.034683] Allocated by task 179:
[   17.034765]  kasan_save_stack+0x3c/0x68
[   17.034806]  kasan_save_track+0x20/0x40
[   17.034842]  kasan_save_alloc_info+0x40/0x58
[   17.034881]  __kasan_kmalloc+0xd4/0xd8
[   17.034917]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.034956]  kmalloc_oob_memset_16+0xb0/0x2f8
[   17.034993]  kunit_try_run_case+0x170/0x3f0
[   17.035030]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.035073]  kthread+0x328/0x630
[   17.035176]  ret_from_fork+0x10/0x20
[   17.035257] 
[   17.035319] The buggy address belongs to the object at fff00000c5733a00
[   17.035319]  which belongs to the cache kmalloc-128 of size 128
[   17.035377] The buggy address is located 105 bytes inside of
[   17.035377]  allocated 120-byte region [fff00000c5733a00, fff00000c5733a78)
[   17.035439] 
[   17.035465] The buggy address belongs to the physical page:
[   17.035514] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105733
[   17.035662] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.035810] page_type: f5(slab)
[   17.035934] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.036061] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.036100] page dumped because: kasan: bad access detected
[   17.036132] 
[   17.036149] Memory state around the buggy address:
[   17.036181]  fff00000c5733900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.036225]  fff00000c5733980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.036309] >fff00000c5733a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.036500]                                                                 ^
[   17.037061]  fff00000c5733a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.037159]  fff00000c5733b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.037204] ==================================================================

[   11.745070] ==================================================================
[   11.746430] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   11.747149] Write of size 16 at addr ffff8881027c2969 by task kunit_try_catch/195
[   11.747901] 
[   11.748009] CPU: 1 UID: 0 PID: 195 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.748069] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.748081] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.748101] Call Trace:
[   11.748115]  <TASK>
[   11.748133]  dump_stack_lvl+0x73/0xb0
[   11.748373]  print_report+0xd1/0x650
[   11.748406]  ? __virt_addr_valid+0x1db/0x2d0
[   11.748475]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.748497]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.748518]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.748539]  kasan_report+0x141/0x180
[   11.748560]  ? kmalloc_oob_memset_16+0x166/0x330
[   11.748585]  kasan_check_range+0x10c/0x1c0
[   11.748607]  __asan_memset+0x27/0x50
[   11.748625]  kmalloc_oob_memset_16+0x166/0x330
[   11.748659]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   11.748694]  ? __schedule+0x10cc/0x2b60
[   11.748717]  ? __pfx_read_tsc+0x10/0x10
[   11.748737]  ? ktime_get_ts64+0x86/0x230
[   11.748759]  kunit_try_run_case+0x1a5/0x480
[   11.748782]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.748805]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.748827]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.748848]  ? __kthread_parkme+0x82/0x180
[   11.748867]  ? preempt_count_sub+0x50/0x80
[   11.748890]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.748913]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.748934]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.748956]  kthread+0x337/0x6f0
[   11.748973]  ? trace_preempt_on+0x20/0xc0
[   11.748995]  ? __pfx_kthread+0x10/0x10
[   11.749014]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.749046]  ? calculate_sigpending+0x7b/0xa0
[   11.749069]  ? __pfx_kthread+0x10/0x10
[   11.749088]  ret_from_fork+0x116/0x1d0
[   11.749105]  ? __pfx_kthread+0x10/0x10
[   11.749124]  ret_from_fork_asm+0x1a/0x30
[   11.749153]  </TASK>
[   11.749165] 
[   11.767990] Allocated by task 195:
[   11.768209]  kasan_save_stack+0x45/0x70
[   11.768412]  kasan_save_track+0x18/0x40
[   11.768584]  kasan_save_alloc_info+0x3b/0x50
[   11.769359]  __kasan_kmalloc+0xb7/0xc0
[   11.769972]  __kmalloc_cache_noprof+0x189/0x420
[   11.770745]  kmalloc_oob_memset_16+0xac/0x330
[   11.771296]  kunit_try_run_case+0x1a5/0x480
[   11.771904]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.772658]  kthread+0x337/0x6f0
[   11.773185]  ret_from_fork+0x116/0x1d0
[   11.773781]  ret_from_fork_asm+0x1a/0x30
[   11.774404] 
[   11.774762] The buggy address belongs to the object at ffff8881027c2900
[   11.774762]  which belongs to the cache kmalloc-128 of size 128
[   11.776060] The buggy address is located 105 bytes inside of
[   11.776060]  allocated 120-byte region [ffff8881027c2900, ffff8881027c2978)
[   11.776528] 
[   11.776624] The buggy address belongs to the physical page:
[   11.777554] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027c2
[   11.778797] flags: 0x200000000000000(node=0|zone=2)
[   11.779442] page_type: f5(slab)
[   11.779977] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.780990] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.781925] page dumped because: kasan: bad access detected
[   11.782166] 
[   11.782255] Memory state around the buggy address:
[   11.782455]  ffff8881027c2800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.783338]  ffff8881027c2880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.784461] >ffff8881027c2900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.785313]                                                                 ^
[   11.786291]  ffff8881027c2980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.787300]  ffff8881027c2a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.788333] ==================================================================