aboutsummaryrefslogtreecommitdiffstats
path: root/main/libtasn1
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2017-08-03 13:20:42 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2017-08-03 14:01:16 +0000
commit1ed7d3233ead92fd7304cc4d38f8ea503759d5c6 (patch)
tree46c44894a6b1464509d2ccc7d29b59fab2f69a04 /main/libtasn1
parent833fa41a4d6d73d87df385db7cb1effb9cadada5 (diff)
downloadaports-1ed7d3233ead92fd7304cc4d38f8ea503759d5c6.tar.bz2
aports-1ed7d3233ead92fd7304cc4d38f8ea503759d5c6.tar.xz
main/libtasn1: fix for CVE-2017-10790. Fixes #7603
Diffstat (limited to 'main/libtasn1')
-rw-r--r--main/libtasn1/APKBUILD14
-rw-r--r--main/libtasn1/CVE-2017-10790.patch55
2 files changed, 64 insertions, 5 deletions
diff --git a/main/libtasn1/APKBUILD b/main/libtasn1/APKBUILD
index 95920d8a82..2496ef77e8 100644
--- a/main/libtasn1/APKBUILD
+++ b/main/libtasn1/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libtasn1
pkgver=4.9
-pkgrel=1
+pkgrel=2
pkgdesc="The ASN.1 library used in GNUTLS"
url="http://www.gnu.org/software/gnutls/"
arch="all"
@@ -12,12 +12,16 @@ makedepends="texinfo"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
- CVE-2017-6891.patch"
-builddir="$srcdir/$pkgname-$pkgver"
+ CVE-2017-6891.patch
+ CVE-2017-10790.patch
+ "
+_builddir="$srcdir"/$pkgname-$pkgver
# secfixes:
# 4.9-r1:
# - CVE-2017-6891
+# 4.9-r2:
+# - CVE-2017-10790
build() {
cd "$builddir"
@@ -36,6 +40,6 @@ package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
}
-
sha512sums="1fb2c5eb89f3e9abd8f7433342619e3d89576ed15a783b8152ed9da0383342f80e750c570733ac266bc8a3c4b23e5e2a57e3735b2341d507e7d88ac366a8d6e7 libtasn1-4.9.tar.gz
-82972045d29afe8b4a4e240ae45e6417de46f1057ba48026ba5ed5679054dbc469194a34ede9007925bf7bfbc91c93f31aafc1dcdac8ffc4d8c0798e08c7f880 CVE-2017-6891.patch"
+82972045d29afe8b4a4e240ae45e6417de46f1057ba48026ba5ed5679054dbc469194a34ede9007925bf7bfbc91c93f31aafc1dcdac8ffc4d8c0798e08c7f880 CVE-2017-6891.patch
+8e9dad0a1ee7cb7a8ed3d2a60c1c1bcb3e1ef689dbd2879992d4098f36edbae3bb962b9c87a0a9a77335e83abf10fd72bd78bde99989421c35f4434a9e1d08cc CVE-2017-10790.patch"
diff --git a/main/libtasn1/CVE-2017-10790.patch b/main/libtasn1/CVE-2017-10790.patch
new file mode 100644
index 0000000000..eb752c20a9
--- /dev/null
+++ b/main/libtasn1/CVE-2017-10790.patch
@@ -0,0 +1,55 @@
+From d8d805e1f2e6799bb2dff4871a8598dc83088a39 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Thu, 22 Jun 2017 16:31:37 +0200
+Subject: [PATCH] _asn1_check_identifier: safer access to values read
+
+Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
+---
+ lib/parser_aux.c | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/lib/parser_aux.c b/lib/parser_aux.c
+index 976ab38..786ea64 100644
+--- a/lib/parser_aux.c
++++ b/lib/parser_aux.c
+@@ -955,7 +955,7 @@ _asn1_check_identifier (asn1_node node)
+ if (p2 == NULL)
+ {
+ if (p->value)
+- _asn1_strcpy (_asn1_identifierMissing, p->value);
++ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p->value);
+ else
+ _asn1_strcpy (_asn1_identifierMissing, "(null)");
+ return ASN1_IDENTIFIER_NOT_FOUND;
+@@ -968,9 +968,15 @@ _asn1_check_identifier (asn1_node node)
+ if (p2 && (type_field (p2->type) == ASN1_ETYPE_DEFAULT))
+ {
+ _asn1_str_cpy (name2, sizeof (name2), node->name);
+- _asn1_str_cat (name2, sizeof (name2), ".");
+- _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
+- _asn1_strcpy (_asn1_identifierMissing, p2->value);
++ if (p2->value)
++ {
++ _asn1_str_cat (name2, sizeof (name2), ".");
++ _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
++ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
++ }
++ else
++ _asn1_strcpy (_asn1_identifierMissing, "(null)");
++
+ p2 = asn1_find_node (node, name2);
+ if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID) ||
+ !(p2->type & CONST_ASSIGN))
+@@ -990,7 +996,8 @@ _asn1_check_identifier (asn1_node node)
+ _asn1_str_cpy (name2, sizeof (name2), node->name);
+ _asn1_str_cat (name2, sizeof (name2), ".");
+ _asn1_str_cat (name2, sizeof (name2), (char *) p2->value);
+- _asn1_strcpy (_asn1_identifierMissing, p2->value);
++ _asn1_str_cpy (_asn1_identifierMissing, sizeof(_asn1_identifierMissing), (char*)p2->value);
++
+ p2 = asn1_find_node (node, name2);
+ if (!p2 || (type_field (p2->type) != ASN1_ETYPE_OBJECT_ID)
+ || !(p2->type & CONST_ASSIGN))
+--
+1.9.1
+