summaryrefslogtreecommitdiff
path: root/sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-08-16 14:38:46 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-08-16 14:40:22 +0200
commitb4e5bfd9d4c04c2f942bbecce62e4394d827de16 (patch)
treea7a08368e40e218fa62a103ef6d7e43d5f8cc09d /sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch
parente11ab933beb45e185e7cf180ec16ddef127e3594 (diff)
downloadgentoo-b4e5bfd9d4c04c2f942bbecce62e4394d827de16.tar.gz
gentoo-b4e5bfd9d4c04c2f942bbecce62e4394d827de16.tar.bz2
gentoo-b4e5bfd9d4c04c2f942bbecce62e4394d827de16.zip
sys-devel/patch: rev bump to add some patches
Bug: https://bugs.gentoo.org/690136 Package-Manager: Portage-2.3.71, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch')
-rw-r--r--sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch b/sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch
new file mode 100644
index 000000000000..7b74ff06c4bd
--- /dev/null
+++ b/sys-devel/patch/files/patch-2.7.6-CVE-2018-1000156-fix2.patch
@@ -0,0 +1,37 @@
+From 369dcccdfa6336e5a873d6d63705cfbe04c55727 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Mon, 7 May 2018 15:14:45 +0200
+Subject: Don't leak temporary file on failed multi-file ed-style patch
+
+The previous fix worked fine with single-file ed-style patches, but
+would still leak temporary files in the case of multi-file ed-style
+patch. Fix that case as well, and extend the test case to check for
+it.
+
+* src/patch.c (main): Unlink TMPEDNAME if needed before moving to
+ the next file in a patch.
+
+This closes bug #53820:
+https://savannah.gnu.org/bugs/index.php?53820
+
+Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
+Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch")
+---
+ src/patch.c | 1 +
+ 2 files changed, 32 insertions(+)
+
+diff --git a/src/patch.c b/src/patch.c
+index 9146597..81c7a02 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -236,6 +236,7 @@ main (int argc, char **argv)
+ }
+ remove_if_needed (TMPOUTNAME, &TMPOUTNAME_needs_removal);
+ }
++ remove_if_needed (TMPEDNAME, &TMPEDNAME_needs_removal);
+
+ if (! skip_rest_of_patch && ! file_type)
+ {
+--
+cgit v1.0-41-gc330
+