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

Environment
qemu-arm64
qemu-x86_64

[   30.466204] ==================================================================
[   30.466274] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x150/0x2f8
[   30.466413] Write of size 16 at addr fff00000c99bcd69 by task kunit_try_catch/211
[   30.466465] 
[   30.466786] CPU: 0 UID: 0 PID: 211 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   30.467006] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.467067] Hardware name: linux,dummy-virt (DT)
[   30.467105] Call trace:
[   30.467143]  show_stack+0x20/0x38 (C)
[   30.467251]  dump_stack_lvl+0x8c/0xd0
[   30.467297]  print_report+0x118/0x5e8
[   30.467339]  kasan_report+0xdc/0x128
[   30.467386]  kasan_check_range+0x100/0x1a8
[   30.467429]  __asan_memset+0x34/0x78
[   30.467615]  kmalloc_oob_memset_16+0x150/0x2f8
[   30.467678]  kunit_try_run_case+0x170/0x3f0
[   30.467725]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.467911]  kthread+0x328/0x630
[   30.467968]  ret_from_fork+0x10/0x20
[   30.468017] 
[   30.468035] Allocated by task 211:
[   30.468062]  kasan_save_stack+0x3c/0x68
[   30.468101]  kasan_save_track+0x20/0x40
[   30.468135]  kasan_save_alloc_info+0x40/0x58
[   30.468171]  __kasan_kmalloc+0xd4/0xd8
[   30.468204]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.468244]  kmalloc_oob_memset_16+0xb0/0x2f8
[   30.468281]  kunit_try_run_case+0x170/0x3f0
[   30.468317]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.468358]  kthread+0x328/0x630
[   30.468389]  ret_from_fork+0x10/0x20
[   30.468423] 
[   30.468515] The buggy address belongs to the object at fff00000c99bcd00
[   30.468515]  which belongs to the cache kmalloc-128 of size 128
[   30.468826] The buggy address is located 105 bytes inside of
[   30.468826]  allocated 120-byte region [fff00000c99bcd00, fff00000c99bcd78)
[   30.469479] 
[   30.469523] The buggy address belongs to the physical page:
[   30.469663] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1099bc
[   30.469778] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.469959] page_type: f5(slab)
[   30.470014] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   30.470168] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.470278] page dumped because: kasan: bad access detected
[   30.470334] 
[   30.470361] Memory state around the buggy address:
[   30.470585]  fff00000c99bcc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   30.470822]  fff00000c99bcc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.470873] >fff00000c99bcd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.471088]                                                                 ^
[   30.471691]  fff00000c99bcd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.471762]  fff00000c99bce00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.472060] ==================================================================

[   25.328736] ==================================================================
[   25.330163] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_16+0x166/0x330
[   25.330957] Write of size 16 at addr ffff888104964569 by task kunit_try_catch/227
[   25.331535] 
[   25.331651] CPU: 0 UID: 0 PID: 227 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   25.331711] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.331724] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.331748] Call Trace:
[   25.331764]  <TASK>
[   25.331786]  dump_stack_lvl+0x73/0xb0
[   25.331822]  print_report+0xd1/0x640
[   25.331847]  ? __virt_addr_valid+0x1db/0x2d0
[   25.331874]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.331896]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.331922]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.331944]  kasan_report+0x141/0x180
[   25.331967]  ? kmalloc_oob_memset_16+0x166/0x330
[   25.331993]  kasan_check_range+0x10c/0x1c0
[   25.332017]  __asan_memset+0x27/0x50
[   25.332077]  kmalloc_oob_memset_16+0x166/0x330
[   25.332101]  ? __pfx_kmalloc_oob_memset_16+0x10/0x10
[   25.332124]  ? __schedule+0x10da/0x2b60
[   25.332170]  ? __pfx_read_tsc+0x10/0x10
[   25.332193]  ? ktime_get_ts64+0x86/0x230
[   25.332220]  kunit_try_run_case+0x1a5/0x480
[   25.332277]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.332300]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.332325]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.332362]  ? __kthread_parkme+0x82/0x180
[   25.332395]  ? preempt_count_sub+0x50/0x80
[   25.332420]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.332444]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.332468]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.332491]  kthread+0x337/0x6f0
[   25.332512]  ? trace_preempt_on+0x20/0xc0
[   25.332538]  ? __pfx_kthread+0x10/0x10
[   25.332558]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.332582]  ? calculate_sigpending+0x7b/0xa0
[   25.332608]  ? __pfx_kthread+0x10/0x10
[   25.332629]  ret_from_fork+0x116/0x1d0
[   25.332650]  ? __pfx_kthread+0x10/0x10
[   25.332671]  ret_from_fork_asm+0x1a/0x30
[   25.332709]  </TASK>
[   25.332721] 
[   25.346632] Allocated by task 227:
[   25.346921]  kasan_save_stack+0x45/0x70
[   25.347251]  kasan_save_track+0x18/0x40
[   25.347388]  kasan_save_alloc_info+0x3b/0x50
[   25.347899]  __kasan_kmalloc+0xb7/0xc0
[   25.348311]  __kmalloc_cache_noprof+0x189/0x420
[   25.348572]  kmalloc_oob_memset_16+0xac/0x330
[   25.349296]  kunit_try_run_case+0x1a5/0x480
[   25.349638]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.349819]  kthread+0x337/0x6f0
[   25.349940]  ret_from_fork+0x116/0x1d0
[   25.350070]  ret_from_fork_asm+0x1a/0x30
[   25.350229] 
[   25.350298] The buggy address belongs to the object at ffff888104964500
[   25.350298]  which belongs to the cache kmalloc-128 of size 128
[   25.351029] The buggy address is located 105 bytes inside of
[   25.351029]  allocated 120-byte region [ffff888104964500, ffff888104964578)
[   25.351869] 
[   25.352036] The buggy address belongs to the physical page:
[   25.352362] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104964
[   25.352747] flags: 0x200000000000000(node=0|zone=2)
[   25.352908] page_type: f5(slab)
[   25.353027] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   25.353509] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   25.353962] page dumped because: kasan: bad access detected
[   25.354331] 
[   25.354551] Memory state around the buggy address:
[   25.354960]  ffff888104964400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   25.355300]  ffff888104964480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.355744] >ffff888104964500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   25.356228]                                                                 ^
[   25.356619]  ffff888104964580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.356939]  ffff888104964600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.357243] ==================================================================