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

Environment
qemu-arm64
qemu-x86_64

[   16.743466] ==================================================================
[   16.743542] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   16.743609] Read of size 64 at addr fff00000c7848a04 by task kunit_try_catch/182
[   16.743660] 
[   16.743695] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   16.743815] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.743842] Hardware name: linux,dummy-virt (DT)
[   16.743885] Call trace:
[   16.743908]  show_stack+0x20/0x38 (C)
[   16.743958]  dump_stack_lvl+0x8c/0xd0
[   16.744004]  print_report+0x118/0x5d0
[   16.744337]  kasan_report+0xdc/0x128
[   16.744391]  kasan_check_range+0x100/0x1a8
[   16.744500]  __asan_memmove+0x3c/0x98
[   16.744633]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   16.744744]  kunit_try_run_case+0x170/0x3f0
[   16.744829]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.744958]  kthread+0x328/0x630
[   16.745096]  ret_from_fork+0x10/0x20
[   16.745326] 
[   16.745462] Allocated by task 182:
[   16.745560]  kasan_save_stack+0x3c/0x68
[   16.745677]  kasan_save_track+0x20/0x40
[   16.745745]  kasan_save_alloc_info+0x40/0x58
[   16.745853]  __kasan_kmalloc+0xd4/0xd8
[   16.745923]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.746174]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   16.746413]  kunit_try_run_case+0x170/0x3f0
[   16.746530]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.746585]  kthread+0x328/0x630
[   16.746616]  ret_from_fork+0x10/0x20
[   16.746653] 
[   16.746673] The buggy address belongs to the object at fff00000c7848a00
[   16.746673]  which belongs to the cache kmalloc-64 of size 64
[   16.746859] The buggy address is located 4 bytes inside of
[   16.746859]  allocated 64-byte region [fff00000c7848a00, fff00000c7848a40)
[   16.746976] 
[   16.747027] The buggy address belongs to the physical page:
[   16.747102] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107848
[   16.747232] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.747328] page_type: f5(slab)
[   16.747405] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   16.747455] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   16.747504] page dumped because: kasan: bad access detected
[   16.747535] 
[   16.747552] Memory state around the buggy address:
[   16.747766]  fff00000c7848900: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   16.747959]  fff00000c7848980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.748028] >fff00000c7848a00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   16.748198]                                            ^
[   16.748254]  fff00000c7848a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.748315]  fff00000c7848b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.748354] ==================================================================

[   12.477797] ==================================================================
[   12.478476] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   12.478852] Read of size 64 at addr ffff888102f44004 by task kunit_try_catch/199
[   12.479280] 
[   12.479395] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.479456] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.479467] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.479489] Call Trace:
[   12.479501]  <TASK>
[   12.479518]  dump_stack_lvl+0x73/0xb0
[   12.479548]  print_report+0xd1/0x610
[   12.479569]  ? __virt_addr_valid+0x1db/0x2d0
[   12.479980]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.480011]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.480034]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.480073]  kasan_report+0x141/0x180
[   12.480098]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.480127]  kasan_check_range+0x10c/0x1c0
[   12.480150]  __asan_memmove+0x27/0x70
[   12.480169]  kmalloc_memmove_invalid_size+0x16f/0x330
[   12.480192]  ? __kasan_check_write+0x18/0x20
[   12.480211]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   12.480237]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   12.480264]  ? __pfx_read_tsc+0x10/0x10
[   12.480285]  ? ktime_get_ts64+0x86/0x230
[   12.480310]  kunit_try_run_case+0x1a5/0x480
[   12.480334]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.480356]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   12.480377]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.480400]  ? __kthread_parkme+0x82/0x180
[   12.480421]  ? preempt_count_sub+0x50/0x80
[   12.480444]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.480467]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.480490]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.480513]  kthread+0x337/0x6f0
[   12.480531]  ? trace_preempt_on+0x20/0xc0
[   12.480554]  ? __pfx_kthread+0x10/0x10
[   12.480573]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.480609]  ? calculate_sigpending+0x7b/0xa0
[   12.480633]  ? __pfx_kthread+0x10/0x10
[   12.480653]  ret_from_fork+0x116/0x1d0
[   12.480670]  ? __pfx_kthread+0x10/0x10
[   12.480689]  ret_from_fork_asm+0x1a/0x30
[   12.480721]  </TASK>
[   12.480732] 
[   12.492197] Allocated by task 199:
[   12.492376]  kasan_save_stack+0x45/0x70
[   12.493114]  kasan_save_track+0x18/0x40
[   12.493333]  kasan_save_alloc_info+0x3b/0x50
[   12.493548]  __kasan_kmalloc+0xb7/0xc0
[   12.493701]  __kmalloc_cache_noprof+0x189/0x420
[   12.494131]  kmalloc_memmove_invalid_size+0xac/0x330
[   12.494468]  kunit_try_run_case+0x1a5/0x480
[   12.494844]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.495108]  kthread+0x337/0x6f0
[   12.495266]  ret_from_fork+0x116/0x1d0
[   12.495446]  ret_from_fork_asm+0x1a/0x30
[   12.495866] 
[   12.495955] The buggy address belongs to the object at ffff888102f44000
[   12.495955]  which belongs to the cache kmalloc-64 of size 64
[   12.496743] The buggy address is located 4 bytes inside of
[   12.496743]  allocated 64-byte region [ffff888102f44000, ffff888102f44040)
[   12.497263] 
[   12.497350] The buggy address belongs to the physical page:
[   12.497807] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f44
[   12.498076] flags: 0x200000000000000(node=0|zone=2)
[   12.498416] page_type: f5(slab)
[   12.498907] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.499356] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.499838] page dumped because: kasan: bad access detected
[   12.500219] 
[   12.500323] Memory state around the buggy address:
[   12.500704]  ffff888102f43f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.501275]  ffff888102f43f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.501534] >ffff888102f44000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.502076]                                            ^
[   12.502471]  ffff888102f44080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.502800]  ffff888102f44100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.503362] ==================================================================