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

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

[   17.801589] ==================================================================
[   17.801739] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   17.801907] Read of size 18446744073709551614 at addr fff00000c62e2c04 by task kunit_try_catch/182
[   17.802122] 
[   17.802190] CPU: 1 UID: 0 PID: 182 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   17.802346] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.802401] Hardware name: linux,dummy-virt (DT)
[   17.802461] Call trace:
[   17.802509]  show_stack+0x20/0x38 (C)
[   17.802622]  dump_stack_lvl+0x8c/0xd0
[   17.802707]  print_report+0x118/0x608
[   17.803375]  kasan_report+0xdc/0x128
[   17.803486]  kasan_check_range+0x100/0x1a8
[   17.804401]  __asan_memmove+0x3c/0x98
[   17.804764]  kmalloc_memmove_negative_size+0x154/0x2e0
[   17.804893]  kunit_try_run_case+0x170/0x3f0
[   17.804994]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.805107]  kthread+0x328/0x630
[   17.805194]  ret_from_fork+0x10/0x20
[   17.805276] 
[   17.805310] Allocated by task 182:
[   17.805362]  kasan_save_stack+0x3c/0x68
[   17.805455]  kasan_save_track+0x20/0x40
[   17.805592]  kasan_save_alloc_info+0x40/0x58
[   17.805697]  __kasan_kmalloc+0xd4/0xd8
[   17.805803]  __kmalloc_cache_noprof+0x15c/0x3c0
[   17.805914]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   17.806022]  kunit_try_run_case+0x170/0x3f0
[   17.806141]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.806255]  kthread+0x328/0x630
[   17.806344]  ret_from_fork+0x10/0x20
[   17.806413] 
[   17.806454] The buggy address belongs to the object at fff00000c62e2c00
[   17.806454]  which belongs to the cache kmalloc-64 of size 64
[   17.806631] The buggy address is located 4 bytes inside of
[   17.806631]  64-byte region [fff00000c62e2c00, fff00000c62e2c40)
[   17.806756] 
[   17.806798] The buggy address belongs to the physical page:
[   17.806861] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1062e2
[   17.807029] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.807172] page_type: f5(slab)
[   17.807361] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   17.807517] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   17.807985] page dumped because: kasan: bad access detected
[   17.808064] 
[   17.808406] Memory state around the buggy address:
[   17.808498]  fff00000c62e2b00: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   17.808728]  fff00000c62e2b80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   17.808928] >fff00000c62e2c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   17.809111]                    ^
[   17.809211]  fff00000c62e2c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.809318]  fff00000c62e2d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.809415] ==================================================================

[   18.328176] ==================================================================
[   18.330212] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   18.331314] Read of size 18446744073709551614 at addr ffff888102975104 by task kunit_try_catch/200
[   18.332696] 
[   18.333178] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   18.333341] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.333374] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.333422] Call Trace:
[   18.333472]  <TASK>
[   18.333555]  dump_stack_lvl+0x73/0xb0
[   18.333654]  print_report+0xd1/0x650
[   18.333716]  ? __virt_addr_valid+0x1db/0x2d0
[   18.333751]  ? kmalloc_memmove_negative_size+0x171/0x330
[   18.333787]  ? kasan_complete_mode_report_info+0x2a/0x200
[   18.333818]  ? kmalloc_memmove_negative_size+0x171/0x330
[   18.333854]  kasan_report+0x141/0x180
[   18.333885]  ? kmalloc_memmove_negative_size+0x171/0x330
[   18.333926]  kasan_check_range+0x10c/0x1c0
[   18.333959]  __asan_memmove+0x27/0x70
[   18.333986]  kmalloc_memmove_negative_size+0x171/0x330
[   18.334020]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   18.334056]  ? __schedule+0x10cc/0x2b30
[   18.334089]  ? __pfx_read_tsc+0x10/0x10
[   18.334116]  ? ktime_get_ts64+0x86/0x230
[   18.334153]  kunit_try_run_case+0x1a5/0x480
[   18.334187]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.334216]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.334251]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.334285]  ? __kthread_parkme+0x82/0x180
[   18.334315]  ? preempt_count_sub+0x50/0x80
[   18.334349]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.334380]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.334411]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.334513]  kthread+0x337/0x6f0
[   18.334585]  ? trace_preempt_on+0x20/0xc0
[   18.334623]  ? __pfx_kthread+0x10/0x10
[   18.334654]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.334684]  ? calculate_sigpending+0x7b/0xa0
[   18.334714]  ? __pfx_kthread+0x10/0x10
[   18.334744]  ret_from_fork+0x41/0x80
[   18.334772]  ? __pfx_kthread+0x10/0x10
[   18.334802]  ret_from_fork_asm+0x1a/0x30
[   18.334846]  </TASK>
[   18.334862] 
[   18.359946] Allocated by task 200:
[   18.360261]  kasan_save_stack+0x45/0x70
[   18.361980]  kasan_save_track+0x18/0x40
[   18.363367]  kasan_save_alloc_info+0x3b/0x50
[   18.364175]  __kasan_kmalloc+0xb7/0xc0
[   18.364801]  __kmalloc_cache_noprof+0x189/0x420
[   18.365232]  kmalloc_memmove_negative_size+0xac/0x330
[   18.366324]  kunit_try_run_case+0x1a5/0x480
[   18.367064]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.367748]  kthread+0x337/0x6f0
[   18.368107]  ret_from_fork+0x41/0x80
[   18.368981]  ret_from_fork_asm+0x1a/0x30
[   18.369325] 
[   18.369658] The buggy address belongs to the object at ffff888102975100
[   18.369658]  which belongs to the cache kmalloc-64 of size 64
[   18.371020] The buggy address is located 4 bytes inside of
[   18.371020]  64-byte region [ffff888102975100, ffff888102975140)
[   18.372310] 
[   18.372751] The buggy address belongs to the physical page:
[   18.373340] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102975
[   18.374372] flags: 0x200000000000000(node=0|zone=2)
[   18.375228] page_type: f5(slab)
[   18.375838] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   18.376385] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   18.377488] page dumped because: kasan: bad access detected
[   18.378091] 
[   18.378244] Memory state around the buggy address:
[   18.379359]  ffff888102975000: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   18.379951]  ffff888102975080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   18.380892] >ffff888102975100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   18.381408]                    ^
[   18.382317]  ffff888102975180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.383061]  ffff888102975200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.384067] ==================================================================

