Hay
Date
April 22, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   17.835987] ==================================================================
[   17.836222] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   17.836429] Read of size 64 at addr fff00000c62e2e04 by task kunit_try_catch/184
[   17.836542] 
[   17.836825] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   17.837018] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.837083] Hardware name: linux,dummy-virt (DT)
[   17.837156] Call trace:
[   17.837207]  show_stack+0x20/0x38 (C)
[   17.837323]  dump_stack_lvl+0x8c/0xd0
[   17.837422]  print_report+0x118/0x608
[   17.837545]  kasan_report+0xdc/0x128
[   17.837653]  kasan_check_range+0x100/0x1a8
[   17.837760]  __asan_memmove+0x3c/0x98
[   17.837861]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   17.837972]  kunit_try_run_case+0x170/0x3f0
[   17.838073]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.838196]  kthread+0x328/0x630
[   17.838298]  ret_from_fork+0x10/0x20
[   17.838783] 
[   17.838843] Allocated by task 184:
[   17.838914]  kasan_save_stack+0x3c/0x68
[   17.839002]  kasan_save_track+0x20/0x40
[   17.839076]  kasan_save_alloc_info+0x40/0x58
[   17.839155]  __kasan_kmalloc+0xd4/0xd8
[   17.839226]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.839352]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   17.839689]  kunit_try_run_case+0x170/0x3f0
[   17.839894]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.839998]  kthread+0x328/0x630
[   17.840069]  ret_from_fork+0x10/0x20
[   17.840147] 
[   17.840191] The buggy address belongs to the object at fff00000c62e2e00
[   17.840191]  which belongs to the cache kmalloc-64 of size 64
[   17.840328] The buggy address is located 4 bytes inside of
[   17.840328]  allocated 64-byte region [fff00000c62e2e00, fff00000c62e2e40)
[   17.840461] 
[   17.840504] The buggy address belongs to the physical page:
[   17.840572] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1062e2
[   17.840700] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.840928] page_type: f5(slab)
[   17.841028] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   17.841292] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.841416] page dumped because: kasan: bad access detected
[   17.841511] 
[   17.841596] Memory state around the buggy address:
[   17.841667]  fff00000c62e2d00: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   17.841814]  fff00000c62e2d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.841908] >fff00000c62e2e00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.841997]                                            ^
[   17.842246]  fff00000c62e2e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.842357]  fff00000c62e2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.842455] ==================================================================

[   18.391920] ==================================================================
[   18.393276] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x16f/0x330
[   18.394442] Read of size 64 at addr ffff8881031aa204 by task kunit_try_catch/202
[   18.395664] 
[   18.395901] CPU: 0 UID: 0 PID: 202 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   18.396022] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.396052] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.396098] Call Trace:
[   18.396139]  <TASK>
[   18.396187]  dump_stack_lvl+0x73/0xb0
[   18.396262]  print_report+0xd1/0x650
[   18.396323]  ? __virt_addr_valid+0x1db/0x2d0
[   18.396383]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   18.396450]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.396531]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   18.396733]  kasan_report+0x141/0x180
[   18.396876]  ? kmalloc_memmove_invalid_size+0x16f/0x330
[   18.396971]  kasan_check_range+0x10c/0x1c0
[   18.397048]  __asan_memmove+0x27/0x70
[   18.397110]  kmalloc_memmove_invalid_size+0x16f/0x330
[   18.397185]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   18.397265]  ? __pfx_kmalloc_memmove_invalid_size+0x10/0x10
[   18.397354]  kunit_try_run_case+0x1a5/0x480
[   18.397547]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.397630]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.397671]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.397705]  ? __kthread_parkme+0x82/0x180
[   18.397738]  ? preempt_count_sub+0x50/0x80
[   18.397773]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.397805]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.397839]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.397869]  kthread+0x337/0x6f0
[   18.397898]  ? trace_preempt_on+0x20/0xc0
[   18.397935]  ? __pfx_kthread+0x10/0x10
[   18.397965]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.397994]  ? calculate_sigpending+0x7b/0xa0
[   18.398024]  ? __pfx_kthread+0x10/0x10
[   18.398054]  ret_from_fork+0x41/0x80
[   18.398084]  ? __pfx_kthread+0x10/0x10
[   18.398114]  ret_from_fork_asm+0x1a/0x30
[   18.398158]  </TASK>
[   18.398173] 
[   18.419044] Allocated by task 202:
[   18.419431]  kasan_save_stack+0x45/0x70
[   18.419904]  kasan_save_track+0x18/0x40
[   18.420249]  kasan_save_alloc_info+0x3b/0x50
[   18.421442]  __kasan_kmalloc+0xb7/0xc0
[   18.422328]  __kmalloc_cache_noprof+0x189/0x420
[   18.422901]  kmalloc_memmove_invalid_size+0xac/0x330
[   18.423287]  kunit_try_run_case+0x1a5/0x480
[   18.424662]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.425067]  kthread+0x337/0x6f0
[   18.425659]  ret_from_fork+0x41/0x80
[   18.426244]  ret_from_fork_asm+0x1a/0x30
[   18.426815] 
[   18.427047] The buggy address belongs to the object at ffff8881031aa200
[   18.427047]  which belongs to the cache kmalloc-64 of size 64
[   18.428109] The buggy address is located 4 bytes inside of
[   18.428109]  allocated 64-byte region [ffff8881031aa200, ffff8881031aa240)
[   18.428560] 
[   18.428744] The buggy address belongs to the physical page:
[   18.429821] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1031aa
[   18.430819] flags: 0x200000000000000(node=0|zone=2)
[   18.431244] page_type: f5(slab)
[   18.431797] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   18.432551] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   18.433195] page dumped because: kasan: bad access detected
[   18.433868] 
[   18.434079] Memory state around the buggy address:
[   18.435199]  ffff8881031aa100: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   18.436312]  ffff8881031aa180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   18.437019] >ffff8881031aa200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   18.438624]                                            ^
[   18.439128]  ffff8881031aa280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.439791]  ffff8881031aa300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.440295] ==================================================================

