CVE-2026-27820: Cve 2026 27820 Conditional Buffer Expansion Before Memmove Prepend

A buffer expansion function is called inside a conditional before a memmove-based prepend (memmove(ptr + len, ptr, filled) / memmove(ptr, src, len)). If the guard condition does not verify that the buffer has at least 'filled + len' bytes of free capacity – i.e., it only checks whether any free space exists rather than enough free space for 'len' additional

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-27820-cve-2026-27820-conditional-buffer-expansion-before-memmove-prepend --engine opengrep

Description

A buffer expansion function is called inside a conditional before a memmove-based prepend (memmove(ptr + len, ptr, filled) / memmove(ptr, src, len)). If the guard condition does not verify that the buffer has at least 'filled + len' bytes of free capacity – i.e., it only checks whether any free space exists rather than enough free space for 'len' additional