Skip to contentSkip to conversation

package/libexif: security bump to version 0.6.22

Buildroot Peter Korsgaard 1 participant 1 message May 29, 2020

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=9dd88c20cd24a6b265e9b19312a07c8c20450f3d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2020.02.x

- Switch site to github
- Drop patches (already in version)
- Fix the following CVEs:
- CVE-2020-13114: Time consumption DoS when parsing canon array markers
- CVE-2020-13113: Potential use of uninitialized memory
- CVE-2020-13112: Various buffer overread fixes due to integer overflows in maker notes
- CVE-2020-0093: read overflow
- CVE-2020-12767: fixed division by zero

https://github.com/libexif/libexif/releases/tag/libexif-0_6_22-release

(cherry picked from commit ca0547ffeaea77b1b59ddcf77a2f3713167f8a7e)
---
 ...not-all-buffer-overreads-during-decoding-.patch |  65 -----------
 ...akernotes-make-sure-the-makernote-contain.patch |  41 -------
 ...mum-recursion-depth-in-exif_data_load_dat.patch |  30 ------
 ...p-recursion-detection-in-exif_data_load_d.patch | 120 ---------------------
 package/libexif/0005-fix-CVE-2019-9278.patch       |  90 ----------------
 package/libexif/Config.in                          |   2 +-
 package/libexif/libexif.hash                       |   2 +-
 package/libexif/libexif.mk                         |  16 +--
 8 files changed, 6 insertions(+), 360 deletions(-)
package/libexif/0001-fixes-some-not-all-buffer-overreads-during-decoding-.patch deleted +0 -65
deleted file mode 100644
index c98ed748c5..0000000000
@@ -1,65 +0,0 @@
-From 41bd04234b104312f54d25822f68738ba8d7133d Mon Sep 17 00:00:00 2001
-From: Marcus Meissner <[email protected]>
-Date: Tue, 25 Jul 2017 23:44:44 +0200
-Subject: [PATCH] fixes some (not all) buffer overreads during decoding pentax
- makernote entries.
-
-This should fix:
-https://sourceforge.net/p/libexif/bugs/125/ CVE-2016-6328
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- libexif/pentax/mnote-pentax-entry.c | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/libexif/pentax/mnote-pentax-entry.c b/libexif/pentax/mnote-pentax-entry.c
-index d03d159..ea0429a 100644
---- a/libexif/pentax/mnote-pentax-entry.c
-+++ b/libexif/pentax/mnote-pentax-entry.c
-@@ -425,24 +425,34 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
- 		case EXIF_FORMAT_SHORT:
- 		  {
- 			const unsigned char *data = entry->data;
--		  	size_t k, len = strlen(val);
-+		  	size_t k, len = strlen(val), sizeleft;
-+
-+			sizeleft = entry->size;
- 		  	for(k=0; k<entry->components; k++) {
-+				if (sizeleft < 2)
-+					break;
- 				vs = exif_get_short (data, entry->order);
- 				snprintf (val+len, maxlen-len, "%i ", vs);
- 				len = strlen(val);
- 				data += 2;
-+				sizeleft -= 2;
- 			}
- 		  }
- 		  break;
- 		case EXIF_FORMAT_LONG:
- 		  {
- 			const unsigned char *data = entry->data;
--		  	size_t k, len = strlen(val);
-+		  	size_t k, len = strlen(val), sizeleft;
-+
-+			sizeleft = entry->size;
- 		  	for(k=0; k<entry->components; k++) {
-+				if (sizeleft < 4)
-+					break;
- 				vl = exif_get_long (data, entry->order);
- 				snprintf (val+len, maxlen-len, "%li", (long int) vl);
- 				len = strlen(val);
- 				data += 4;
-+				sizeleft -= 4;
- 			}
- 		  }
- 		  break;
-@@ -455,5 +465,5 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry,
- 		break;
- 	}
- 
--	return (val);
-+	return val;
- }
--- 
-2.20.1
-
package/libexif/0002-On-saving-makernotes-make-sure-the-makernote-contain.patch deleted +0 -41

41 lines not on this page · raw message

