From a6924f08fb2a95b654144608761273510899eb8a Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Fri, 26 May 2017 22:00:52 +0200 Subject: [PATCH] libtasn1: add CVE-2017-6891.patch fixes CVE-2017-6891. Patch taken from upstream git commit 5520704d075802df25ce4ffccc010ba1641bd484 --- srcpkgs/libtasn1/patches/CVE-2017-6891.patch | 24 ++++++++++++++++++++ srcpkgs/libtasn1/template | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/libtasn1/patches/CVE-2017-6891.patch diff --git a/srcpkgs/libtasn1/patches/CVE-2017-6891.patch b/srcpkgs/libtasn1/patches/CVE-2017-6891.patch new file mode 100644 index 00000000000..6466d7acacf --- /dev/null +++ b/srcpkgs/libtasn1/patches/CVE-2017-6891.patch @@ -0,0 +1,24 @@ +diff --git a/lib/parser_aux.c b/lib/parser_aux.c +index b4a7370..976ab38 100644 (file) +--- lib/parser_aux.c ++++ lib/parser_aux.c +@@ -120,6 +120,9 @@ asn1_find_node (asn1_node pointer, const char *name) + if (n_end) + { + nsize = n_end - n_start; ++ if (nsize >= sizeof(n)) ++ return NULL; ++ + memcpy (n, n_start, nsize); + n[nsize] = 0; + n_start = n_end; +@@ -158,6 +161,9 @@ asn1_find_node (asn1_node pointer, const char *name) + if (n_end) + { + nsize = n_end - n_start; ++ if (nsize >= sizeof(n)) ++ return NULL; ++ + memcpy (n, n_start, nsize); + n[nsize] = 0; + n_start = n_end; diff --git a/srcpkgs/libtasn1/template b/srcpkgs/libtasn1/template index 6d311c8bff8..957a51544bb 100644 --- a/srcpkgs/libtasn1/template +++ b/srcpkgs/libtasn1/template @@ -1,7 +1,7 @@ # Template build file for 'libtasn1'. pkgname=libtasn1 version=4.10 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="perl" short_desc="ASN.1 structure parser library"