[   19.920661] ==================================================================
[   19.921778] BUG: KASAN: slab-out-of-bounds in kmalloc_memmove_invalid_size+0x154/0x2e0
[   19.922526] Read of size 64 at addr ffff00000e72f904 by task kunit_try_catch/240
[   19.923199] 
[   19.923358] CPU: 2 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   19.923395] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.923406] Hardware name: Radxa ROCK Pi 4B (DT)
[   19.923419] Call trace:
[   19.923428]  show_stack+0x20/0x38 (C)
[   19.923452]  dump_stack_lvl+0x8c/0xd0
[   19.923474]  print_report+0x118/0x608
[   19.923496]  kasan_report+0xdc/0x128
[   19.923516]  kasan_check_range+0x100/0x1a8
[   19.923539]  __asan_memmove+0x3c/0x98
[   19.923561]  kmalloc_memmove_invalid_size+0x154/0x2e0
[   19.923588]  kunit_try_run_case+0x170/0x3f0
[   19.923614]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.923642]  kthread+0x328/0x630
[   19.923668]  ret_from_fork+0x10/0x20
[   19.923691] 
[   19.929569] Allocated by task 240:
[   19.929886]  kasan_save_stack+0x3c/0x68
[   19.930248]  kasan_save_track+0x20/0x40
[   19.930609]  kasan_save_alloc_info+0x40/0x58
[   19.931010]  __kasan_kmalloc+0xd4/0xd8
[   19.931362]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.931790]  kmalloc_memmove_invalid_size+0xb0/0x2e0
[   19.932254]  kunit_try_run_case+0x170/0x3f0
[   19.932648]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.933158]  kthread+0x328/0x630
[   19.933467]  ret_from_fork+0x10/0x20
[   19.933805] 
[   19.933954] The buggy address belongs to the object at ffff00000e72f900
[   19.933954]  which belongs to the cache kmalloc-64 of size 64
[   19.935056] The buggy address is located 4 bytes inside of
[   19.935056]  allocated 64-byte region [ffff00000e72f900, ffff00000e72f940)
[   19.936161] 
[   19.936308] The buggy address belongs to the physical page:
[   19.936815] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe72f
[   19.937526] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   19.938126] page_type: f5(slab)
[   19.938428] raw: 03fffe0000000000 ffff0000004028c0 dead000000000122 0000000000000000
[   19.939131] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.939828] page dumped because: kasan: bad access detected
[   19.940333] 
[   19.940479] Memory state around the buggy address:
[   19.940918]  ffff00000e72f800: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
[   19.941572]  ffff00000e72f880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.942226] >ffff00000e72f900: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   19.942878]                                            ^
[   19.943363]  ffff00000e72f980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.944017]  ffff00000e72fa00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.944668] ==================================================================