Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.542790] ==================================================================
[   31.542851] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8
[   31.543132] Write of size 2 at addr fff00000c3efd977 by task kunit_try_catch/203
[   31.543326] 
[   31.543367] CPU: 0 UID: 0 PID: 203 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   31.543706] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.543765] Hardware name: linux,dummy-virt (DT)
[   31.543852] Call trace:
[   31.543902]  show_stack+0x20/0x38 (C)
[   31.543956]  dump_stack_lvl+0x8c/0xd0
[   31.544151]  print_report+0x118/0x5e8
[   31.544281]  kasan_report+0xdc/0x128
[   31.544506]  kasan_check_range+0x100/0x1a8
[   31.544680]  __asan_memset+0x34/0x78
[   31.544846]  kmalloc_oob_memset_2+0x150/0x2f8
[   31.544987]  kunit_try_run_case+0x170/0x3f0
[   31.545126]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.545194]  kthread+0x328/0x630
[   31.545465]  ret_from_fork+0x10/0x20
[   31.545637] 
[   31.545681] Allocated by task 203:
[   31.545772]  kasan_save_stack+0x3c/0x68
[   31.545947]  kasan_save_track+0x20/0x40
[   31.546004]  kasan_save_alloc_info+0x40/0x58
[   31.546115]  __kasan_kmalloc+0xd4/0xd8
[   31.546417]  __kmalloc_cache_noprof+0x16c/0x3c0
[   31.546490]  kmalloc_oob_memset_2+0xb0/0x2f8
[   31.546586]  kunit_try_run_case+0x170/0x3f0
[   31.546624]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.546975]  kthread+0x328/0x630
[   31.547027]  ret_from_fork+0x10/0x20
[   31.547064] 
[   31.547094] The buggy address belongs to the object at fff00000c3efd900
[   31.547094]  which belongs to the cache kmalloc-128 of size 128
[   31.547151] The buggy address is located 119 bytes inside of
[   31.547151]  allocated 120-byte region [fff00000c3efd900, fff00000c3efd978)
[   31.547221] 
[   31.547242] The buggy address belongs to the physical page:
[   31.547285] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103efd
[   31.547339] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.547386] page_type: f5(slab)
[   31.547433] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000100 dead000000000122
[   31.547491] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   31.547529] page dumped because: kasan: bad access detected
[   31.547558] 
[   31.547576] Memory state around the buggy address:
[   31.547606]  fff00000c3efd800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   31.547647]  fff00000c3efd880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.547699] >fff00000c3efd900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   31.548011]                                                                 ^
[   31.548058]  fff00000c3efd980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.548345]  fff00000c3efda00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.548419] ==================================================================


[   24.920682] ==================================================================
[   24.921376] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330
[   24.921667] Write of size 2 at addr ffff8881053b7077 by task kunit_try_catch/220
[   24.922075] 
[   24.922187] CPU: 0 UID: 0 PID: 220 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   24.922250] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.922262] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.922284] Call Trace:
[   24.922297]  <TASK>
[   24.922313]  dump_stack_lvl+0x73/0xb0
[   24.922349]  print_report+0xd1/0x640
[   24.922373]  ? __virt_addr_valid+0x1db/0x2d0
[   24.922398]  ? kmalloc_oob_memset_2+0x166/0x330
[   24.922418]  ? kasan_complete_mode_report_info+0x2a/0x200
[   24.922443]  ? kmalloc_oob_memset_2+0x166/0x330
[   24.922464]  kasan_report+0x141/0x180
[   24.922485]  ? kmalloc_oob_memset_2+0x166/0x330
[   24.922509]  kasan_check_range+0x10c/0x1c0
[   24.922532]  __asan_memset+0x27/0x50
[   24.922554]  kmalloc_oob_memset_2+0x166/0x330
[   24.922576]  ? __pfx_kmalloc_oob_memset_2+0x10/0x10
[   24.922597]  ? __schedule+0x10da/0x2b60
[   24.922626]  ? __pfx_read_tsc+0x10/0x10
[   24.922648]  ? ktime_get_ts64+0x86/0x230
[   24.922674]  kunit_try_run_case+0x1a5/0x480
[   24.922698]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.922719]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.922755]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.922787]  ? __kthread_parkme+0x82/0x180
[   24.922809]  ? preempt_count_sub+0x50/0x80
[   24.922843]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.922866]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.922888]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.922910]  kthread+0x337/0x6f0
[   24.922929]  ? trace_preempt_on+0x20/0xc0
[   24.922952]  ? __pfx_kthread+0x10/0x10
[   24.922972]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.923001]  ? calculate_sigpending+0x7b/0xa0
[   24.923024]  ? __pfx_kthread+0x10/0x10
[   24.923045]  ret_from_fork+0x116/0x1d0
[   24.923063]  ? __pfx_kthread+0x10/0x10
[   24.923094]  ret_from_fork_asm+0x1a/0x30
[   24.923125]  </TASK>
[   24.923136] 
[   24.930163] Allocated by task 220:
[   24.930352]  kasan_save_stack+0x45/0x70
[   24.930549]  kasan_save_track+0x18/0x40
[   24.930788]  kasan_save_alloc_info+0x3b/0x50
[   24.931053]  __kasan_kmalloc+0xb7/0xc0
[   24.931320]  __kmalloc_cache_noprof+0x189/0x420
[   24.931550]  kmalloc_oob_memset_2+0xac/0x330
[   24.931694]  kunit_try_run_case+0x1a5/0x480
[   24.931832]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.932052]  kthread+0x337/0x6f0
[   24.932326]  ret_from_fork+0x116/0x1d0
[   24.932494]  ret_from_fork_asm+0x1a/0x30
[   24.932682] 
[   24.932747] The buggy address belongs to the object at ffff8881053b7000
[   24.932747]  which belongs to the cache kmalloc-128 of size 128
[   24.933223] The buggy address is located 119 bytes inside of
[   24.933223]  allocated 120-byte region [ffff8881053b7000, ffff8881053b7078)
[   24.933699] 
[   24.933793] The buggy address belongs to the physical page:
[   24.934012] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b7
[   24.934411] flags: 0x200000000000000(node=0|zone=2)
[   24.934650] page_type: f5(slab)
[   24.934792] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   24.935018] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   24.935251] page dumped because: kasan: bad access detected
[   24.935415] 
[   24.935476] Memory state around the buggy address:
[   24.935624]  ffff8881053b6f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.935936]  ffff8881053b6f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.936456] >ffff8881053b7000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   24.937149]                                                                 ^
[   24.937456]  ffff8881053b7080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.937664]  ffff8881053b7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.937869] ==================================================================