summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/lz4
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2021-08-26 19:09:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-01 14:06:17 +0100
commit61a42047e5e585a0041cdc304f34a0411a5c0ab1 (patch)
tree3e7c2a423416d9f28402f00c00d9bafb31c4b3db /meta/recipes-support/lz4
parente492d55d02a658b7c9385dee9c92fdf830b92197 (diff)
downloadpoky-61a42047e5e585a0041cdc304f34a0411a5c0ab1.tar.gz
lz4: Security Fix for CVE-2021-3520
Source: https://github.com/lz4/lz4 MR: 111604 Type: Security Fix Disposition: Backport from https://github.com/lz4/lz4/commit/8301a21773ef61656225e264f4f06ae14462bca7#diff-7055e9cf14c488aea9837aaf9f528b58ee3c22988d7d0d81d172ec62d94a88a7 ChangeID: 58492f950164e75954a97cf084df6f9af3d88244 Description: (From OE-Core rev: 6d6a089a2f637051333e0137d2e748c823e2aa98) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/lz4')
-rw-r--r--meta/recipes-support/lz4/files/CVE-2021-3520.patch27
-rw-r--r--meta/recipes-support/lz4/lz4_1.9.3.bb1
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-support/lz4/files/CVE-2021-3520.patch b/meta/recipes-support/lz4/files/CVE-2021-3520.patch
new file mode 100644
index 0000000000..5ac8f6691f
--- /dev/null
+++ b/meta/recipes-support/lz4/files/CVE-2021-3520.patch
@@ -0,0 +1,27 @@
1From 8301a21773ef61656225e264f4f06ae14462bca7 Mon Sep 17 00:00:00 2001
2From: Jasper Lievisse Adriaanse <j@jasper.la>
3Date: Fri, 26 Feb 2021 15:21:20 +0100
4Subject: [PATCH] Fix potential memory corruption with negative memmove() size
5
6Upstream-Status: Backport
7https://github.com/lz4/lz4/commit/8301a21773ef61656225e264f4f06ae14462bca7#diff-7055e9cf14c488aea9837aaf9f528b58ee3c22988d7d0d81d172ec62d94a88a7
8CVE: CVE-2021-3520
9Signed-off-by: Armin Kuster <akuster@mvista.com>
10
11---
12 lib/lz4.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15Index: git/lib/lz4.c
16===================================================================
17--- git.orig/lib/lz4.c
18+++ git/lib/lz4.c
19@@ -1665,7 +1665,7 @@ LZ4_decompress_generic(
20 const size_t dictSize /* note : = 0 if noDict */
21 )
22 {
23- if (src == NULL) { return -1; }
24+ if ((src == NULL) || (outputSize < 0)) { return -1; }
25
26 { const BYTE* ip = (const BYTE*) src;
27 const BYTE* const iend = ip + srcSize;
diff --git a/meta/recipes-support/lz4/lz4_1.9.3.bb b/meta/recipes-support/lz4/lz4_1.9.3.bb
index 3905ef7dbc..2a2944cf59 100644
--- a/meta/recipes-support/lz4/lz4_1.9.3.bb
+++ b/meta/recipes-support/lz4/lz4_1.9.3.bb
@@ -14,6 +14,7 @@ SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3"
14 14
15SRC_URI = "git://github.com/lz4/lz4.git;branch=release \ 15SRC_URI = "git://github.com/lz4/lz4.git;branch=release \
16 file://run-ptest \ 16 file://run-ptest \
17 file://CVE-2021-3520.patch \
17 " 18 "
18UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" 19UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
19 20