Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.496346] ==================================================================
[   15.496693] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   15.496746] Write of size 128 at addr fff00000c592c900 by task kunit_try_catch/171
[   15.496796] 
[   15.496825] CPU: 1 UID: 0 PID: 171 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.496906] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.496942] Hardware name: linux,dummy-virt (DT)
[   15.496999] Call trace:
[   15.497239]  show_stack+0x20/0x38 (C)
[   15.497295]  dump_stack_lvl+0x8c/0xd0
[   15.497446]  print_report+0x118/0x5d0
[   15.497494]  kasan_report+0xdc/0x128
[   15.497539]  kasan_check_range+0x100/0x1a8
[   15.497855]  __asan_memset+0x34/0x78
[   15.498014]  kmalloc_oob_in_memset+0x144/0x2d0
[   15.498089]  kunit_try_run_case+0x170/0x3f0
[   15.498139]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.498202]  kthread+0x328/0x630
[   15.498417]  ret_from_fork+0x10/0x20
[   15.498596] 
[   15.498616] Allocated by task 171:
[   15.498651]  kasan_save_stack+0x3c/0x68
[   15.498735]  kasan_save_track+0x20/0x40
[   15.498771]  kasan_save_alloc_info+0x40/0x58
[   15.498866]  __kasan_kmalloc+0xd4/0xd8
[   15.498902]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.498940]  kmalloc_oob_in_memset+0xb0/0x2d0
[   15.499224]  kunit_try_run_case+0x170/0x3f0
[   15.499263]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.499467]  kthread+0x328/0x630
[   15.499661]  ret_from_fork+0x10/0x20
[   15.499759] 
[   15.499779] The buggy address belongs to the object at fff00000c592c900
[   15.499779]  which belongs to the cache kmalloc-128 of size 128
[   15.499857] The buggy address is located 0 bytes inside of
[   15.499857]  allocated 120-byte region [fff00000c592c900, fff00000c592c978)
[   15.500122] 
[   15.500146] The buggy address belongs to the physical page:
[   15.500177] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592c
[   15.500335] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.500556] page_type: f5(slab)
[   15.500599] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.500648] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.500687] page dumped because: kasan: bad access detected
[   15.500724] 
[   15.500744] Memory state around the buggy address:
[   15.500774]  fff00000c592c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.501054]  fff00000c592c880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.501209] >fff00000c592c900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.501271]                                                                 ^
[   15.501314]  fff00000c592c980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.501355]  fff00000c592ca00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.501529] ==================================================================

[   12.548470] ==================================================================
[   12.548897] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   12.549204] Write of size 128 at addr ffff888102afc100 by task kunit_try_catch/187
[   12.549526] 
[   12.549623] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.549809] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.549823] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.549843] Call Trace:
[   12.549854]  <TASK>
[   12.549867]  dump_stack_lvl+0x73/0xb0
[   12.549898]  print_report+0xd1/0x610
[   12.549920]  ? __virt_addr_valid+0x1db/0x2d0
[   12.549942]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.549964]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.549988]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.550010]  kasan_report+0x141/0x180
[   12.550032]  ? kmalloc_oob_in_memset+0x15f/0x320
[   12.550059]  kasan_check_range+0x10c/0x1c0
[   12.550082]  __asan_memset+0x27/0x50
[   12.550102]  kmalloc_oob_in_memset+0x15f/0x320
[   12.550125]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   12.550152]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   12.550180]  kunit_try_run_case+0x1a5/0x480
[   12.550204]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.550227]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.550250]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.550274]  ? __kthread_parkme+0x82/0x180
[   12.550294]  ? preempt_count_sub+0x50/0x80
[   12.550319]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.550343]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.550367]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.550399]  kthread+0x337/0x6f0
[   12.550961]  ? trace_preempt_on+0x20/0xc0
[   12.551000]  ? __pfx_kthread+0x10/0x10
[   12.551022]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.551045]  ? calculate_sigpending+0x7b/0xa0
[   12.551069]  ? __pfx_kthread+0x10/0x10
[   12.551177]  ret_from_fork+0x116/0x1d0
[   12.551198]  ? __pfx_kthread+0x10/0x10
[   12.551219]  ret_from_fork_asm+0x1a/0x30
[   12.551250]  </TASK>
[   12.551260] 
[   12.559544] Allocated by task 187:
[   12.559679]  kasan_save_stack+0x45/0x70
[   12.560513]  kasan_save_track+0x18/0x40
[   12.560674]  kasan_save_alloc_info+0x3b/0x50
[   12.561201]  __kasan_kmalloc+0xb7/0xc0
[   12.562632]  __kmalloc_cache_noprof+0x189/0x420
[   12.563120]  kmalloc_oob_in_memset+0xac/0x320
[   12.563815]  kunit_try_run_case+0x1a5/0x480
[   12.564262]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.564817]  kthread+0x337/0x6f0
[   12.565280]  ret_from_fork+0x116/0x1d0
[   12.565829]  ret_from_fork_asm+0x1a/0x30
[   12.566209] 
[   12.566286] The buggy address belongs to the object at ffff888102afc100
[   12.566286]  which belongs to the cache kmalloc-128 of size 128
[   12.567695] The buggy address is located 0 bytes inside of
[   12.567695]  allocated 120-byte region [ffff888102afc100, ffff888102afc178)
[   12.568877] 
[   12.569178] The buggy address belongs to the physical page:
[   12.569895] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102afc
[   12.570146] flags: 0x200000000000000(node=0|zone=2)
[   12.570312] page_type: f5(slab)
[   12.571002] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.571866] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.572826] page dumped because: kasan: bad access detected
[   12.573259] 
[   12.573372] Memory state around the buggy address:
[   12.573598]  ffff888102afc000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.573904]  ffff888102afc080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.574195] >ffff888102afc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.574487]                                                                 ^
[   12.575150]  ffff888102afc180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.575622]  ffff888102afc200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.575935] ==================================================================