summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2022-09-13 08:32:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-16 17:53:28 +0100
commit5e7c237200c6319e17191cc93df4d0e19f5a73be (patch)
treef1dea47a2851d51cd7122004fd1714c5a48e8e68 /meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch
parenta98b309fe23cfdcf3f8be7afc4fde6734b973f43 (diff)
downloadpoky-5e7c237200c6319e17191cc93df4d0e19f5a73be.tar.gz
tiff: Security fixes CVE-2022-1354 and CVE-2022-1355
References: https://nvd.nist.gov/vuln/detail/CVE-2022-1354 https://security-tracker.debian.org/tracker/CVE-2022-1354 https://nvd.nist.gov/vuln/detail/CVE-2022-1355 https://security-tracker.debian.org/tracker/CVE-2022-1355 Patches from: CVE-2022-1354: https://gitlab.com/libtiff/libtiff/-/commit/87f580f39011109b3bb5f6eca13fac543a542798 CVE-2022-1355: https://gitlab.com/libtiff/libtiff/-/commit/c1ae29f9ebacd29b7c3e0c7db671af7db3584bc2 (From OE-Core rev: 6c373c041f1dd45458866408d1ca16d47cacbd86) (From OE-Core rev: 8414d39f3f89cc1176bd55c9455ad942db8ea4b1) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch')
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch
new file mode 100644
index 0000000000..e59f5aad55
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2022-1355.patch
@@ -0,0 +1,62 @@
1From fb1db384959698edd6caeea84e28253d272a0f96 Mon Sep 17 00:00:00 2001
2From: Su_Laus <sulau@freenet.de>
3Date: Sat, 2 Apr 2022 22:33:31 +0200
4Subject: [PATCH] tiffcp: avoid buffer overflow in "mode" string (fixes #400)
5
6CVE: CVE-2022-1355
7
8Upstream-Status: Backport
9[https://gitlab.com/libtiff/libtiff/-/commit/c1ae29f9ebacd29b7c3e0c7db671af7db3584bc2]
10
11Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
12---
13 tools/tiffcp.c | 25 ++++++++++++++++++++-----
14 1 file changed, 20 insertions(+), 5 deletions(-)
15
16diff --git a/tools/tiffcp.c b/tools/tiffcp.c
17index fd129bb7..8d944ff6 100644
18--- a/tools/tiffcp.c
19+++ b/tools/tiffcp.c
20@@ -274,19 +274,34 @@ main(int argc, char* argv[])
21 deftilewidth = atoi(optarg);
22 break;
23 case 'B':
24- *mp++ = 'b'; *mp = '\0';
25+ if (strlen(mode) < (sizeof(mode) - 1))
26+ {
27+ *mp++ = 'b'; *mp = '\0';
28+ }
29 break;
30 case 'L':
31- *mp++ = 'l'; *mp = '\0';
32+ if (strlen(mode) < (sizeof(mode) - 1))
33+ {
34+ *mp++ = 'l'; *mp = '\0';
35+ }
36 break;
37 case 'M':
38- *mp++ = 'm'; *mp = '\0';
39+ if (strlen(mode) < (sizeof(mode) - 1))
40+ {
41+ *mp++ = 'm'; *mp = '\0';
42+ }
43 break;
44 case 'C':
45- *mp++ = 'c'; *mp = '\0';
46+ if (strlen(mode) < (sizeof(mode) - 1))
47+ {
48+ *mp++ = 'c'; *mp = '\0';
49+ }
50 break;
51 case '8':
52- *mp++ = '8'; *mp = '\0';
53+ if (strlen(mode) < (sizeof(mode)-1))
54+ {
55+ *mp++ = '8'; *mp = '\0';
56+ }
57 break;
58 case 'x':
59 pageInSeq = 1;
60--
612.25.1
62