Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.368072] ==================================================================
[   30.368365] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   30.368439] Write of size 2 at addr fff00000c3f71b77 by task kunit_try_catch/203
[   30.368883] 
[   30.368948] CPU: 1 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.369123] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   30.369230] Hardware name: linux,dummy-virt (DT)
[   30.369309] Call trace:
[   30.369642]  show_stack+0x20/0x38 (C)
[   30.369733]  dump_stack_lvl+0x8c/0xd0
[   30.369867]  print_report+0x118/0x5e8
[   30.369986]  kasan_report+0xdc/0x128
[   30.370043]  kasan_check_range+0x100/0x1a8
[   30.370221]  __asan_memset+0x34/0x78
[   30.370607]  kmalloc_oob_memset_2+0x150/0x2f8
[   30.370693]  kunit_try_run_case+0x170/0x3f0
[   30.371404]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.371499]  kthread+0x328/0x630
[   30.371587]  ret_from_fork+0x10/0x20
[   30.371675] 
[   30.371730] Allocated by task 203:
[   30.371795]  kasan_save_stack+0x3c/0x68
[   30.372041]  kasan_save_track+0x20/0x40
[   30.372113]  kasan_save_alloc_info+0x40/0x58
[   30.372434]  __kasan_kmalloc+0xd4/0xd8
[   30.372624]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.372949]  kmalloc_oob_memset_2+0xb0/0x2f8
[   30.373097]  kunit_try_run_case+0x170/0x3f0
[   30.373233]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.373313]  kthread+0x328/0x630
[   30.373694]  ret_from_fork+0x10/0x20
[   30.373806] 
[   30.373844] The buggy address belongs to the object at fff00000c3f71b00
[   30.373844]  which belongs to the cache kmalloc-128 of size 128
[   30.374209] The buggy address is located 119 bytes inside of
[   30.374209]  allocated 120-byte region [fff00000c3f71b00, fff00000c3f71b78)
[   30.374281] 
[   30.374310] The buggy address belongs to the physical page:
[   30.374364] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f71
[   30.374460] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.374512] page_type: f5(slab)
[   30.374571] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   30.374629] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.374667] page dumped because: kasan: bad access detected
[   30.374696] 
[   30.374715] Memory state around the buggy address:
[   30.374747]  fff00000c3f71a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.374799]  fff00000c3f71a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.375068] >fff00000c3f71b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.375253]                                                                 ^
[   30.375329]  fff00000c3f71b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.375371]  fff00000c3f71c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.375653] ==================================================================

[   25.182873] ==================================================================
[   25.183491] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   25.184151] Write of size 2 at addr ffff8881058a9377 by task kunit_try_catch/220
[   25.185093] 
[   25.185284] CPU: 1 UID: 0 PID: 220 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   25.185333] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.185346] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.185369] Call Trace:
[   25.185382]  <TASK>
[   25.185399]  dump_stack_lvl+0x73/0xb0
[   25.185505]  print_report+0xd1/0x640
[   25.185530]  ? __virt_addr_valid+0x1db/0x2d0
[   25.185556]  ? kmalloc_oob_memset_2+0x166/0x330
[   25.185577]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.185603]  ? kmalloc_oob_memset_2+0x166/0x330
[   25.185626]  kasan_report+0x141/0x180
[   25.185648]  ? kmalloc_oob_memset_2+0x166/0x330
[   25.185674]  kasan_check_range+0x10c/0x1c0
[   25.185698]  __asan_memset+0x27/0x50
[   25.185722]  kmalloc_oob_memset_2+0x166/0x330
[   25.185745]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   25.185768]  ? __schedule+0x10da/0x2b60
[   25.185793]  ? __pfx_read_tsc+0x10/0x10
[   25.185817]  ? ktime_get_ts64+0x86/0x230
[   25.185853]  kunit_try_run_case+0x1a5/0x480
[   25.185879]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.185901]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.185926]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.185951]  ? __kthread_parkme+0x82/0x180
[   25.185973]  ? preempt_count_sub+0x50/0x80
[   25.185998]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.186022]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.186045]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.186068]  kthread+0x337/0x6f0
[   25.186088]  ? trace_preempt_on+0x20/0xc0
[   25.186113]  ? __pfx_kthread+0x10/0x10
[   25.186134]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.186157]  ? calculate_sigpending+0x7b/0xa0
[   25.186193]  ? __pfx_kthread+0x10/0x10
[   25.186215]  ret_from_fork+0x116/0x1d0
[   25.186234]  ? __pfx_kthread+0x10/0x10
[   25.186255]  ret_from_fork_asm+0x1a/0x30
[   25.186286]  </TASK>
[   25.186298] 
[   25.200030] Allocated by task 220:
[   25.200398]  kasan_save_stack+0x45/0x70
[   25.200792]  kasan_save_track+0x18/0x40
[   25.200979]  kasan_save_alloc_info+0x3b/0x50
[   25.201408]  __kasan_kmalloc+0xb7/0xc0
[   25.201824]  __kmalloc_cache_noprof+0x189/0x420
[   25.202279]  kmalloc_oob_memset_2+0xac/0x330
[   25.202719]  kunit_try_run_case+0x1a5/0x480
[   25.202875]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.203052]  kthread+0x337/0x6f0
[   25.203187]  ret_from_fork+0x116/0x1d0
[   25.203588]  ret_from_fork_asm+0x1a/0x30
[   25.203968] 
[   25.204144] The buggy address belongs to the object at ffff8881058a9300
[   25.204144]  which belongs to the cache kmalloc-128 of size 128
[   25.205436] The buggy address is located 119 bytes inside of
[   25.205436]  allocated 120-byte region [ffff8881058a9300, ffff8881058a9378)
[   25.206723] 
[   25.206892] The buggy address belongs to the physical page:
[   25.207192] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9
[   25.207979] flags: 0x200000000000000(node=0|zone=2)
[   25.208145] page_type: f5(slab)
[   25.208260] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.208534] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.209353] page dumped because: kasan: bad access detected
[   25.209894] 
[   25.210094] Memory state around the buggy address:
[   25.210639]  ffff8881058a9200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.211415]  ffff8881058a9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.212129] >ffff8881058a9300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.212684]                                                                 ^
[   25.212953]  ffff8881058a9380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.213598]  ffff8881058a9400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.214310] ==================================================================