Every CVE Search/ Get API key

CVE-2018-6952

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

7.5 HighFix available

CVE-2018-6952 is a high vulnerability (CVSS 7.5) in Gnu Patch, published February 13, 2018. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 8.19%, the 94th percentile. Fixed in patch 2.7.6-r4.

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

8.19%Up 7.2 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-415
Updated
2026-11-02
CVE List No score

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
CVE-2018-6952
Updated
2026-11-02
EUVDEUVD-2018-18696 No score

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
EUVD-2018-18696
Updated
2026-11-03
GitHub AdvisoriesGHSA-ffqc-f68h-qq8w 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
GHSA-ffqc-f68h-qq8w
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-415
Updated
2026-11-02
OSVALPINE-CVE-2018-6952 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
ALPINE-CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVAZL-35104 7.5

CVE-2018-6952 affecting package patch for versions less than 2.7.6-9

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
AZL-35104
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 13 moreShow less
OSVAZL-6788 7.5

CVE-2018-6952 affecting package patch for versions less than 2.7.6-7

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
AZL-6788
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBELL-CVE-2018-6952 7.5

CVE-2018-6952 does not affect BellSoft software

Record
BELL-CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSV 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2018-6952 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
DEBIAN-CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVJLSEC-2026-15 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
JLSEC-2026-15
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Updated
2026-11-02
OSVRHSA-2019:2033 3.3

Red Hat Security Advisory: patch security and bug fix update

Record
RHSA-2019:2033
CVSS 3.0
3.3 LowCVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L
Updated
2026-11-02
OSVUBUNTU-CVE-2018-6952 7.5

A double free exists in the another_hunk function in pch.c in GNU patch through 2.7.6.

Record
UBUNTU-CVE-2018-6952
CVSS 3.0
7.5 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVMGASA-2018-0448 No score

Updated patch packages fix security vulnerabilities

A NULL pointer dereference flaw was found in the way patch processed patch files. An attacker could potentially use this flaw to crash patch by tricking it into processing crafted patches (CVE-2018-6951).

A double-free flaw was found in the way the patch utility processed patch files. An attacker could potentially use this flaw to crash the patch utility by tricking it into processing crafted patches (CVE-2018-6952).

Record
MGASA-2018-0448
Updated
2026-11-02
OSVopenSUSE-SU-2024:12060-1 No score

patch-2.7.6-5.1 on GA media

These are all security issues fixed in the patch-2.7.6-5.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12060-1
Updated
2026-11-02
OSVROOT-OS-DEBIAN-12-CVE-2018-6952 No score

CVE-2018-6952 in patch - Patched by Root

Root has patched CVE-2018-6952 in the patch package for Root:Debian:12. Multiple fixed versions available.

Record
ROOT-OS-DEBIAN-12-CVE-2018-6952
Updated
2026-11-02
OSVROOT-OS-UBUNTU-2204-CVE-2018-6952 No score

CVE-2018-6952 in rootio-patch - Patched by Root

Root has patched CVE-2018-6952 in the rootio-patch package for Root:Ubuntu:22.04. Multiple fixed versions available.

Record
ROOT-OS-UBUNTU-2204-CVE-2018-6952
Updated
2026-11-02
OSVSUSE-SU-2022:1925-1 No score

Security update for patch

This update for patch fixes the following issues:

