Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.453603] ==================================================================
[   17.454011] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   17.454087] Write of size 2 at addr fff00000c7800377 by task kunit_try_catch/172
[   17.454418] 
[   17.454640] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   17.454738] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.455081] Hardware name: linux,dummy-virt (DT)
[   17.455184] Call trace:
[   17.455215]  show_stack+0x20/0x38 (C)
[   17.455270]  dump_stack_lvl+0x8c/0xd0
[   17.455319]  print_report+0x118/0x608
[   17.455656]  kasan_report+0xdc/0x128
[   17.455726]  kasan_check_range+0x100/0x1a8
[   17.455938]  __asan_memset+0x34/0x78
[   17.456188]  kmalloc_oob_memset_2+0x150/0x2f8
[   17.456477]  kunit_try_run_case+0x170/0x3f0
[   17.456714]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.457001]  kthread+0x328/0x630
[   17.457406]  ret_from_fork+0x10/0x20
[   17.457571] 
[   17.457591] Allocated by task 172:
[   17.457628]  kasan_save_stack+0x3c/0x68
[   17.457963]  kasan_save_track+0x20/0x40
[   17.458126]  kasan_save_alloc_info+0x40/0x58
[   17.458347]  __kasan_kmalloc+0xd4/0xd8
[   17.458533]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.458609]  kmalloc_oob_memset_2+0xb0/0x2f8
[   17.459140]  kunit_try_run_case+0x170/0x3f0
[   17.459260]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.459306]  kthread+0x328/0x630
[   17.459458]  ret_from_fork+0x10/0x20
[   17.459502] 
[   17.459662] The buggy address belongs to the object at fff00000c7800300
[   17.459662]  which belongs to the cache kmalloc-128 of size 128
[   17.459886] The buggy address is located 119 bytes inside of
[   17.459886]  allocated 120-byte region [fff00000c7800300, fff00000c7800378)
[   17.460602] 
[   17.460637] The buggy address belongs to the physical page:
[   17.460939] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107800
[   17.461133] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.461401] page_type: f5(slab)
[   17.461602] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   17.461878] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   17.462004] page dumped because: kasan: bad access detected
[   17.462737] 
[   17.462814] Memory state around the buggy address:
[   17.462853]  fff00000c7800200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   17.463122]  fff00000c7800280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.464031] >fff00000c7800300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   17.464297]                                                                 ^
[   17.464369]  fff00000c7800380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.464498]  fff00000c7800400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.464656] ==================================================================

[   11.542364] ==================================================================
[   11.542956] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   11.543631] Write of size 2 at addr ffff888102cbbf77 by task kunit_try_catch/189
[   11.544108] 
[   11.544342] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   11.544500] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.544513] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.544534] Call Trace:
[   11.544545]  <TASK>
[   11.544561]  dump_stack_lvl+0x73/0xb0
[   11.544590]  print_report+0xd1/0x650
[   11.544612]  ? __virt_addr_valid+0x1db/0x2d0
[   11.544633]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.544654]  ? kasan_complete_mode_report_info+0x2a/0x200
[   11.544675]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.544696]  kasan_report+0x141/0x180
[   11.544717]  ? kmalloc_oob_memset_2+0x166/0x330
[   11.544742]  kasan_check_range+0x10c/0x1c0
[   11.544764]  __asan_memset+0x27/0x50
[   11.544783]  kmalloc_oob_memset_2+0x166/0x330
[   11.544804]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.544827]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   11.544852]  kunit_try_run_case+0x1a5/0x480
[   11.544874]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.544894]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.544916]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.544937]  ? __kthread_parkme+0x82/0x180
[   11.544956]  ? preempt_count_sub+0x50/0x80
[   11.544977]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.544999]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.545020]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.545052]  kthread+0x337/0x6f0
[   11.545070]  ? trace_preempt_on+0x20/0xc0
[   11.545092]  ? __pfx_kthread+0x10/0x10
[   11.545112]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.545132]  ? calculate_sigpending+0x7b/0xa0
[   11.545154]  ? __pfx_kthread+0x10/0x10
[   11.545174]  ret_from_fork+0x116/0x1d0
[   11.545191]  ? __pfx_kthread+0x10/0x10
[   11.545211]  ret_from_fork_asm+0x1a/0x30
[   11.545239]  </TASK>
[   11.545250] 
[   11.552623] Allocated by task 189:
[   11.552830]  kasan_save_stack+0x45/0x70
[   11.553086]  kasan_save_track+0x18/0x40
[   11.553312]  kasan_save_alloc_info+0x3b/0x50
[   11.553533]  __kasan_kmalloc+0xb7/0xc0
[   11.553731]  __kmalloc_cache_noprof+0x189/0x420
[   11.553980]  kmalloc_oob_memset_2+0xac/0x330
[   11.554220]  kunit_try_run_case+0x1a5/0x480
[   11.554539]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.554879]  kthread+0x337/0x6f0
[   11.555007]  ret_from_fork+0x116/0x1d0
[   11.555311]  ret_from_fork_asm+0x1a/0x30
[   11.555539] 
[   11.555611] The buggy address belongs to the object at ffff888102cbbf00
[   11.555611]  which belongs to the cache kmalloc-128 of size 128
[   11.556172] The buggy address is located 119 bytes inside of
[   11.556172]  allocated 120-byte region [ffff888102cbbf00, ffff888102cbbf78)
[   11.556767] 
[   11.556842] The buggy address belongs to the physical page:
[   11.557110] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102cbb
[   11.557518] flags: 0x200000000000000(node=0|zone=2)
[   11.557762] page_type: f5(slab)
[   11.557963] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   11.558338] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   11.558691] page dumped because: kasan: bad access detected
[   11.558934] 
[   11.559033] Memory state around the buggy address:
[   11.559258]  ffff888102cbbe00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.559493]  ffff888102cbbe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.559703] >ffff888102cbbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   11.560022]                                                                 ^
[   11.560408]  ffff888102cbbf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.560727]  ffff888102cbc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.561082] ==================================================================