Hay
Date
July 23, 2025, 2:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.504834] ==================================================================
[   15.505274] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   15.505369] Read of size 64 at addr fff00000c3f90004 by task kunit_try_catch/182
[   15.505575] 
[   15.505610] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   15.505841] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.505944] Hardware name: linux,dummy-virt (DT)
[   15.505979] Call trace:
[   15.506014]  show_stack+0x20/0x38 (C)
[   15.506067]  dump_stack_lvl+0x8c/0xd0
[   15.506113]  print_report+0x118/0x5d0
[   15.506321]  kasan_report+0xdc/0x128
[   15.506381]  kasan_check_range+0x100/0x1a8
[   15.506428]  __asan_memmove+0x3c/0x98
[   15.506791]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   15.506944]  kunit_try_run_case+0x170/0x3f0
[   15.507054]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.507204]  kthread+0x328/0x630
[   15.507317]  ret_from_fork+0x10/0x20
[   15.507386] 
[   15.507404] Allocated by task 182:
[   15.507628]  kasan_save_stack+0x3c/0x68
[   15.507768]  kasan_save_track+0x20/0x40
[   15.507946]  kasan_save_alloc_info+0x40/0x58
[   15.508024]  __kasan_kmalloc+0xd4/0xd8
[   15.508190]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.508335]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   15.508381]  kunit_try_run_case+0x170/0x3f0
[   15.508832]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.508997]  kthread+0x328/0x630
[   15.509094]  ret_from_fork+0x10/0x20
[   15.509246] 
[   15.509270] The buggy address belongs to the object at fff00000c3f90000
[   15.509270]  which belongs to the cache kmalloc-64 of size 64
[   15.509352] The buggy address is located 4 bytes inside of
[   15.509352]  allocated 64-byte region [fff00000c3f90000, fff00000c3f90040)
[   15.510181] 
[   15.510251] The buggy address belongs to the physical page:
[   15.510645] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f90
[   15.510745] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.510873] page_type: f5(slab)
[   15.510935] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   15.511075] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   15.511126] page dumped because: kasan: bad access detected
[   15.511436] 
[   15.511625] Memory state around the buggy address:
[   15.511892]  fff00000c3f8ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.512140]  fff00000c3f8ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.512227] >fff00000c3f90000: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.512396]                                            ^
[   15.512519]  fff00000c3f90080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.512834]  fff00000c3f90100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.512939] ==================================================================

[   12.811686] ==================================================================
[   12.812225] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   12.812533] Read of size 64 at addr ffff888102b02b04 by task kunit_try_catch/199
[   12.812973] 
[   12.813071] CPU: 0 UID: 0 PID: 199 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   12.813113] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.813125] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.813146] Call Trace:
[   12.813158]  <TASK>
[   12.813171]  dump_stack_lvl+0x73/0xb0
[   12.813199]  print_report+0xd1/0x610
[   12.813443]  ? __virt_addr_valid+0x1db/0x2d0
[   12.813467]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.813492]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.813513]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.813537]  kasan_report+0x141/0x180
[   12.813559]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   12.813587]  kasan_check_range+0x10c/0x1c0
[   12.813610]  __asan_memmove+0x27/0x70
[   12.813629]  kmalloc_memmove_invalid_size+0x16f/0x330
[   12.813653]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   12.813678]  ? __schedule+0x10c6/0x2b60
[   12.813700]  ? __pfx_read_tsc+0x10/0x10
[   12.813720]  ? ktime_get_ts64+0x86/0x230
[   12.813744]  kunit_try_run_case+0x1a5/0x480
[   12.813768]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.813789]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.813826]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.813849]  ? __kthread_parkme+0x82/0x180
[   12.813869]  ? preempt_count_sub+0x50/0x80
[   12.813891]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.813914]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.813937]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.813960]  kthread+0x337/0x6f0
[   12.813979]  ? trace_preempt_on+0x20/0xc0
[   12.814001]  ? __pfx_kthread+0x10/0x10
[   12.814021]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.814041]  ? calculate_sigpending+0x7b/0xa0
[   12.814065]  ? __pfx_kthread+0x10/0x10
[   12.814086]  ret_from_fork+0x116/0x1d0
[   12.814112]  ? __pfx_kthread+0x10/0x10
[   12.814132]  ret_from_fork_asm+0x1a/0x30
[   12.814161]  </TASK>
[   12.814171] 
[   12.822037] Allocated by task 199:
[   12.822308]  kasan_save_stack+0x45/0x70
[   12.822510]  kasan_save_track+0x18/0x40
[   12.822677]  kasan_save_alloc_info+0x3b/0x50
[   12.822874]  __kasan_kmalloc+0xb7/0xc0
[   12.823040]  __kmalloc_cache_noprof+0x189/0x420
[   12.823346]  kmalloc_memmove_invalid_size+0xac/0x330
[   12.823562]  kunit_try_run_case+0x1a5/0x480
[   12.823710]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.823897]  kthread+0x337/0x6f0
[   12.824058]  ret_from_fork+0x116/0x1d0
[   12.824242]  ret_from_fork_asm+0x1a/0x30
[   12.824708] 
[   12.824832] The buggy address belongs to the object at ffff888102b02b00
[   12.824832]  which belongs to the cache kmalloc-64 of size 64
[   12.825529] The buggy address is located 4 bytes inside of
[   12.825529]  allocated 64-byte region [ffff888102b02b00, ffff888102b02b40)
[   12.826003] 
[   12.826077] The buggy address belongs to the physical page:
[   12.826513] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b02
[   12.826832] flags: 0x200000000000000(node=0|zone=2)
[   12.827046] page_type: f5(slab)
[   12.827199] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   12.827562] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   12.827883] page dumped because: kasan: bad access detected
[   12.828069] 
[   12.828363] Memory state around the buggy address:
[   12.828593]  ffff888102b02a00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   12.828882]  ffff888102b02a80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   12.829166] >ffff888102b02b00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   12.829479]                                            ^
[   12.829728]  ffff888102b02b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.830024]  ffff888102b02c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.830283] ==================================================================