[DRE-commits] [ruby-zip] 01/01: diff for NMU version 1.2.0-1.1
Antonio Terceiro
terceiro at moszumanska.debian.org
Tue Feb 28 11:20:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository ruby-zip.
commit 12b86485377db6252022bbd067272ffcf55d2dc1
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Tue Feb 28 08:19:43 2017 -0300
diff for NMU version 1.2.0-1.1
Signed-off-by: Antonio Terceiro <terceiro at debian.org>
---
debian/changelog | 8 ++++++++
debian/patches/CVE-2017-5946.patch | 28 ++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 37 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e2f1eac..1956b7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ruby-zip (1.2.0-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * CVE-2017-5946: directory traversal vulnerability in Zip::File component
+ (Closes: #856269)
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Mon, 27 Feb 2017 17:38:59 +0100
+
ruby-zip (1.2.0-1) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/CVE-2017-5946.patch b/debian/patches/CVE-2017-5946.patch
new file mode 100644
index 0000000..0d5aea4
--- /dev/null
+++ b/debian/patches/CVE-2017-5946.patch
@@ -0,0 +1,28 @@
+From ce4208fdecc2ad079b05d3c49d70fe6ed1d07016 Mon Sep 17 00:00:00 2001
+From: Alexander Simonov <alex at simonov.me>
+Date: Wed, 8 Feb 2017 13:43:14 +0200
+Subject: [PATCH] Fix #315 and resolve relative path vulnerability
+
+---
+ lib/zip/entry.rb | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/zip/entry.rb b/lib/zip/entry.rb
+index 7884458..0aba0eb 100644
+--- a/lib/zip/entry.rb
++++ b/lib/zip/entry.rb
+@@ -150,6 +150,11 @@ module Zip
+ def extract(dest_path = @name, &block)
+ block ||= proc { ::Zip.on_exists_proc }
+
++ if @name.squeeze('/') =~ /\.{2}(?:\/|\z)/
++ puts "WARNING: skipped \"../\" path component(s) in #{@name}"
++ return self
++ end
++
+ if directory? || file? || symlink?
+ __send__("create_#{@ftype}", dest_path, &block)
+ else
+--
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 694a6b2..d1527fa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
require-forwardable-fix-test.patch
ignore-simplecov.diff
fix-random-tests-failures
+CVE-2017-5946.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-zip.git
More information about the Pkg-ruby-extras-commits
mailing list