Hay
Date
July 25, 2025, 3:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   32.464400] ==================================================================
[   32.464476] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x154/0x2e0
[   32.464537] Read of size 18446744073709551614 at addr fff00000c9b0ba04 by task kunit_try_catch/212
[   32.464619] 
[   32.464690] CPU: 1 UID: 0 PID: 212 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250725 #1 PREEMPT 
[   32.464782] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   32.464824] Hardware name: linux,dummy-virt (DT)
[   32.464855] Call trace:
[   32.464878]  show_stack+0x20/0x38 (C)
[   32.464936]  dump_stack_lvl+0x8c/0xd0
[   32.464982]  print_report+0x118/0x5e8
[   32.465036]  kasan_report+0xdc/0x128
[   32.465079]  kasan_check_range+0x100/0x1a8
[   32.465124]  __asan_memmove+0x3c/0x98
[   32.465172]  kmalloc_memmove_negative_size+0x154/0x2e0
[   32.465232]  kunit_try_run_case+0x170/0x3f0
[   32.465279]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.465339]  kthread+0x328/0x630
[   32.465383]  ret_from_fork+0x10/0x20
[   32.465437] 
[   32.465457] Allocated by task 212:
[   32.465494]  kasan_save_stack+0x3c/0x68
[   32.465544]  kasan_save_track+0x20/0x40
[   32.465584]  kasan_save_alloc_info+0x40/0x58
[   32.465623]  __kasan_kmalloc+0xd4/0xd8
[   32.466046]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.466581]  kmalloc_memmove_negative_size+0xb0/0x2e0
[   32.466674]  kunit_try_run_case+0x170/0x3f0
[   32.466763]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.466809]  kthread+0x328/0x630
[   32.466899]  ret_from_fork+0x10/0x20
[   32.466988] 
[   32.467020] The buggy address belongs to the object at fff00000c9b0ba00
[   32.467020]  which belongs to the cache kmalloc-64 of size 64
[   32.467266] The buggy address is located 4 bytes inside of
[   32.467266]  64-byte region [fff00000c9b0ba00, fff00000c9b0ba40)
[   32.467546] 
[   32.467602] The buggy address belongs to the physical page:
[   32.467767] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109b0b
[   32.467874] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.468074] page_type: f5(slab)
[   32.468149] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   32.468671] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   32.468753] page dumped because: kasan: bad access detected
[   32.468816] 
[   32.469079] Memory state around the buggy address:
[   32.469131]  fff00000c9b0b900: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc
[   32.469383]  fff00000c9b0b980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   32.469590] >fff00000c9b0ba00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   32.470127]                    ^
[   32.470224]  fff00000c9b0ba80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.470409]  fff00000c9b0bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.470483] ==================================================================

[   25.953048] ==================================================================
[   25.953512] BUG: KASAN: out-of-bounds in kmalloc_memmove_negative_size+0x171/0x330
[   25.954048] Read of size 18446744073709551614 at addr ffff888106248e84 by task kunit_try_catch/229
[   25.954897] 
[   25.955113] CPU: 1 UID: 0 PID: 229 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250725 #1 PREEMPT(voluntary) 
[   25.955165] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.955178] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.955199] Call Trace:
[   25.955212]  <TASK>
[   25.955226]  dump_stack_lvl+0x73/0xb0
[   25.955256]  print_report+0xd1/0x640
[   25.955279]  ? __virt_addr_valid+0x1db/0x2d0
[   25.955303]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.955327]  ? kasan_complete_mode_report_info+0x2a/0x200
[   25.955353]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.955683]  kasan_report+0x141/0x180
[   25.955720]  ? kmalloc_memmove_negative_size+0x171/0x330
[   25.955751]  kasan_check_range+0x10c/0x1c0
[   25.955775]  __asan_memmove+0x27/0x70
[   25.955867]  kmalloc_memmove_negative_size+0x171/0x330
[   25.955893]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   25.955922]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
[   25.955963]  kunit_try_run_case+0x1a5/0x480
[   25.955988]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.956011]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.956034]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.956061]  ? __kthread_parkme+0x82/0x180
[   25.956082]  ? preempt_count_sub+0x50/0x80
[   25.956105]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.956129]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.956153]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.956177]  kthread+0x337/0x6f0
[   25.956197]  ? trace_preempt_on+0x20/0xc0
[   25.956221]  ? __pfx_kthread+0x10/0x10
[   25.956242]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.956266]  ? calculate_sigpending+0x7b/0xa0
[   25.956289]  ? __pfx_kthread+0x10/0x10
[   25.956311]  ret_from_fork+0x116/0x1d0
[   25.956331]  ? __pfx_kthread+0x10/0x10
[   25.956351]  ret_from_fork_asm+0x1a/0x30
[   25.956382]  </TASK>
[   25.956394] 
[   25.966616] Allocated by task 229:
[   25.967134]  kasan_save_stack+0x45/0x70
[   25.967407]  kasan_save_track+0x18/0x40
[   25.967592]  kasan_save_alloc_info+0x3b/0x50
[   25.967783]  __kasan_kmalloc+0xb7/0xc0
[   25.968179]  __kmalloc_cache_noprof+0x189/0x420
[   25.968475]  kmalloc_memmove_negative_size+0xac/0x330
[   25.968667]  kunit_try_run_case+0x1a5/0x480
[   25.969182]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.969437]  kthread+0x337/0x6f0
[   25.969584]  ret_from_fork+0x116/0x1d0
[   25.969763]  ret_from_fork_asm+0x1a/0x30
[   25.970319] 
[   25.970422] The buggy address belongs to the object at ffff888106248e80
[   25.970422]  which belongs to the cache kmalloc-64 of size 64
[   25.971170] The buggy address is located 4 bytes inside of
[   25.971170]  64-byte region [ffff888106248e80, ffff888106248ec0)
[   25.971704] 
[   25.971959] The buggy address belongs to the physical page:
[   25.972339] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106248
[   25.972644] flags: 0x200000000000000(node=0|zone=2)
[   25.973104] page_type: f5(slab)
[   25.973253] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   25.973594] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   25.973918] page dumped because: kasan: bad access detected
[   25.974558] 
[   25.974642] Memory state around the buggy address:
[   25.974870]  ffff888106248d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   25.975478]  ffff888106248e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   25.975897] >ffff888106248e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   25.976242]                    ^
[   25.976545]  ffff888106248f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.976854]  ffff888106248f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.977323] ==================================================================