Hay
Date
June 17, 2025, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   16.868539] ==================================================================
[   16.868679] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   16.868743] Write of size 2 at addr fff00000c748a777 by task kunit_try_catch/181
[   16.868793] 
[   16.868837] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT 
[   16.868936] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.868962] Hardware name: linux,dummy-virt (DT)
[   16.869233] Call trace:
[   16.869273]  show_stack+0x20/0x38 (C)
[   16.869338]  dump_stack_lvl+0x8c/0xd0
[   16.869679]  print_report+0x118/0x608
[   16.869845]  kasan_report+0xdc/0x128
[   16.869920]  kasan_check_range+0x100/0x1a8
[   16.869980]  __asan_memset+0x34/0x78
[   16.870033]  kmalloc_oob_memset_2+0x150/0x2f8
[   16.870079]  kunit_try_run_case+0x170/0x3f0
[   16.870128]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.870179]  kthread+0x328/0x630
[   16.870242]  ret_from_fork+0x10/0x20
[   16.870302] 
[   16.870321] Allocated by task 181:
[   16.870350]  kasan_save_stack+0x3c/0x68
[   16.870391]  kasan_save_track+0x20/0x40
[   16.870428]  kasan_save_alloc_info+0x40/0x58
[   16.870473]  __kasan_kmalloc+0xd4/0xd8
[   16.870525]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.870565]  kmalloc_oob_memset_2+0xb0/0x2f8
[   16.870602]  kunit_try_run_case+0x170/0x3f0
[   16.870639]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.870681]  kthread+0x328/0x630
[   16.870713]  ret_from_fork+0x10/0x20
[   16.870748] 
[   16.870767] The buggy address belongs to the object at fff00000c748a700
[   16.870767]  which belongs to the cache kmalloc-128 of size 128
[   16.870824] The buggy address is located 119 bytes inside of
[   16.870824]  allocated 120-byte region [fff00000c748a700, fff00000c748a778)
[   16.870893] 
[   16.870914] The buggy address belongs to the physical page:
[   16.871617] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10748a
[   16.871843] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.871973] page_type: f5(slab)
[   16.872138] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   16.872375] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   16.872484] page dumped because: kasan: bad access detected
[   16.872778] 
[   16.872981] Memory state around the buggy address:
[   16.873087]  fff00000c748a600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.873173]  fff00000c748a680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.873571] >fff00000c748a700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   16.873699]                                                                 ^
[   16.873777]  fff00000c748a780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.873987]  fff00000c748a800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.874078] ==================================================================

[   18.039986] ==================================================================
[   18.041062] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   18.041642] Write of size 2 at addr ffff888100ab8377 by task kunit_try_catch/199
[   18.042252] 
[   18.042503] CPU: 1 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250617 #1 PREEMPT(voluntary) 
[   18.042801] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.042917] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.043180] Call Trace:
[   18.043226]  <TASK>
[   18.043276]  dump_stack_lvl+0x73/0xb0
[   18.043363]  print_report+0xd1/0x650
[   18.043437]  ? __virt_addr_valid+0x1db/0x2d0
[   18.043513]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.043689]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.043724]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.043757]  kasan_report+0x141/0x180
[   18.043788]  ? kmalloc_oob_memset_2+0x166/0x330
[   18.043824]  kasan_check_range+0x10c/0x1c0
[   18.043884]  __asan_memset+0x27/0x50
[   18.043911]  kmalloc_oob_memset_2+0x166/0x330
[   18.043941]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   18.043974]  ? __schedule+0x10cc/0x2b60
[   18.044003]  ? __pfx_read_tsc+0x10/0x10
[   18.044032]  ? ktime_get_ts64+0x86/0x230
[   18.044066]  kunit_try_run_case+0x1a5/0x480
[   18.044100]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.044131]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.044159]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.044194]  ? __kthread_parkme+0x82/0x180
[   18.044247]  ? preempt_count_sub+0x50/0x80
[   18.044324]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.044404]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.044452]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.044485]  kthread+0x337/0x6f0
[   18.044511]  ? trace_preempt_on+0x20/0xc0
[   18.044546]  ? __pfx_kthread+0x10/0x10
[   18.044574]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.044608]  ? calculate_sigpending+0x7b/0xa0
[   18.044641]  ? __pfx_kthread+0x10/0x10
[   18.044669]  ret_from_fork+0x116/0x1d0
[   18.044694]  ? __pfx_kthread+0x10/0x10
[   18.044721]  ret_from_fork_asm+0x1a/0x30
[   18.044762]  </TASK>
[   18.044778] 
[   18.061691] Allocated by task 199:
[   18.063013]  kasan_save_stack+0x45/0x70
[   18.063629]  kasan_save_track+0x18/0x40
[   18.064047]  kasan_save_alloc_info+0x3b/0x50
[   18.064668]  __kasan_kmalloc+0xb7/0xc0
[   18.065149]  __kmalloc_cache_noprof+0x189/0x420
[   18.065804]  kmalloc_oob_memset_2+0xac/0x330
[   18.066187]  kunit_try_run_case+0x1a5/0x480
[   18.067083]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.067777]  kthread+0x337/0x6f0
[   18.068082]  ret_from_fork+0x116/0x1d0
[   18.068664]  ret_from_fork_asm+0x1a/0x30
[   18.069138] 
[   18.069487] The buggy address belongs to the object at ffff888100ab8300
[   18.069487]  which belongs to the cache kmalloc-128 of size 128
[   18.070675] The buggy address is located 119 bytes inside of
[   18.070675]  allocated 120-byte region [ffff888100ab8300, ffff888100ab8378)
[   18.071811] 
[   18.072031] The buggy address belongs to the physical page:
[   18.072795] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100ab8
[   18.073619] flags: 0x200000000000000(node=0|zone=2)
[   18.074150] page_type: f5(slab)
[   18.074627] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   18.076061] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   18.076665] page dumped because: kasan: bad access detected
[   18.077309] 
[   18.077523] Memory state around the buggy address:
[   18.077904]  ffff888100ab8200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   18.078612]  ffff888100ab8280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.079186] >ffff888100ab8300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   18.079951]                                                                 ^
[   18.080455]  ffff888100ab8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.080888]  ffff888100ab8400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.081750] ==================================================================