summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch')
-rw-r--r--meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch b/meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch
new file mode 100644
index 0000000000..823869e85e
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/CVE-2019-3829_p1.patch
@@ -0,0 +1,39 @@
1From 367688c05988bc7257d7e1801c5acf17ef7e854d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
3Date: Tue, 12 Feb 2019 15:09:11 +0100
4Subject: [PATCH 1/3] Automatically NULLify after gnutls_free()
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This method prevents direct use-after-free and
10double-free issues.
11
12Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
13
14CVE: CVE-2019-3829
15Upstream-Status: Backport
16[https://gitlab.com/gnutls/gnutls/commit/d39778e43d1674cb3ab3685157fd299816d535c0]
17
18Signed-off-by: Dan Tran <dantran@microsoft.com>
19---
20 lib/includes/gnutls/gnutls.h.in | 4 ++++
21 1 file changed, 4 insertions(+)
22
23diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
24index 49990b5f5..fa77fd0df 100644
25--- a/lib/includes/gnutls/gnutls.h.in
26+++ b/lib/includes/gnutls/gnutls.h.in
27@@ -2132,6 +2132,10 @@ extern _SYM_EXPORT gnutls_realloc_function gnutls_realloc;
28 extern _SYM_EXPORT gnutls_calloc_function gnutls_calloc;
29 extern _SYM_EXPORT gnutls_free_function gnutls_free;
30
31+#ifdef GNUTLS_INTERNAL_BUILD
32+#define gnutls_free(a) gnutls_free((void *) (a)), a=NULL
33+#endif
34+
35 extern _SYM_EXPORT char *(*gnutls_strdup) (const char *);
36
37 /* a variant of memset that doesn't get optimized out */
38--
392.22.0.vfs.1.1.57.gbaf16c8