Hay
Date
July 4, 2025, 11:11 p.m.

Environment
qemu-x86_64

[   12.139996] ==================================================================
[   12.140898] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   12.141765] Read of size 64 at addr ffff888102639b04 by task kunit_try_catch/199
[   12.142610] 
[   12.142719] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   12.142770] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.142782] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.142806] Call Trace:
[   12.142823]  <TASK>
[   12.142845]  dump_stack_lvl+0x73/0xb0
[   12.142883]  print_report+0xd1/0x650
[   12.142906]  ? __virt_addr_valid+0x1db/0x2d0
[   12.142931]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.142954]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.142975]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.142997]  kasan_report+0x141/0x180
[   12.143018]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.143045]  kasan_check_range+0x10c/0x1c0
[   12.143067]  __asan_memmove+0x27/0x70
[   12.143086]  kmalloc_memmove_invalid_size+0x16f/0x330
[   12.143108]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   12.143132]  ? __schedule+0x10cc/0x2b60
[   12.143153]  ? __pfx_read_tsc+0x10/0x10
[   12.143173]  ? ktime_get_ts64+0x86/0x230
[   12.143210]  kunit_try_run_case+0x1a5/0x480
[   12.143252]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.143273]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.143296]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.143317]  ? __kthread_parkme+0x82/0x180
[   12.143338]  ? preempt_count_sub+0x50/0x80
[   12.143361]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.143383]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.143404]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.143425]  kthread+0x337/0x6f0
[   12.143489]  ? trace_preempt_on+0x20/0xc0
[   12.143513]  ? __pfx_kthread+0x10/0x10
[   12.143532]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.143552]  ? calculate_sigpending+0x7b/0xa0
[   12.143587]  ? __pfx_kthread+0x10/0x10
[   12.143607]  ret_from_fork+0x116/0x1d0
[   12.143624]  ? __pfx_kthread+0x10/0x10
[   12.143644]  ret_from_fork_asm+0x1a/0x30
[   12.143675]  </TASK>
[   12.143685] 
[   12.158392] Allocated by task 199:
[   12.158773]  kasan_save_stack+0x45/0x70
[   12.159265]  kasan_save_track+0x18/0x40
[   12.160116]  kasan_save_alloc_info+0x3b/0x50
[   12.160568]  __kasan_kmalloc+0xb7/0xc0
[   12.160973]  __kmalloc_cache_noprof+0x189/0x420
[   12.161425]  kmalloc_memmove_invalid_size+0xac/0x330
[   12.161706]  kunit_try_run_case+0x1a5/0x480
[   12.161860]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.162035]  kthread+0x337/0x6f0
[   12.162156]  ret_from_fork+0x116/0x1d0
[   12.162779]  ret_from_fork_asm+0x1a/0x30
[   12.163159] 
[   12.163343] The buggy address belongs to the object at ffff888102639b00
[   12.163343]  which belongs to the cache kmalloc-64 of size 64
[   12.164653] The buggy address is located 4 bytes inside of
[   12.164653]  allocated 64-byte region [ffff888102639b00, ffff888102639b40)
[   12.165787] 
[   12.165920] The buggy address belongs to the physical page:
[   12.166094] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102639
[   12.166945] flags: 0x200000000000000(node=0|zone=2)
[   12.167423] page_type: f5(slab)
[   12.167842] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.168584] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.168827] page dumped because: kasan: bad access detected
[   12.168999] 
[   12.169069] Memory state around the buggy address:
[   12.169310]  ffff888102639a00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   12.169972]  ffff888102639a80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.170692] >ffff888102639b00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.171745]                                            ^
[   12.172294]  ffff888102639b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.172991]  ffff888102639c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.173540] ==================================================================