Hay
Date
March 19, 2025, 10:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.082424] ==================================================================
[   34.082613] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x3a0/0x3f8
[   34.082772] Write of size 16 at addr fff00000c5c8efc0 by task kunit_try_catch/168
[   34.082937] 
[   34.083232] CPU: 1 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT 
[   34.083600] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.083681] Hardware name: linux,dummy-virt (DT)
[   34.083987] Call trace:
[   34.084406]  show_stack+0x20/0x38 (C)
[   34.084668]  dump_stack_lvl+0x8c/0xd0
[   34.084914]  print_report+0x118/0x5f0
[   34.085079]  kasan_report+0xc8/0x118
[   34.085234]  __asan_report_store16_noabort+0x20/0x30
[   34.085486]  kmalloc_oob_16+0x3a0/0x3f8
[   34.085699]  kunit_try_run_case+0x14c/0x3d0
[   34.086072]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.086606]  kthread+0x318/0x618
[   34.086803]  ret_from_fork+0x10/0x20
[   34.087114] 
[   34.087222] Allocated by task 168:
[   34.087806]  kasan_save_stack+0x3c/0x68
[   34.087943]  kasan_save_track+0x20/0x40
[   34.088076]  kasan_save_alloc_info+0x40/0x58
[   34.088192]  __kasan_kmalloc+0xd4/0xd8
[   34.088304]  __kmalloc_cache_noprof+0x15c/0x3c0
[   34.088442]  kmalloc_oob_16+0xb4/0x3f8
[   34.089926]  kunit_try_run_case+0x14c/0x3d0
[   34.090078]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.090227]  kthread+0x318/0x618
[   34.090342]  ret_from_fork+0x10/0x20
[   34.090457] 
[   34.090519] The buggy address belongs to the object at fff00000c5c8efc0
[   34.090519]  which belongs to the cache kmalloc-16 of size 16
[   34.090975] The buggy address is located 0 bytes inside of
[   34.090975]  allocated 13-byte region [fff00000c5c8efc0, fff00000c5c8efcd)
[   34.091629] 
[   34.092029] The buggy address belongs to the physical page:
[   34.092236] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105c8e
[   34.092522] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.092731] page_type: f5(slab)
[   34.092863] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   34.093027] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   34.093169] page dumped because: kasan: bad access detected
[   34.093261] 
[   34.093316] Memory state around the buggy address:
[   34.093430]  fff00000c5c8ee80: 00 04 fc fc fa fb fc fc 00 05 fc fc 00 05 fc fc
[   34.093572]  fff00000c5c8ef00: 00 00 fc fc 00 06 fc fc 00 06 fc fc 00 00 fc fc
[   34.093712] >fff00000c5c8ef80: fa fb fc fc fa fb fc fc 00 05 fc fc 00 00 fc fc
[   34.094137]                                               ^
[   34.094696]  fff00000c5c8f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   34.095347]  fff00000c5c8f080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
[   34.095733] ==================================================================

[   21.690539] ==================================================================
[   21.691258] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_16+0x452/0x4a0
[   21.691961] Write of size 16 at addr ffff888102551920 by task kunit_try_catch/187
[   21.692452] 
[   21.692672] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) 
[   21.692799] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.692833] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   21.692868] Call Trace:
[   21.692888]  <TASK>
[   21.692909]  dump_stack_lvl+0x73/0xb0
[   21.692953]  print_report+0xd1/0x660
[   21.693003]  ? __virt_addr_valid+0x1db/0x2d0
[   21.693080]  ? kasan_complete_mode_report_info+0x2a/0x200
[   21.693223]  kasan_report+0x104/0x140
[   21.693683]  ? kmalloc_oob_16+0x452/0x4a0
[   21.693913]  ? kmalloc_oob_16+0x452/0x4a0
[   21.693997]  __asan_report_store16_noabort+0x1b/0x30
[   21.694062]  kmalloc_oob_16+0x452/0x4a0
[   21.694148]  ? __pfx_kmalloc_oob_16+0x10/0x10
[   21.694217]  ? __schedule+0xd46/0x29c0
[   21.694279]  ? __pfx_read_tsc+0x10/0x10
[   21.694333]  ? ktime_get_ts64+0x86/0x240
[   21.694376]  kunit_try_run_case+0x1b2/0x490
[   21.694414]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.694446]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   21.694477]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   21.694508]  ? __kthread_parkme+0x82/0x160
[   21.694539]  ? preempt_count_sub+0x50/0x80
[   21.694575]  ? __pfx_kunit_try_run_case+0x10/0x10
[   21.694608]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.694641]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   21.694674]  kthread+0x323/0x710
[   21.694759]  ? trace_preempt_on+0x20/0xc0
[   21.694796]  ? __pfx_kthread+0x10/0x10
[   21.694827]  ? _raw_spin_unlock_irq+0x47/0x80
[   21.694856]  ? calculate_sigpending+0x7b/0xa0
[   21.694887]  ? __pfx_kthread+0x10/0x10
[   21.694919]  ret_from_fork+0x41/0x80
[   21.694950]  ? __pfx_kthread+0x10/0x10
[   21.694982]  ret_from_fork_asm+0x1a/0x30
[   21.695029]  </TASK>
[   21.695044] 
[   21.710450] Allocated by task 187:
[   21.710866]  kasan_save_stack+0x3d/0x60
[   21.711326]  kasan_save_track+0x18/0x40
[   21.711977]  kasan_save_alloc_info+0x3b/0x50
[   21.712461]  __kasan_kmalloc+0xb7/0xc0
[   21.713316]  __kmalloc_cache_noprof+0x183/0x410
[   21.713990]  kmalloc_oob_16+0xa8/0x4a0
[   21.714431]  kunit_try_run_case+0x1b2/0x490
[   21.715066]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   21.715497]  kthread+0x323/0x710
[   21.716047]  ret_from_fork+0x41/0x80
[   21.716472]  ret_from_fork_asm+0x1a/0x30
[   21.717349] 
[   21.717564] The buggy address belongs to the object at ffff888102551920
[   21.717564]  which belongs to the cache kmalloc-16 of size 16
[   21.718528] The buggy address is located 0 bytes inside of
[   21.718528]  allocated 13-byte region [ffff888102551920, ffff88810255192d)
[   21.719965] 
[   21.720215] The buggy address belongs to the physical page:
[   21.720562] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102551
[   21.721874] flags: 0x200000000000000(node=0|zone=2)
[   21.722258] page_type: f5(slab)
[   21.722617] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   21.723338] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   21.723971] page dumped because: kasan: bad access detected
[   21.724444] 
[   21.724666] Memory state around the buggy address:
[   21.725577]  ffff888102551800: 00 04 fc fc 00 01 fc fc 00 01 fc fc 00 04 fc fc
[   21.726419]  ffff888102551880: 00 04 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   21.727074] >ffff888102551900: 00 05 fc fc 00 05 fc fc 00 00 fc fc fc fc fc fc
[   21.727739]                                   ^
[   21.730982]  ffff888102551980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.731361]  ffff888102551a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   21.732790] ==================================================================