All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Vetter <jubalh@iodoru.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package/jasper: Apply fix for CVE-2018-19542
Date: Mon,  2 Dec 2019 10:51:41 +0100	[thread overview]
Message-ID: <20191202095142.15115-2-jubalh@iodoru.org> (raw)
In-Reply-To: <20191202095142.15115-1-jubalh@iodoru.org>

Add 0002-check-null-in-jp2_decode.patch:

Patch was proposed upstream[1] but upstream is very inactive.
Linux distributions use the same fix to patch their packages.

1: https://github.com/mdadams/jasper/pull/200
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
---
 ...2-check-null-in-jp2_decode-CVE-2018-19542.patch | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 package/jasper/0002-check-null-in-jp2_decode-CVE-2018-19542.patch

diff --git a/package/jasper/0002-check-null-in-jp2_decode-CVE-2018-19542.patch b/package/jasper/0002-check-null-in-jp2_decode-CVE-2018-19542.patch
new file mode 100644
index 0000000000..bfe07ee786
--- /dev/null
+++ b/package/jasper/0002-check-null-in-jp2_decode-CVE-2018-19542.patch
@@ -0,0 +1,23 @@
+From fc62d1b7164ded2405fd6a0604548b34a5a77462 Mon Sep 17 00:00:00 2001
+From: Timothy Lyanguzov <timothy.lyanguzov@sap.com>
+Date: Mon, 18 Mar 2019 16:46:24 +1300
+Subject: [PATCH] Fix CVE-2018-19542: Check for NULL pointer in jp2_decode
+
+---
+ src/libjasper/jp2/jp2_dec.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libjasper/jp2/jp2_dec.c b/src/libjasper/jp2/jp2_dec.c
+index 03b0eaf..a535c19 100644
+--- a/src/libjasper/jp2/jp2_dec.c
++++ b/src/libjasper/jp2/jp2_dec.c
+@@ -388,6 +388,9 @@ jas_image_t *jp2_decode(jas_stream_t *in, const char *optstr)
+ 				jas_image_setcmpttype(dec->image, newcmptno, jp2_getct(jas_image_clrspc(dec->image), 0, channo + 1));
+ 				}
+ #endif
++			} else {
++				jas_eprintf("error: invalid MTYP in CMAP box\n");
++				goto error;
+ 			}
+ 		}
+ 	}
-- 
2.16.4

  reply	other threads:[~2019-12-02  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  9:51 [Buildroot] [PATCH 1/3] package/jasper: Apply fix for CVE-2018-19541 Michael Vetter
2019-12-02  9:51 ` Michael Vetter [this message]
2019-12-02  9:51 ` [Buildroot] [PATCH 3/3] package/jasper: Apply fix for CVE-2018-19540 Michael Vetter
2019-12-02 11:40 ` [Buildroot] [PATCH 1/3] package/jasper: Apply fix for CVE-2018-19541 Peter Korsgaard
2019-12-02 11:59 Michael Vetter
2019-12-02 11:59 ` [Buildroot] [PATCH 2/3] package/jasper: Apply fix for CVE-2018-19542 Michael Vetter
2019-12-02 12:42   ` Peter Korsgaard
2019-12-06  8:21   ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191202095142.15115-2-jubalh@iodoru.org \
    --to=jubalh@iodoru.org \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.