package/libexif/0003-Reduce-maximum-recursion-depth-in-exif_data_load_dat.patch deleted +0 -30
deleted file mode 100644
index e662d6bfc9..0000000000
@@ -1,30 +0,0 @@
-From 5d28011c40ec86cf52cffad541093d37c263898a Mon Sep 17 00:00:00 2001
-From: Dan Fandrich <[email protected]>
-Date: Fri, 20 Apr 2018 18:05:19 +0200
-Subject: [PATCH] Reduce maximum recursion depth in exif_data_load_data_content
-
-This only needs to be a small, single digit integer for normal files,
-and reducing the maximum closer to this reduces the time and space
-needed to detect pathological cases.
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- libexif/exif-data.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libexif/exif-data.c b/libexif/exif-data.c
-index 91f4c33..04cdda2 100644
---- a/libexif/exif-data.c
-+++ b/libexif/exif-data.c
-@@ -378,7 +378,7 @@ exif_data_load_data_content (ExifData *data, ExifIfd ifd,
- 	if ((((int)ifd) < 0) || ( ((int)ifd) >= EXIF_IFD_COUNT))
- 	  return;
- 
--	if (recursion_depth > 30) {
-+	if (recursion_depth > 12) {
- 		exif_log (data->priv->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifData",
- 			  "Deep recursion detected!");
- 		return;
--- 
-2.20.1
-
package/libexif/0004-Improve-deep-recursion-detection-in-exif_data_load_d.patch deleted +0 -120

120 lines not on this page · raw message

package/libexif/0005-fix-CVE-2019-9278.patch deleted +0 -90

90 lines not on this page · raw message

package/libexif/Config.in +1 -1
index 8a38b477b8..8064c2e9f9 100644
@@ -6,4 +6,4 @@ config BR2_PACKAGE_LIBEXIF
 	  image. The EXIF library allows you to parse an EXIF file
 	  and read the data from those tags.
 
-	  http://libexif.sf.net
+	  https://libexif.github.io
package/libexif/libexif.hash +1 -1
index aa9fcc8d89..1a2157b3f5 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a  libexif-0.6.21.tar.bz2
+sha256  5048f1c8fc509cc636c2f97f4b40c293338b6041a5652082d5ee2cf54b530c56  libexif-0.6.22.tar.xz
 sha256  36b6d3fa47916943fd5fec313c584784946047ec1337a78b440e5992cb595f89  COPYING
package/libexif/libexif.mk +4 -12
index 643d9ed893..c945c275a7 100644
@@ -4,21 +4,13 @@
 #
 ################################################################################
 
-LIBEXIF_VERSION = 0.6.21
-LIBEXIF_SOURCE = libexif-$(LIBEXIF_VERSION).tar.bz2
-LIBEXIF_SITE = http://downloads.sourceforge.net/project/libexif/libexif/$(LIBEXIF_VERSION)
+LIBEXIF_VERSION = 0.6.22
+LIBEXIF_SOURCE = libexif-$(LIBEXIF_VERSION).tar.xz
+LIBEXIF_SITE = \
+	https://github.com/libexif/libexif/releases/download/libexif-$(subst .,_,$(LIBEXIF_VERSION))-release
 LIBEXIF_INSTALL_STAGING = YES
 LIBEXIF_DEPENDENCIES = host-pkgconf
 LIBEXIF_LICENSE = LGPL-2.1+
 LIBEXIF_LICENSE_FILES = COPYING
 
-# 0001-fixes-some-not-all-buffer-overreads-during-decoding-.patch
-LIBEXIF_IGNORE_CVES += CVE-2016-6328
-# 0002-On-saving-makernotes-make-sure-the-makernote-contain.patch
-LIBEXIF_IGNORE_CVES += CVE-2017-7544
-# 0004-Improve-deep-recursion-detection-in-exif_data_load_d.patch
-LIBEXIF_IGNORE_CVES += CVE-2018-20030
-# 0005-fix-CVE-2019-9278.patch
-LIBEXIF_IGNORE_CVES += CVE-2019-9278
-
 $(eval $(autotools-package))