[   19.893182] ==================================================================
[   19.894272] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   19.894999] Read of size 18446744073709551614 at addr ffff000010864484 by task kunit_try_catch/238
[   19.895824] 
[   19.895990] CPU: 0 UID: 0 PID: 238 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   19.896040] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.896055] Hardware name: Radxa ROCK Pi 4B (DT)
[   19.896073] Call trace:
[   19.896084]  show_stack+0x20/0x38 (C)
[   19.896116]  dump_stack_lvl+0x8c/0xd0
[   19.896148]  print_report+0x118/0x608
[   19.896178]  kasan_report+0xdc/0x128
[   19.896207]  kasan_check_range+0x100/0x1a8
[   19.896238]  __asan_memmove+0x3c/0x98
[   19.896269]  kmalloc_memmove_negative_size+0x154/0x2e0
[   19.896305]  kunit_try_run_case+0x170/0x3f0
[   19.896342]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.896381]  kthread+0x328/0x630
[   19.896415]  ret_from_fork+0x10/0x20
[   19.896448] 
[   19.902377] Allocated by task 238:
[   19.902704]  kasan_save_stack+0x3c/0x68
[   19.903077]  kasan_save_track+0x20/0x40
[   19.903449]  kasan_save_alloc_info+0x40/0x58
[   19.903864]  __kasan_kmalloc+0xd4/0xd8
[   19.904226]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.904668]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   19.905153]  kunit_try_run_case+0x170/0x3f0
[   19.905560]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.906086]  kthread+0x328/0x630
[   19.906410]  ret_from_fork+0x10/0x20
[   19.906760] 
[   19.906913] The buggy address belongs to the object at ffff000010864480
[   19.906913]  which belongs to the cache kmalloc-64 of size 64
[   19.908032] The buggy address is located 4 bytes inside of
[   19.908032]  64-byte region [ffff000010864480, ffff0000108644c0)
[   19.909076] 
[   19.909230] The buggy address belongs to the physical page:
[   19.909747] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10864
[   19.910478] flags: 0x3fffe0000000000(node=0|zone=0|lastcpupid=0x1ffff)
[   19.911091] page_type: f5(slab)
[   19.911404] raw: 03fffe0000000000 ffff0000004028c0 dead000000000122 0000000000000000
[   19.912119] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.912827] page dumped because: kasan: bad access detected
[   19.913341] 
[   19.913494] Memory state around the buggy address:
[   19.913943]  ffff000010864380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.914609]  ffff000010864400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.915276] >ffff000010864480: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   19.915938]                    ^
[   19.916248]  ffff000010864500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.916914]  ffff000010864580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.917576] ==================================================================