Hay
Date
July 23, 2025, 3:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.427375] ==================================================================
[   30.427432] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x150/0x300
[   30.427494] Write of size 4 at addr fff00000c99bcb75 by task kunit_try_catch/207
[   30.427541] 
[   30.427575] CPU: 0 UID: 0 PID: 207 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   30.427678] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.427705] Hardware name: linux,dummy-virt (DT)
[   30.427745] Call trace:
[   30.427768]  show_stack+0x20/0x38 (C)
[   30.427816]  dump_stack_lvl+0x8c/0xd0
[   30.427871]  print_report+0x118/0x5e8
[   30.428784]  kasan_report+0xdc/0x128
[   30.428841]  kasan_check_range+0x100/0x1a8
[   30.428889]  __asan_memset+0x34/0x78
[   30.428942]  kmalloc_oob_memset_4+0x150/0x300
[   30.428988]  kunit_try_run_case+0x170/0x3f0
[   30.429659]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.429755]  kthread+0x328/0x630
[   30.429888]  ret_from_fork+0x10/0x20
[   30.429975] 
[   30.430032] Allocated by task 207:
[   30.430213]  kasan_save_stack+0x3c/0x68
[   30.430426]  kasan_save_track+0x20/0x40
[   30.430508]  kasan_save_alloc_info+0x40/0x58
[   30.430682]  __kasan_kmalloc+0xd4/0xd8
[   30.430758]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.430820]  kmalloc_oob_memset_4+0xb0/0x300
[   30.431052]  kunit_try_run_case+0x170/0x3f0
[   30.431171]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.431329]  kthread+0x328/0x630
[   30.431493]  ret_from_fork+0x10/0x20
[   30.431574] 
[   30.431692] The buggy address belongs to the object at fff00000c99bcb00
[   30.431692]  which belongs to the cache kmalloc-128 of size 128
[   30.431770] The buggy address is located 117 bytes inside of
[   30.431770]  allocated 120-byte region [fff00000c99bcb00, fff00000c99bcb78)
[   30.431871] 
[   30.432111] The buggy address belongs to the physical page:
[   30.432725] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1099bc
[   30.433170] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.433245] page_type: f5(slab)
[   30.433319] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   30.433395] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.433529] page dumped because: kasan: bad access detected
[   30.433833] 
[   30.433995] Memory state around the buggy address:
[   30.434055]  fff00000c99bca00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.434606]  fff00000c99bca80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.434666] >fff00000c99bcb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.434750]                                                                 ^
[   30.435038]  fff00000c99bcb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.435256]  fff00000c99bcc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.435490] ==================================================================

[   25.262897] ==================================================================
[   25.263362] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_4+0x166/0x330
[   25.263911] Write of size 4 at addr ffff888104657d75 by task kunit_try_catch/223
[   25.264219] 
[   25.264308] CPU: 1 UID: 0 PID: 223 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   25.264360] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.264373] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.264394] Call Trace:
[   25.264408]  <TASK>
[   25.264438]  dump_stack_lvl+0x73/0xb0
[   25.264469]  print_report+0xd1/0x640
[   25.264492]  ? __virt_addr_valid+0x1db/0x2d0
[   25.264516]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.264537]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.264563]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.264584]  kasan_report+0x141/0x180
[   25.264606]  ? kmalloc_oob_memset_4+0x166/0x330
[   25.264632]  kasan_check_range+0x10c/0x1c0
[   25.264655]  __asan_memset+0x27/0x50
[   25.264679]  kmalloc_oob_memset_4+0x166/0x330
[   25.264701]  ? __pfx_kmalloc_oob_memset_4+0x10/0x10
[   25.264723]  ? __schedule+0x10da/0x2b60
[   25.264748]  ? __pfx_read_tsc+0x10/0x10
[   25.264770]  ? ktime_get_ts64+0x86/0x230
[   25.264795]  kunit_try_run_case+0x1a5/0x480
[   25.264821]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.264843]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.264867]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.264892]  ? __kthread_parkme+0x82/0x180
[   25.264912]  ? preempt_count_sub+0x50/0x80
[   25.264936]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.264978]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.265001]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.265024]  kthread+0x337/0x6f0
[   25.265044]  ? trace_preempt_on+0x20/0xc0
[   25.265069]  ? __pfx_kthread+0x10/0x10
[   25.265089]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.265113]  ? calculate_sigpending+0x7b/0xa0
[   25.265136]  ? __pfx_kthread+0x10/0x10
[   25.265170]  ret_from_fork+0x116/0x1d0
[   25.265189]  ? __pfx_kthread+0x10/0x10
[   25.265209]  ret_from_fork_asm+0x1a/0x30
[   25.265241]  </TASK>
[   25.265252] 
[   25.272483] Allocated by task 223:
[   25.272626]  kasan_save_stack+0x45/0x70
[   25.272843]  kasan_save_track+0x18/0x40
[   25.273025]  kasan_save_alloc_info+0x3b/0x50
[   25.273321]  __kasan_kmalloc+0xb7/0xc0
[   25.273503]  __kmalloc_cache_noprof+0x189/0x420
[   25.273720]  kmalloc_oob_memset_4+0xac/0x330
[   25.273923]  kunit_try_run_case+0x1a5/0x480
[   25.274201]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.274437]  kthread+0x337/0x6f0
[   25.274616]  ret_from_fork+0x116/0x1d0
[   25.274802]  ret_from_fork_asm+0x1a/0x30
[   25.274964] 
[   25.275052] The buggy address belongs to the object at ffff888104657d00
[   25.275052]  which belongs to the cache kmalloc-128 of size 128
[   25.275719] The buggy address is located 117 bytes inside of
[   25.275719]  allocated 120-byte region [ffff888104657d00, ffff888104657d78)
[   25.276530] 
[   25.276621] The buggy address belongs to the physical page:
[   25.276857] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104657
[   25.277232] flags: 0x200000000000000(node=0|zone=2)
[   25.277517] page_type: f5(slab)
[   25.277680] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.277940] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.278171] page dumped because: kasan: bad access detected
[   25.278336] 
[   25.278401] Memory state around the buggy address:
[   25.278552]  ffff888104657c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.278850]  ffff888104657c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.279163] >ffff888104657d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.279876]                                                                 ^
[   25.280099]  ffff888104657d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.280327]  ffff888104657e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.280637] ==================================================================