Article

    Cyber News / Article / Vulnerabilities in GNU patch software

    Vulnerabilities in GNU patch software
    CE
    CERT Polska-2026-07-09

    Vulnerabilities in GNU patch software

    CERT Polska has received a report about vulnerabilities in GNU patch software and participated in coordination of their disclosure.

    The vulnerabilityCVE-2026-56288: GNU patch is vulnerable to a NULL pointer dereference when processing a specially craftedunified-diffpatch file. Improper handling of consecutive end-of-file newline markers can corrupt internalhunk(single block of changes in diff) data structures, causing the application to pass a NULL pointer tofwrite()during patch processing. An attacker can trigger this condition with a malicious patch file, causing the utility to crash and resulting in a denial of service.

    This issue has been fixed in the commit e6d6a4e021660679d7fc9150f981d4920f722313

    The vulnerabilityCVE-2026-56289: GNU patch is vulnerable to a denial of service (DoS) due to improper validation ofhunk(single block of changes in diff) line offsets inunified-diffinput. A specially crafted patch file can specify an extremely large line number, causing the application to enter an effectively infinite processing loop while attempting to locate the requested position. This results in excessive CPU consumption and prevents the process from completing. An attacker can trigger this behavior by supplying a malicious patch file, causing the utility to become unresponsive and require manual termination.

    This issue has been fixed in the commit faba04ef4f2b410257f76c1b9dc85e350929c4b9

    We thank Michał Majchrowicz and Marcin Wyczechowski from AFINE Team for the responsible vulnerability report.

    Original source