Skip to content
OpenAdvisories
Medium · 4.6 CVE-2026-56288 EUVD-2026-42556GHSA-m3j2-9m66-r96h

NULL Pointer Dereference in GNU patch

Published Jul 9, 2026 · Updated Jul 9, 2026 · Assigned by CERT-PL

Description

GNU patch is vulnerable to a NULL pointer dereference when processing a specially crafted unified-diff patch file. Improper handling of consecutive end-of-file newline markers can corrupt internal hunk (single block of changes in diff) data structures, causing the application to pass a NULL pointer to fwrite() 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

Affected products

VendorProductAffectedFixed
GNU patch ≤ 2.8.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 patch No fix yet —
Debian 13 patch No fix yet —
Debian 12 patch No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 patch No fix yet —
Ubuntu 26.04 LTS patch No fix yet —
Ubuntu 25.10 patch No fix yet —
Ubuntu 24.04 LTS patch No fix yet —
Ubuntu 22.04 LTS patch No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS patch No fix yet —
Ubuntu 18.04 LTS patch No fix yet —
Ubuntu 16.04 LTS patch No fix yet —
Ubuntu Pro 14.04 LTS patch No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 patch 2.8-4.3.hum1 RHSA-2026:38019
ReleasePackageFixed inAdvisory
SLES 15 SP7 patch 2.7.6-150000.5.12.1 SUSE-SU-2026:3161-1
SLES 12 SP5 patch 2.7.5-8.14.1 SUSE-SU-2026:2922-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 patch 2.7.6-160000.4.1 SUSE-SU-2026:22651-1
SLES 16.0 patch 2.7.6-160000.4.1 SUSE-SU-2026:22651-1
SLE Micro 6.2 patch 2.7.6-160000.4.1 SUSE-SU-2026:22604-1
SLE Micro 6.1 patch 2.7.6-slfo.1.1_2.1 SUSE-SU-2026:22905-1
SLE Micro 6.0 patch 2.7.6-4.1 SUSE-SU-2026:23210-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed patch 2.8-3.1 openSUSE-SU-2026:11260-1
openSUSE Leap 16.0 patch 2.7.6-160000.4.1 openSUSE-SU-2026:21332-1
ReleasePackageFixed inAdvisory
Alpine v3.24 patch 2.8.1-r0 —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 patch 2.7.6-10 —

Advisories 10

References