diff mbox series

[1/2] package/p7zip: fix CVE-2016-9296

Message ID 20200410173118.21538-1-nerv@dawncrow.de
State Changes Requested
Headers show
Series [1/2] package/p7zip: fix CVE-2016-9296 | expand

Commit Message

André Zwing April 10, 2020, 5:31 p.m. UTC
Signed-off-by: André Hentschel <nerv@dawncrow.de>
---
 package/p7zip/0001-CVE-2016-9296.patch | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/p7zip/0001-CVE-2016-9296.patch

Comments

Thomas Petazzoni April 10, 2020, 8:41 p.m. UTC | #1
On Fri, 10 Apr 2020 19:31:17 +0200
André Hentschel <nerv@dawncrow.de> wrote:

> Signed-off-by: André Hentschel <nerv@dawncrow.de>
> ---
>  package/p7zip/0001-CVE-2016-9296.patch | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 package/p7zip/0001-CVE-2016-9296.patch

Thanks, but we need you to add your Signed-off-by *inside* the patches
you're adding. Could you send a v2 with that fixed?

Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/p7zip/0001-CVE-2016-9296.patch b/package/p7zip/0001-CVE-2016-9296.patch
new file mode 100644
index 0000000000..42245c92c0
--- /dev/null
+++ b/package/p7zip/0001-CVE-2016-9296.patch
@@ -0,0 +1,23 @@ 
+From: Robert Luberda <robert@debian.org>
+Date: Sat, 19 Nov 2016 08:48:08 +0100
+Subject: Fix nullptr dereference (CVE-2016-9296)
+
+Patch taken from https://sourceforge.net/p/p7zip/bugs/185/
+---
+ CPP/7zip/Archive/7z/7zIn.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/CPP/7zip/Archive/7z/7zIn.cpp b/CPP/7zip/Archive/7z/7zIn.cpp
+index b0c6b98..7c6dde2 100644
+--- a/CPP/7zip/Archive/7z/7zIn.cpp
++++ b/CPP/7zip/Archive/7z/7zIn.cpp
+@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams(
+       if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
+         ThrowIncorrect();
+   }
+-  HeadersSize += folders.PackPositions[folders.NumPackStreams];
++  if (folders.PackPositions)
++      HeadersSize += folders.PackPositions[folders.NumPackStreams];
+   return S_OK;
+ }
+