mirror of
https://git.yoctoproject.org/poky
synced 2026-07-16 15:57:04 +00:00
7a80996355
Fix CVE-2017-99935, CVE-2017-18013, CVE-2018-5784 References: https://nvd.nist.gov/vuln/detail/CVE-2017-9935 https://nvd.nist.gov/vuln/detail/CVE-2017-18013 https://nvd.nist.gov/vuln/detail/CVE-2018-5784 Patches from: CVE-2017-9935: https://gitlab.com/libtiff/libtiff/commit/3dd8f6a357981a4090f126ab9025056c938b6940 CVE-2017-18013: https://gitlab.com/libtiff/libtiff/commit/c6f41df7b581402dfba3c19a1e3df4454c551a01 CVE-2018-5784: https://gitlab.com/libtiff/libtiff/commit/473851d211cf8805a161820337ca74cc9615d6ef (From OE-Core rev: 798b6b4b3ce370264d036e555185a99ce3aa97b7) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 293c8b0298e91d20ba51291e2351ab7d110671d0 Mon Sep 17 00:00:00 2001
|
|
From: Even Rouault <even.rouault@spatialys.com>
|
|
Date: Sun, 31 Dec 2017 15:09:41 +0100
|
|
Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer
|
|
dereference on corrupted file. Fixes
|
|
http://bugzilla.maptools.org/show_bug.cgi?id=2770
|
|
|
|
Upstream-Status: Backport
|
|
[https://gitlab.com/libtiff/libtiff/commit/c6f41df7b581402dfba3c19a1e3df4454c551a01]
|
|
|
|
CVE: CVE-2017-18013
|
|
|
|
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
|
---
|
|
libtiff/tif_print.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
|
|
index 24d4b98..f494cfb 100644
|
|
--- a/libtiff/tif_print.c
|
|
+++ b/libtiff/tif_print.c
|
|
@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
|
|
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
|
|
fprintf(fd, " %3lu: [%8I64u, %8I64u]\n",
|
|
(unsigned long) s,
|
|
- (unsigned __int64) td->td_stripoffset[s],
|
|
- (unsigned __int64) td->td_stripbytecount[s]);
|
|
+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0,
|
|
+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0);
|
|
#else
|
|
fprintf(fd, " %3lu: [%8llu, %8llu]\n",
|
|
(unsigned long) s,
|
|
- (unsigned long long) td->td_stripoffset[s],
|
|
- (unsigned long long) td->td_stripbytecount[s]);
|
|
+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0,
|
|
+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0);
|
|
#endif
|
|
}
|
|
}
|
|
--
|
|
2.7.4
|
|
|