diff options
Diffstat (limited to 'meta/recipes-support/lz4')
-rw-r--r-- | meta/recipes-support/lz4/files/CVE-2021-3520.patch | 27 | ||||
-rw-r--r-- | meta/recipes-support/lz4/lz4.bb | 21 | ||||
-rw-r--r-- | meta/recipes-support/lz4/lz4_1.9.3.bb | 31 |
3 files changed, 58 insertions, 21 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 @@ +From 8301a21773ef61656225e264f4f06ae14462bca7 Mon Sep 17 00:00:00 2001 +From: Jasper Lievisse Adriaanse <j@jasper.la> +Date: Fri, 26 Feb 2021 15:21:20 +0100 +Subject: [PATCH] Fix potential memory corruption with negative memmove() size + +Upstream-Status: Backport +https://github.com/lz4/lz4/commit/8301a21773ef61656225e264f4f06ae14462bca7#diff-7055e9cf14c488aea9837aaf9f528b58ee3c22988d7d0d81d172ec62d94a88a7 +CVE: CVE-2021-3520 +Signed-off-by: Armin Kuster <akuster@mvista.com> + +--- + lib/lz4.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: git/lib/lz4.c +=================================================================== +--- git.orig/lib/lz4.c ++++ git/lib/lz4.c +@@ -1665,7 +1665,7 @@ LZ4_decompress_generic( + const size_t dictSize /* note : = 0 if noDict */ + ) + { +- if (src == NULL) { return -1; } ++ if ((src == NULL) || (outputSize < 0)) { return -1; } + + { const BYTE* ip = (const BYTE*) src; + const BYTE* const iend = ip + srcSize; diff --git a/meta/recipes-support/lz4/lz4.bb b/meta/recipes-support/lz4/lz4.bb deleted file mode 100644 index 18e56d04c6..0000000000 --- a/meta/recipes-support/lz4/lz4.bb +++ /dev/null @@ -1,21 +0,0 @@ -SUMMARY = "Extremely Fast Compression algorithm" -DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems." - -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=0b0d063f37a4477b54af2459477dcafd" - -SRCREV = "d86dc916771c126afb797637dda9f6421c0cb998" - -PV = "131+git${SRCPV}" - -SRC_URI = "git://github.com/Cyan4973/lz4.git" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" - -do_install() { - oe_runmake install -} - -BBCLASSEXTEND += "native nativesdk" diff --git a/meta/recipes-support/lz4/lz4_1.9.3.bb b/meta/recipes-support/lz4/lz4_1.9.3.bb new file mode 100644 index 0000000000..129a86b681 --- /dev/null +++ b/meta/recipes-support/lz4/lz4_1.9.3.bb @@ -0,0 +1,31 @@ +SUMMARY = "Extremely Fast Compression algorithm" +DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems." +HOMEPAGE = "https://github.com/lz4/lz4" + +LICENSE = "BSD-2-Clause | GPL-2.0-only" +LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \ + file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \ + " + +PE = "1" + +SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3" + +SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ + file://CVE-2021-3520.patch \ + " +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" + +S = "${WORKDIR}/git" + +# Fixed in r118, which is larger than the current version. +CVE_CHECK_IGNORE += "CVE-2014-4715" + +EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" + +do_install() { + oe_runmake install +} + +BBCLASSEXTEND = "native nativesdk" |