Security issues fixed:

  • CVE-2019-13636: Fixed follow symlinks unless --follow-symlinks is given. This increases the security against malicious patches (bsc#1142041).
  • CVE-2018-6952: Fixed swapping fakelines in pch_swap. This bug was causing a double free leading to a crash (bsc#1080985).

Bugfixes:

  • Abort when cleaning up fails. This bug could cause an infinite loop when a patch wouldn't apply, leading to a segmentation fault (bsc#1111572).
  • Pass the correct stat to backup files. This bug would occasionally cause backup files to be missing when all hunks failed to apply (bsc#1198106).
Record
SUSE-SU-2022:1925-1
Updated
2026-11-02
OSVSUSE-SU-2022:1932-1 No score

Security update for patch

This update for patch fixes the following issues:

Security fixes:

  • CVE-2019-13636: Fixed mishandled following of symlinks in certain cases other than input files (bsc#1142041).
  • CVE-2018-6952: Fixed double free of memory in pch.c:another_hunk() (bsc#1080985).

Bugfixes:

  • Pass the correct stat to backup files (bsc#1198106).
  • Fix temporary file leak when applying ed-style patches (bsc#1092500).
Record
SUSE-SU-2022:1932-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
patch
Alpine:v3.10
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.11
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.12
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.13
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.14
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.15
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.16
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.17
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.18
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.19
before 2.7.6-r4
2.7.6-r4
Show 42 moreShow less
Affected packages
PackageAffectedFixed
patch
Alpine:v3.20
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.21
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.22
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.23
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.24
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.7
before 2.7.6-r0
2.7.6-r0
patch
Alpine:v3.8
before 2.7.6-r4
2.7.6-r4
patch
Alpine:v3.9
before 2.7.6-r4
2.7.6-r4
patch
Azure Linux:3
before 2.7.6-9
2.7.6-9
patch
Azure Linux:2
before 2.7.6-7
2.7.6-7
patch
Debian:12
All versions, plus listed versions
2.7.6-72.8-12.8-2
None known
patch
Debian:13
All versions, plus listed versions
2.8-2
None known
patch
Debian:14
All versions, plus listed versions
2.8-2
None known
patch_jll
Julia
before 2.8.0+0
2.8.0+0
patch
Mageia:6
before 2.7.6-1.1.mga6
2.7.6-1.1.mga6
patch
Red Hat:enterprise_linux:7::client
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch-debuginfo
Red Hat:enterprise_linux:7::client
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch
Red Hat:enterprise_linux:7::computenode
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch-debuginfo
Red Hat:enterprise_linux:7::computenode
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch
Red Hat:enterprise_linux:7::server
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch-debuginfo
Red Hat:enterprise_linux:7::server
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch
Red Hat:enterprise_linux:7::workstation
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch-debuginfo
Red Hat:enterprise_linux:7::workstation
before 0:2.7.1-11.el7
0:2.7.1-11.el7
patch
Root:Debian:12
before 2.7.6-7.aikido.7
2.7.6-7.aikido.72.7.6-7.root.io.52.7.6-7.root.io.22.7.6-7.root.io.42.7.6-7.root.io.12.7.6-7.root.io.62.7.6-7.root.io.3
rootio-patch
Root:Debian:12
before 2.7.6-7.aikido.7
2.7.6-7.aikido.72.7.6-7.root.io.52.7.6-7.root.io.22.7.6-7.root.io.42.7.6-7.root.io.12.7.6-7.root.io.62.7.6-7.root.io.3
rootio-patch
Root:Ubuntu:22.04
before 2.7.6-7build2.aikido.3
2.7.6-7build2.aikido.32.7.6-7build2.root.io.12.7.6-7build2.root.io.2
patch
SUSE:Linux Enterprise Module for Basesystem 15 SP3
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
SUSE:Linux Enterprise Module for Basesystem 15 SP4
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
openSUSE:Leap 15.3
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
openSUSE:Leap 15.4
before 2.7.6-150000.5.3.1
2.7.6-150000.5.3.1
patch
SUSE:Linux Enterprise Server 12 SP5
before 2.7.5-8.8.1
2.7.5-8.8.1
patch
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 2.7.5-8.8.1
2.7.5-8.8.1
patch
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
2.7.1-32.7.1-42.7.1-4ubuntu12.7.1-4ubuntu22.7.1-4ubuntu2.32.7.1-4ubuntu2.42.7.1-4ubuntu2.4+esm1
None known
patch
Ubuntu:16.04:LTS
All versions, plus listed versions
2.7.5-12.7.5-1ubuntu0.16.04.12.7.5-1ubuntu0.16.04.2
None known
patch
Ubuntu:18.04:LTS
All versions, plus listed versions
2.7.5-1build12.7.6-12.7.6-2ubuntu12.7.6-2ubuntu1.1
None known
patch
Ubuntu:20.04:LTS
All versions, plus listed versions
2.7.6-6
None known
patch
Ubuntu:22.04:LTS
All versions, plus listed versions
2.7.6-72.7.6-7build12.7.6-7build2
None known
patch
Ubuntu:24.04:LTS
All versions, plus listed versions
2.7.6-7build22.7.6-7build3
None known
patch
Ubuntu:25.10
All versions, plus listed versions
2.7.6-7build32.8-12.8-2
None known
patch
Ubuntu:26.10
All versions, plus listed versions
2.8-2build1
None known
patch
Ubuntu:26.04:LTS
All versions, plus listed versions
2.8-22.8-2build1
None known
patch
openSUSE:Tumbleweed
before 2.7.6-5.1
2.7.6-5.1

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

Show 29 moreShow less
MoveEnter Open