Bump buildroot to version 2017-02
TG-3 #closed
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
From 3d9181d7bdd8e491f745dbc9e34bd20b6f6da069 Mon Sep 17 00:00:00 2001
|
||||
From: Gergely Nagy <ngg@tresorit.com>
|
||||
Date: Wed, 14 Dec 2016 13:19:01 +0100
|
||||
Subject: [PATCH] Fix possible DoS in ASN.1 decoders (CVE-2016-9939)
|
||||
|
||||
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
||||
---
|
||||
asn.cpp | 10 ++++++++++
|
||||
asn.h | 2 ++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/asn.cpp b/asn.cpp
|
||||
index 297ff01..2e923ef 100644
|
||||
--- a/asn.cpp
|
||||
+++ b/asn.cpp
|
||||
@@ -123,6 +123,8 @@ size_t BERDecodeOctetString(BufferedTransformation &bt, SecByteBlock &str)
|
||||
size_t bc;
|
||||
if (!BERLengthDecode(bt, bc))
|
||||
BERDecodeError();
|
||||
+ if (bc > bt.MaxRetrievable())
|
||||
+ BERDecodeError();
|
||||
|
||||
str.New(bc);
|
||||
if (bc != bt.Get(str, bc))
|
||||
@@ -139,6 +141,8 @@ size_t BERDecodeOctetString(BufferedTransformation &bt, BufferedTransformation &
|
||||
size_t bc;
|
||||
if (!BERLengthDecode(bt, bc))
|
||||
BERDecodeError();
|
||||
+ if (bc > bt.MaxRetrievable())
|
||||
+ BERDecodeError();
|
||||
|
||||
bt.TransferTo(str, bc);
|
||||
return bc;
|
||||
@@ -161,6 +165,8 @@ size_t BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte as
|
||||
size_t bc;
|
||||
if (!BERLengthDecode(bt, bc))
|
||||
BERDecodeError();
|
||||
+ if (bc > bt.MaxRetrievable())
|
||||
+ BERDecodeError();
|
||||
|
||||
SecByteBlock temp(bc);
|
||||
if (bc != bt.Get(temp, bc))
|
||||
@@ -188,6 +194,10 @@ size_t BERDecodeBitString(BufferedTransformation &bt, SecByteBlock &str, unsigne
|
||||
size_t bc;
|
||||
if (!BERLengthDecode(bt, bc))
|
||||
BERDecodeError();
|
||||
+ if (bc == 0)
|
||||
+ BERDecodeError();
|
||||
+ if (bc > bt.MaxRetrievable())
|
||||
+ BERDecodeError();
|
||||
|
||||
byte unused;
|
||||
if (!bt.Get(unused))
|
||||
diff --git a/asn.h b/asn.h
|
||||
index ed9de52..33f0dd0 100644
|
||||
--- a/asn.h
|
||||
+++ b/asn.h
|
||||
@@ -498,6 +498,8 @@ void BERDecodeUnsigned(BufferedTransformation &in, T &w, byte asnTag = INTEGER,
|
||||
bool definite = BERLengthDecode(in, bc);
|
||||
if (!definite)
|
||||
BERDecodeError();
|
||||
+ if (bc > in.MaxRetrievable())
|
||||
+ BERDecodeError();
|
||||
|
||||
SecByteBlock buf(bc);
|
||||
|
||||
--
|
||||
2.10.2
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
# Locally computed
|
||||
sha256 9390670a14170dd0f48a6b6b06f74269ef4b056d4718a1a329f6f6069dc957c9 cryptopp563.zip
|
||||
sha256 74b88c2caf7cf843bdc74d3331adaf83e516167cc8eebe66a79612189549cfa4 f707b9ef1688d4429ca6239cf2dc236440974681.patch
|
||||
sha256 a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34 cryptopp565.zip
|
||||
|
||||
@@ -4,11 +4,9 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CRYPTOPP_VERSION = 5.6.3
|
||||
CRYPTOPP_VERSION = 5.6.5
|
||||
CRYPTOPP_SOURCE = cryptopp$(subst .,,$(CRYPTOPP_VERSION)).zip
|
||||
CRYPTOPP_SITE = http://cryptopp.com/
|
||||
# Upstream patch needed to fix the build with gcc < 4.5
|
||||
CRYPTOPP_PATCH = https://github.com/weidai11/cryptopp/commit/f707b9ef1688d4429ca6239cf2dc236440974681.patch
|
||||
CRYPTOPP_LICENSE = Boost-v1.0
|
||||
CRYPTOPP_LICENSE_FILES = License.txt
|
||||
CRYPTOPP_INSTALL_STAGING = YES
|
||||
@@ -22,11 +20,11 @@ HOST_CRYPTOPP_MAKE_OPTS = \
|
||||
CXXFLAGS="$(HOST_CXXFLAGS) -fPIC"
|
||||
|
||||
define HOST_CRYPTOPP_BUILD_CMDS
|
||||
$(MAKE) -C $(@D) $(HOST_CRYPTOPP_MAKE_OPTS) shared
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CRYPTOPP_MAKE_OPTS) shared
|
||||
endef
|
||||
|
||||
define HOST_CRYPTOPP_INSTALL_CMDS
|
||||
$(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install
|
||||
endef
|
||||
|
||||
$(eval $(host-generic-package))
|
||||
|
||||
Reference in New Issue
Block a user