Skip to content

CVE-2026-56289 Loop with Unreachable Exit Condition in GNU patch

MediumCVSS 4.6 EPSS 0.11%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

GNU patch is vulnerable to a denial of service (DoS) due to improper validation of hunk (single block of changes in diff) line offsets in unified-diff input. A specially crafted patch 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

Upgrade path

12 packages: 5 fixed, 7 with no fix yet.

PackageAffectedFixed inStatus
debian/patch(Debian 12) = 2.7.6-7; = 2.8-1; = 2.8-2; = 2.8.1-1 +1 more No fix listed No fix yet
debian/patch(Debian 13) = 2.8-2; = 2.8.1-1; All versions No fix listed No fix yet
debian/patch(Debian 14) = 2.8-2; = 2.8.1-1; All versions No fix listed No fix yet
ubuntu/patch(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/patch(Ubuntu 24.04) All versions No fix listed No fix yet
ubuntu/patch(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/patch(Ubuntu 26.10) All versions No fix listed No fix yet
alpine/patch(Alpine v3.24) < 2.8.1-r0 2.8.1-r0 Fixed
azure linux patch(Azure Linux 3.0) < 2.7.6-10 2.7.6-10 Fixed
azure linux patch(Azure Linux 4.0) < 0:2.8.1-6.azl4 0:2.8.1-6.azl4 Fixed
GNU patch <= 2.8.0 after 2.8.0 Fixed
redhat/patch-main(Red Hat hummingbird 1) < 2.8-4.2.hum1 2.8-4.2.hum1 Fixed

Affected products

ProductAffected versionsFixed in
GNU patch <= 2.8.0 No fix listed
redhat/patch-main(Red Hat:hummingbird:1) < 2.8-4.2.hum1 2.8-4.2.hum1
debian/patch(Debian:12) All versions No fix listed
debian/patch(Debian:12) = 2.7.6-7 No fix listed
debian/patch(Debian:12) = 2.8-1 No fix listed
debian/patch(Debian:12) = 2.8-2 No fix listed
debian/patch(Debian:12) = 2.8.1-1 No fix listed
debian/patch(Debian:13) All versions No fix listed
debian/patch(Debian:13) = 2.8-2 No fix listed
debian/patch(Debian:13) = 2.8.1-1 No fix listed
debian/patch(Debian:14) All versions No fix listed
debian/patch(Debian:14) = 2.8-2 No fix listed
debian/patch(Debian:14) = 2.8.1-1 No fix listed
ubuntu/patch(Ubuntu:22.04) All versions No fix listed
alpine/patch(Alpine:v3.24) < 2.8.1-r0 2.8.1-r0
ubuntu/patch(Ubuntu:24.04) All versions No fix listed
ubuntu/patch(Ubuntu:26.04) All versions No fix listed
ubuntu/patch(Ubuntu:26.10) All versions No fix listed
azure linux patch(Azure Linux:3.0) < 2.7.6-10 2.7.6-10
azure linux patch(Azure Linux:4.0) < 0:2.8.1-6.azl4 0:2.8.1-6.azl4

References