initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
From 25c26a3b7a9ad8192ccc923e15cf62bf0108ef94 Mon Sep 17 00:00:00 2001
|
||||
From: werew <werew@ret2libc.com>
|
||||
Date: Thu, 3 Oct 2019 19:57:10 +0200
|
||||
Subject: [PATCH] Fixes #507
|
||||
|
||||
Fix a vulnerability in der_decode_utf8_string as specified here:
|
||||
https://github.com/libtom/libtomcrypt/issues/507
|
||||
|
||||
[for import into Buildroot]
|
||||
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
|
||||
|
||||
|
||||
---
|
||||
src/pk/asn1/der/utf8/der_decode_utf8_string.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pk/asn1/der/utf8/der_decode_utf8_string.c b/src/pk/asn1/der/utf8/der_decode_utf8_string.c
|
||||
index 94555b99f..d3ed82bea 100644
|
||||
--- a/src/pk/asn1/der/utf8/der_decode_utf8_string.c
|
||||
+++ b/src/pk/asn1/der/utf8/der_decode_utf8_string.c
|
||||
@@ -65,7 +65,7 @@ int der_decode_utf8_string(const unsigned char *in, unsigned long inlen,
|
||||
/* count number of bytes */
|
||||
for (z = 0; (tmp & 0x80) && (z <= 4); z++, tmp = (tmp << 1) & 0xFF);
|
||||
|
||||
- if (z > 4 || (x + (z - 1) > inlen)) {
|
||||
+ if (z == 1 || z > 4 || (x + (z - 1) > inlen)) {
|
||||
return CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
config BR2_PACKAGE_LIBTOMCRYPT
|
||||
bool "libtomcrypt"
|
||||
select BR2_PACKAGE_LIBTOMMATH
|
||||
help
|
||||
LibTomCrypt is a fairly comprehensive, modular and portable
|
||||
cryptographic toolkit that provides developers with a vast
|
||||
array of well known published block ciphers, one-way hash
|
||||
functions, chaining modes, pseudo-random number generators,
|
||||
public key cryptography and a plethora of other routines.
|
||||
|
||||
https://www.libtom.net
|
||||
@@ -0,0 +1,5 @@
|
||||
# Locally computed
|
||||
sha256 96ad4c3b8336050993c5bc2cf6c057484f2b0f9f763448151567fbab5e767b84 crypt-1.18.2.tar.xz
|
||||
|
||||
# Hash for license file:
|
||||
sha256 8f196cb13afd271f5e267fd29543fc454596382ad580e7592709492843996ac8 LICENSE
|
||||
@@ -0,0 +1,35 @@
|
||||
################################################################################
|
||||
#
|
||||
# libtomcrypt
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBTOMCRYPT_VERSION = 1.18.2
|
||||
LIBTOMCRYPT_SITE = https://github.com/libtom/libtomcrypt/releases/download/v$(LIBTOMCRYPT_VERSION)
|
||||
LIBTOMCRYPT_SOURCE = crypt-$(LIBTOMCRYPT_VERSION).tar.xz
|
||||
LIBTOMCRYPT_LICENSE = WTFPL
|
||||
LIBTOMCRYPT_LICENSE_FILES = LICENSE
|
||||
LIBTOMCRYPT_CPE_ID_VENDOR = libtom
|
||||
LIBTOMCRYPT_INSTALL_STAGING = YES
|
||||
LIBTOMCRYPT_INSTALL_TARGET = NO # only static library
|
||||
LIBTOMCRYPT_DEPENDENCIES = libtommath
|
||||
|
||||
# 0001-fix-CVE-2019-17362.patch
|
||||
LIBTOMCRYPT_IGNORE_CVES += CVE-2019-17362
|
||||
|
||||
LIBTOMCRYPT_CFLAGS = -I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC
|
||||
|
||||
ifeq ($(BR2_STATIC_LIBS),)
|
||||
LIBTOMCRYPT_CFLAGS += -fPIC
|
||||
endif
|
||||
|
||||
define LIBTOMCRYPT_BUILD_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -f makefile.unix $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBTOMCRYPT_CFLAGS)"
|
||||
endef
|
||||
|
||||
define LIBTOMCRYPT_INSTALL_STAGING_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -f makefile.unix \
|
||||
DESTDIR="$(STAGING_DIR)" PREFIX=/usr install
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
Reference in New Issue
Block a user