summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-09 22:59:03 +0200
commit972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch)
tree97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-support/gnutls/gnutls
downloadpoky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls')
-rw-r--r--meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch65
-rw-r--r--meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch67
-rw-r--r--meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch33
3 files changed, 165 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch
new file mode 100644
index 0000000000..8824729d2f
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch
@@ -0,0 +1,65 @@
1From 053ae65403216acdb0a4e78b25ad66ee9f444f02 Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3Date: Sat, 28 Mar 2015 22:41:03 +0100
4Subject: [PATCH] Better fix for the double free in dist point parsing
5
6Fixes CVE-2015-3308
7Upstream-Status: Backport
8
9Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
10---
11 lib/x509/x509_ext.c | 10 ++++++----
12 1 file changed, 6 insertions(+), 4 deletions(-)
13
14diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
15index 2e69ed0..f974b02 100644
16--- a/lib/x509/x509_ext.c
17+++ b/lib/x509/x509_ext.c
18@@ -2287,7 +2287,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
19 int len, ret;
20 uint8_t reasons[2];
21 unsigned i, type, rflags, j;
22- gnutls_datum_t san;
23+ gnutls_datum_t san = {NULL, 0};
24
25 result = asn1_create_element
26 (_gnutls_get_pkix(), "PKIX1.CRLDistributionPoints", &c2);
27@@ -2310,9 +2310,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
28
29 i = 0;
30 do {
31- san.data = NULL;
32- san.size = 0;
33-
34 snprintf(name, sizeof(name), "?%u.reasons", (unsigned)i + 1);
35
36 len = sizeof(reasons);
37@@ -2337,6 +2334,9 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
38
39 j = 0;
40 do {
41+ san.data = NULL;
42+ san.size = 0;
43+
44 ret =
45 _gnutls_parse_general_name2(c2, name, j, &san,
46 &type, 0);
47@@ -2351,6 +2351,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
48 ret = crl_dist_points_set(cdp, type, &san, rflags);
49 if (ret < 0)
50 break;
51+ san.data = NULL; /* it is now in cdp */
52
53 j++;
54 } while (ret >= 0);
55@@ -2360,6 +2361,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
56
57 if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
58 gnutls_assert();
59+ gnutls_free(san.data);
60 goto cleanup;
61 }
62
63--
641.9.1
65
diff --git a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
new file mode 100644
index 0000000000..5e452c52e7
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
@@ -0,0 +1,67 @@
1From ae3370788ed3447bba16969d9eb1bf1b9631e1b7 Mon Sep 17 00:00:00 2001
2From: Valentin Popa <valentin.popa@intel.com>
3Date: Fri, 25 Apr 2014 13:58:55 +0300
4Subject: [PATCH] Correct rpl_gettimeofday signature
5
6Currently we fail on uclibc like below
7
8| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
9| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26,
10| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392,
11| from ../../gl/signal.h:52,
12| from ../../gl/sys/select.h:58,
13| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220,
14| from ../../gl/sys/types.h:28,
15| from ../../lib/includes/gnutls/gnutls.h:46,
16| from ex-cxx.cpp:3:
17| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict'
18| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict'
19| make[4]: *** [ex-cxx.o] Error 1
20| make[4]: *** Waiting for unfinished jobs....
21
22GCC detects that we call 'restrict' as param name in function
23signatures and complains since both params are called 'restrict'
24therefore we use __restrict to denote the C99 keywork
25
26This only happens of uclibc since this code is not excercised with
27eglibc otherwise we will have same issue there too
28
29Signed-off-by: Khem Raj <raj.khem@gmail.com>
30
31Upstream-Status: Pending
32---
33 gl/sys_time.in.h | 8 ++++----
34 1 file changed, 4 insertions(+), 4 deletions(-)
35
36diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
37index 84a17c9..6ceadc3 100644
38--- a/gl/sys_time.in.h
39+++ b/gl/sys_time.in.h
40@@ -93,20 +93,20 @@ struct timeval
41 # define gettimeofday rpl_gettimeofday
42 # endif
43 _GL_FUNCDECL_RPL (gettimeofday, int,
44- (struct timeval *restrict, void *restrict)
45+ (struct timeval *__restrict, void *__restrict)
46 _GL_ARG_NONNULL ((1)));
47 _GL_CXXALIAS_RPL (gettimeofday, int,
48- (struct timeval *restrict, void *restrict));
49+ (struct timeval *__restrict, void *__restrict));
50 # else
51 # if !@HAVE_GETTIMEOFDAY@
52 _GL_FUNCDECL_SYS (gettimeofday, int,
53- (struct timeval *restrict, void *restrict)
54+ (struct timeval *__restrict, void *__restrict)
55 _GL_ARG_NONNULL ((1)));
56 # endif
57 /* Need to cast, because on glibc systems, by default, the second argument is
58 struct timezone *. */
59 _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
60- (struct timeval *restrict, void *restrict));
61+ (struct timeval *__restrict, void *__restrict));
62 # endif
63 _GL_CXXALIASWARN (gettimeofday);
64 #elif defined GNULIB_POSIXCHECK
65--
661.9.1
67
diff --git a/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch
new file mode 100644
index 0000000000..628103ff6b
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch
@@ -0,0 +1,33 @@
1From d6972be33264ecc49a86cd0958209cd7363af1e9 Mon Sep 17 00:00:00 2001
2From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
3Date: Mon, 23 Mar 2015 22:55:29 +0100
4Subject: [PATCH] eliminated double-free in the parsing of dist points
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Reported by Robert Święcki.
10
11Fixes CVE-2015-3308
12Upstream-Status: Backport
13
14Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
15---
16 lib/x509/x509_ext.c | 1 -
17 1 file changed, 1 deletion(-)
18
19diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
20index c8d5867..6f09438 100644
21--- a/lib/x509/x509_ext.c
22+++ b/lib/x509/x509_ext.c
23@@ -2360,7 +2360,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext,
24
25 if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) {
26 gnutls_assert();
27- gnutls_free(san.data);
28 goto cleanup;
29 }
30
31--
321.9.1
33