guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: libpng: Fix a null pointer dereference [fixes security issue


From: Leo Famulari
Subject: 01/01: gnu: libpng: Fix a null pointer dereference [fixes security issue].
Date: Thu, 29 Dec 2016 18:36:06 +0000 (UTC)

lfam pushed a commit to branch master
in repository guix.

commit 322e724bfad9f82149c3f83416234ab19486a229
Author: Leo Famulari <address@hidden>
Date:   Thu Dec 29 13:01:55 2016 -0500

    gnu: libpng: Fix a null pointer dereference [fixes security issue].
    
    * gnu/packages/patches/libpng-fix-null-ptr-dereference.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/image.scm (libpng)[replacement]: New field.
    (libpng/fixed): New variable.
---
 gnu/local.mk                                       |    1 +
 gnu/packages/image.scm                             |    9 +++++
 .../patches/libpng-fix-null-ptr-dereference.patch  |   36 ++++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 106adb2..38c1b0b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -675,6 +675,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/libmad-armv7-thumb-pt2.patch            \
   %D%/packages/patches/libmad-frame-length.patch               \
   %D%/packages/patches/libmad-mips-newgcc.patch                        \
+  %D%/packages/patches/libpng-fix-null-ptr-dereference.patch   \
   %D%/packages/patches/libssh-0.6.5-CVE-2016-0739.patch                \
   %D%/packages/patches/libtar-CVE-2013-4420.patch \
   %D%/packages/patches/libtheora-config-guess.patch            \
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 1c500b3..69eeaed 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -64,6 +64,7 @@
 (define-public libpng
   (package
    (name "libpng")
+   (replacement libpng/fixed)
    (version "1.6.25")
    (source (origin
             (method url-fetch)
@@ -88,6 +89,14 @@ library.  It supports almost all PNG features and is 
extensible.")
    (license license:zlib)
    (home-page "http://www.libpng.org/pub/png/libpng.html";)))
 
+(define libpng/fixed
+  (package
+    (inherit libpng)
+    (source
+      (origin
+        (inherit (package-source libpng))
+        (patches (search-patches "libpng-fix-null-ptr-dereference.patch"))))))
+
 (define-public libpng-1.2
   (package
     (inherit libpng)
diff --git a/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch 
b/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch
new file mode 100644
index 0000000..1924591
--- /dev/null
+++ b/gnu/packages/patches/libpng-fix-null-ptr-dereference.patch
@@ -0,0 +1,36 @@
+Fix a null pointer dereference in png_set_text_2():
+
+http://seclists.org/oss-sec/2016/q4/777
+
+Patch adapted from upstream source repository:
+
+https://sourceforge.net/p/libpng/code/ci/812768d7a9c973452222d454634496b25ed415eb/
+
+From 812768d7a9c973452222d454634496b25ed415eb Mon Sep 17 00:00:00 2001
+From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
+Date: Thu, 29 Dec 2016 07:51:33 -0600
+Subject: [PATCH] [libpng16] Fixed a potential null pointer dereference in
+ png_set_text_2()
+
+(bug report and patch by Patrick Keshishian).
+---
+ ANNOUNCE | 2 ++
+ CHANGES  | 2 ++
+ png.c    | 1 +
+ 3 files changed, 5 insertions(+)
+
+diff --git a/png.c b/png.c
+index 8afc28fc2..2e05de159 100644
+--- a/png.c
++++ b/png.c
+@@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp 
info_ptr, png_uint_32 mask,
+          png_free(png_ptr, info_ptr->text);
+          info_ptr->text = NULL;
+          info_ptr->num_text = 0;
++         info_ptr->max_text = 0;
+       }
+    }
+ #endif
+-- 
+2.11.0
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]