Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.137370] ==================================================================
[   20.138085] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x15c/0x2f8
[   20.138901] Read of size 64 at addr fff00000c6491804 by task kunit_try_catch/169
[   20.140489] 
[   20.140837] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   20.141040] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.141108] Hardware name: linux,dummy-virt (DT)
[   20.141188] Call trace:
[   20.141257]  dump_backtrace+0x9c/0x128
[   20.141388]  show_stack+0x20/0x38
[   20.141458]  dump_stack_lvl+0x8c/0xd0
[   20.141556]  print_report+0x118/0x5f0
[   20.141629]  kasan_report+0xdc/0x128
[   20.141691]  kasan_check_range+0x100/0x1a8
[   20.141749]  __asan_memmove+0x3c/0x98
[   20.141794]  kmalloc_memmove_invalid_size+0x15c/0x2f8
[   20.141843]  kunit_try_run_case+0x170/0x3f0
[   20.141888]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.141936]  kthread+0x24c/0x2d0
[   20.141978]  ret_from_fork+0x10/0x20
[   20.142026] 
[   20.146637] Allocated by task 169:
[   20.147051]  kasan_save_stack+0x3c/0x68
[   20.147521]  kasan_save_track+0x20/0x40
[   20.148286]  kasan_save_alloc_info+0x40/0x58
[   20.148849]  __kasan_kmalloc+0xd4/0xd8
[   20.149186]  __kmalloc_cache_noprof+0x154/0x320
[   20.149689]  kmalloc_memmove_invalid_size+0xb8/0x2f8
[   20.150246]  kunit_try_run_case+0x170/0x3f0
[   20.150734]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.151658]  kthread+0x24c/0x2d0
[   20.151985]  ret_from_fork+0x10/0x20
[   20.152220] 
[   20.152380] The buggy address belongs to the object at fff00000c6491800
[   20.152380]  which belongs to the cache kmalloc-64 of size 64
[   20.154090] The buggy address is located 4 bytes inside of
[   20.154090]  allocated 64-byte region [fff00000c6491800, fff00000c6491840)
[   20.154960] 
[   20.155563] The buggy address belongs to the physical page:
[   20.155968] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106491
[   20.156645] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.157255] page_type: f5(slab)
[   20.157602] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   20.158169] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000
[   20.158797] page dumped because: kasan: bad access detected
[   20.159383] 
[   20.159560] Memory state around the buggy address:
[   20.160045]  fff00000c6491700: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   20.160427]  fff00000c6491780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   20.161986] >fff00000c6491800: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   20.163034]                                            ^
[   20.163818]  fff00000c6491880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.164477]  fff00000c6491900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.165033] ==================================================================

[   12.293010] ==================================================================
[   12.293525] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x170/0x330
[   12.294064] Read of size 64 at addr ffff888102978d84 by task kunit_try_catch/187
[   12.294525] 
[   12.294918] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   12.295010] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.295030] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.295062] Call Trace:
[   12.295087]  <TASK>
[   12.295115]  dump_stack_lvl+0x73/0xb0
[   12.295192]  print_report+0xd1/0x640
[   12.295383]  ? __virt_addr_valid+0x1db/0x2d0
[   12.295424]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.295460]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.295497]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.295560]  kasan_report+0x140/0x180
[   12.295599]  ? kmalloc_memmove_invalid_size+0x170/0x330
[   12.295644]  kasan_check_range+0x10c/0x1c0
[   12.295698]  __asan_memmove+0x27/0x70
[   12.295733]  kmalloc_memmove_invalid_size+0x170/0x330
[   12.295770]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   12.295808]  ? __schedule+0xc49/0x27a0
[   12.295865]  ? __pfx_read_tsc+0x10/0x10
[   12.295901]  ? ktime_get_ts64+0x84/0x230
[   12.295950]  kunit_try_run_case+0x1a6/0x480
[   12.295988]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.296022]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   12.296074]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.296115]  ? __kthread_parkme+0x82/0x160
[   12.296264]  ? preempt_count_sub+0x50/0x80
[   12.296307]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.296327]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.296350]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.296374]  kthread+0x257/0x310
[   12.296391]  ? __pfx_kthread+0x10/0x10
[   12.296408]  ret_from_fork+0x41/0x80
[   12.296426]  ? __pfx_kthread+0x10/0x10
[   12.296442]  ret_from_fork_asm+0x1a/0x30
[   12.296470]  </TASK>
[   12.296483] 
[   12.306669] Allocated by task 187:
[   12.306849]  kasan_save_stack+0x45/0x70
[   12.307051]  kasan_save_track+0x18/0x40
[   12.307505]  kasan_save_alloc_info+0x3b/0x50
[   12.307816]  __kasan_kmalloc+0xb7/0xc0
[   12.308099]  __kmalloc_cache_noprof+0x168/0x350
[   12.308605]  kmalloc_memmove_invalid_size+0xad/0x330
[   12.308968]  kunit_try_run_case+0x1a6/0x480
[   12.309237]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.309853]  kthread+0x257/0x310
[   12.310326]  ret_from_fork+0x41/0x80
[   12.310770]  ret_from_fork_asm+0x1a/0x30
[   12.310944] 
[   12.311038] The buggy address belongs to the object at ffff888102978d80
[   12.311038]  which belongs to the cache kmalloc-64 of size 64
[   12.311768] The buggy address is located 4 bytes inside of
[   12.311768]  allocated 64-byte region [ffff888102978d80, ffff888102978dc0)
[   12.313051] 
[   12.313505] The buggy address belongs to the physical page:
[   12.313751] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102978
[   12.314378] flags: 0x200000000000000(node=0|zone=2)
[   12.314839] page_type: f5(slab)
[   12.315061] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.315797] raw: 0000000000000000 0000000080200020 00000001f5000000 0000000000000000
[   12.316177] page dumped because: kasan: bad access detected
[   12.316552] 
[   12.316719] Memory state around the buggy address:
[   12.316975]  ffff888102978c80: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   12.317313]  ffff888102978d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.317744] >ffff888102978d80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.318229]                                            ^
[   12.318547]  ffff888102978e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.319401]  ffff888102978e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.319977] ==================================================================