Hay
Date
June 7, 2025, 10:40 a.m.

Environment
qemu-arm64
qemu-x86_64

[   22.706124] ==================================================================
[   22.706399] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   22.706598] Read of size 18446744073709551614 at addr fff00000c76c4204 by task kunit_try_catch/184
[   22.706796] 
[   22.706892] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT 
[   22.707109] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.707179] Hardware name: linux,dummy-virt (DT)
[   22.707259] Call trace:
[   22.707321]  show_stack+0x20/0x38 (C)
[   22.708929]  dump_stack_lvl+0x8c/0xd0
[   22.709472]  print_report+0x118/0x608
[   22.709577]  kasan_report+0xdc/0x128
[   22.709677]  kasan_check_range+0x100/0x1a8
[   22.709866]  __asan_memmove+0x3c/0x98
[   22.710002]  kmalloc_memmove_negative_size+0x154/0x2e0
[   22.710142]  kunit_try_run_case+0x170/0x3f0
[   22.710268]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.710430]  kthread+0x328/0x630
[   22.710552]  ret_from_fork+0x10/0x20
[   22.710683] 
[   22.710731] Allocated by task 184:
[   22.711573]  kasan_save_stack+0x3c/0x68
[   22.712694]  kasan_save_track+0x20/0x40
[   22.712951]  kasan_save_alloc_info+0x40/0x58
[   22.713098]  __kasan_kmalloc+0xd4/0xd8
[   22.714083]  __kmalloc_cache_noprof+0x16c/0x3c0
[   22.714326]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   22.714549]  kunit_try_run_case+0x170/0x3f0
[   22.714646]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.714734]  kthread+0x328/0x630
[   22.714814]  ret_from_fork+0x10/0x20
[   22.714904] 
[   22.715668] The buggy address belongs to the object at fff00000c76c4200
[   22.715668]  which belongs to the cache kmalloc-64 of size 64
[   22.716098] The buggy address is located 4 bytes inside of
[   22.716098]  64-byte region [fff00000c76c4200, fff00000c76c4240)
[   22.716563] 
[   22.716929] The buggy address belongs to the physical page:
[   22.717301] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076c4
[   22.717792] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.717933] page_type: f5(slab)
[   22.718039] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   22.718171] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   22.719168] page dumped because: kasan: bad access detected
[   22.719350] 
[   22.719467] Memory state around the buggy address:
[   22.719613]  fff00000c76c4100: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   22.719732]  fff00000c76c4180: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   22.719847] >fff00000c76c4200: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   22.719948]                    ^
[   22.720022]  fff00000c76c4280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.720132]  fff00000c76c4300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.720235] ==================================================================

[   13.921249] ==================================================================
[   13.921735] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   13.922482] Read of size 18446744073709551614 at addr ffff888102d9ae04 by task kunit_try_catch/200
[   13.923811] 
[   13.924059] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G    B            N  6.15.2-rc1 #1 PREEMPT(voluntary) 
[   13.924159] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.924206] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.924245] Call Trace:
[   13.924273]  <TASK>
[   13.924305]  dump_stack_lvl+0x73/0xb0
[   13.924365]  print_report+0xd1/0x650
[   13.924392]  ? __virt_addr_valid+0x1db/0x2d0
[   13.924415]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.924438]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.924458]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.924519]  kasan_report+0x141/0x180
[   13.924571]  ? kmalloc_memmove_negative_size+0x171/0x330
[   13.924619]  kasan_check_range+0x10c/0x1c0
[   13.924764]  __asan_memmove+0x27/0x70
[   13.924786]  kmalloc_memmove_negative_size+0x171/0x330
[   13.924809]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   13.924832]  ? __schedule+0x10cc/0x2b30
[   13.924853]  ? __pfx_read_tsc+0x10/0x10
[   13.924873]  ? ktime_get_ts64+0x86/0x230
[   13.924897]  kunit_try_run_case+0x1a5/0x480
[   13.924921]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.924942]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.924964]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.924984]  ? __kthread_parkme+0x82/0x180
[   13.925005]  ? preempt_count_sub+0x50/0x80
[   13.925029]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.925051]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.925072]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.925092]  kthread+0x337/0x6f0
[   13.925108]  ? trace_preempt_on+0x20/0xc0
[   13.925130]  ? __pfx_kthread+0x10/0x10
[   13.925147]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.925166]  ? calculate_sigpending+0x7b/0xa0
[   13.925186]  ? __pfx_kthread+0x10/0x10
[   13.925203]  ret_from_fork+0x41/0x80
[   13.925222]  ? __pfx_kthread+0x10/0x10
[   13.925239]  ret_from_fork_asm+0x1a/0x30
[   13.925267]  </TASK>
[   13.925279] 
[   13.938308] Allocated by task 200:
[   13.938490]  kasan_save_stack+0x45/0x70
[   13.939509]  kasan_save_track+0x18/0x40
[   13.940532]  kasan_save_alloc_info+0x3b/0x50
[   13.940978]  __kasan_kmalloc+0xb7/0xc0
[   13.941132]  __kmalloc_cache_noprof+0x189/0x420
[   13.941368]  kmalloc_memmove_negative_size+0xac/0x330
[   13.941749]  kunit_try_run_case+0x1a5/0x480
[   13.942020]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.942474]  kthread+0x337/0x6f0
[   13.942844]  ret_from_fork+0x41/0x80
[   13.943161]  ret_from_fork_asm+0x1a/0x30
[   13.943495] 
[   13.943659] The buggy address belongs to the object at ffff888102d9ae00
[   13.943659]  which belongs to the cache kmalloc-64 of size 64
[   13.944345] The buggy address is located 4 bytes inside of
[   13.944345]  64-byte region [ffff888102d9ae00, ffff888102d9ae40)
[   13.945214] 
[   13.945387] The buggy address belongs to the physical page:
[   13.945838] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d9a
[   13.946143] flags: 0x200000000000000(node=0|zone=2)
[   13.946518] page_type: f5(slab)
[   13.947021] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   13.947755] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   13.948270] page dumped because: kasan: bad access detected
[   13.949138] 
[   13.949327] Memory state around the buggy address:
[   13.949791]  ffff888102d9ad00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.950206]  ffff888102d9ad80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   13.950521] >ffff888102d9ae00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   13.951146]                    ^
[   13.951454]  ffff888102d9ae80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.952021]  ffff888102d9af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.952403] ==================================================================