fix CVE-2021-3520
This commit is contained in:
parent
422b5f0af9
commit
fdfe95197d
22
backport-CVE-2021-3520.patch
Normal file
22
backport-CVE-2021-3520.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/lz4.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/lz4.c b/lib/lz4.c
|
||||||
|
index 5f524d01d..c2f504ef3 100644
|
||||||
|
--- a/lib/lz4.c
|
||||||
|
+++ b/lib/lz4.c
|
||||||
|
@@ -1749,7 +1749,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;
|
||||||
8
lz4.spec
8
lz4.spec
@ -1,12 +1,13 @@
|
|||||||
Name: lz4
|
Name: lz4
|
||||||
Version: 1.9.3
|
Version: 1.9.3
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Extremely fast compression algorithm
|
Summary: Extremely fast compression algorithm
|
||||||
|
|
||||||
License: GPLv2+ and BSD
|
License: GPLv2+ and BSD
|
||||||
URL: https://lz4.github.io/lz4/
|
URL: https://lz4.github.io/lz4/
|
||||||
Source0: https://github.com/lz4/lz4/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/lz4/lz4/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch6000: Fix-Data-Corruption-Bug-when-Streaming-with-an-Attac.patch
|
Patch6000: Fix-Data-Corruption-Bug-when-Streaming-with-an-Attac.patch
|
||||||
|
Patch6001: backport-CVE-2021-3520.patch
|
||||||
|
|
||||||
Provides: %{name}-libs = %{version}-%{release}
|
Provides: %{name}-libs = %{version}-%{release}
|
||||||
Obsoletes: %{name} < 1.7.5-3
|
Obsoletes: %{name} < 1.7.5-3
|
||||||
@ -68,6 +69,9 @@ export MOREFLAGS="-g"
|
|||||||
%{_mandir}/man1/unlz4.1*
|
%{_mandir}/man1/unlz4.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 19 2021 shixuantong <shixuantong@huawei.com> - 1.9.3-2
|
||||||
|
- fix CVE-2021-3520
|
||||||
|
|
||||||
* Thu Jan 28 2021 liudabo <liudabo1@huawei.com> - 1.9.3-1
|
* Thu Jan 28 2021 liudabo <liudabo1@huawei.com> - 1.9.3-1
|
||||||
- upgrade version to 1.9.3
|
- upgrade version to 1.9.3
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user