summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch47
-rw-r--r--meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch b/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch
new file mode 100644
index 0000000000..2261ea94b7
--- /dev/null
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools/0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch
@@ -0,0 +1,47 @@
1From 3c0d67184d6edb63f3b7d6d5eb81531daa6388f3 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 28 Aug 2018 16:25:36 +0800
4Subject: [PATCH] squashfs-tools: patch for CVE-2015-4645(6)
5
6Upstream-Status: Backport[https://github.com/devttys0/sasquatch/pull/
7 5/commits/6777e08cc38bc780d27c69c1d8c272867b74524f]
8
9CVE: CVE-2015-4645 CVE-2015-4646
10
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 squashfs-tools/unsquash-4.c | 11 ++++++++---
14 1 file changed, 8 insertions(+), 3 deletions(-)
15
16diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
17index ecdaac7..692ae25 100644
18--- a/squashfs-tools/unsquash-4.c
19+++ b/squashfs-tools/unsquash-4.c
20@@ -31,9 +31,9 @@ static unsigned int *id_table;
21 int read_fragment_table_4(long long *directory_table_end)
22 {
23 int res, i;
24- int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
25- int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
26- long long fragment_table_index[indexes];
27+ size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
28+ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
29+ long long *fragment_table_index;
30
31 TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
32 "from 0x%llx\n", sBlk.s.fragments, indexes,
33@@ -43,6 +43,11 @@ int read_fragment_table_4(long long *directory_table_end)
34 *directory_table_end = sBlk.s.fragment_table_start;
35 return TRUE;
36 }
37+
38+ fragment_table_index = malloc(indexes*sizeof(long long));
39+ if(fragment_table_index == NULL)
40+ EXIT_UNSQUASH("read_fragment_table: failed to allocate "
41+ "fragment table index\n");
42
43 fragment_table = malloc(bytes);
44 if(fragment_table == NULL)
45--
462.7.4
47
diff --git a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index a8baca51e3..1eb0154fd7 100644
--- a/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -15,6 +15,7 @@ SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
15 file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \ 15 file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
16 file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \ 16 file://squashfs-tools-4.3-sysmacros.patch;striplevel=2 \
17 file://fix-compat.patch \ 17 file://fix-compat.patch \
18 file://0001-squashfs-tools-patch-for-CVE-2015-4645-6.patch;striplevel=2 \
18" 19"
19UPSTREAM_CHECK_COMMITS = "1" 20UPSTREAM_CHECK_COMMITS = "1"
20SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759" 21SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"