summaryrefslogtreecommitdiffstats
path: root/net/ipsec-tools/patches/008-racoon-fix_dereference_crash.patch
blob: 5e3a2d4dda0701f28b7d3bcdba6a9bd7abf2e5b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Fix null dereference in racoon/gssapi.c (CVE-2015-4047)

--- a/src/racoon/gssapi.c
+++ b/src/racoon/gssapi.c
@@ -192,6 +192,11 @@ gssapi_init(struct ph1handle *iph1)
 	gss_name_t princ, canon_princ;
 	OM_uint32 maj_stat, min_stat;
 
+	if (iph1->rmconf == NULL) {
+		plog(LLV_ERROR, LOCATION, NULL, "no remote config\n");
+		return -1;
+	}
+
 	gps = racoon_calloc(1, sizeof (struct gssapi_ph1_state));
 	if (gps == NULL) {
 		plog(LLV_ERROR, LOCATION, NULL, "racoon_calloc failed\n");