From cd56bfdddb1bdaafb1418e59163061b914e0fc9d Mon Sep 17 00:00:00 2001 From: reyk Date: Wed, 20 Jul 2016 12:31:00 +0000 Subject: [PATCH] When parsing the configuration. initialize the auth structure correctly, as parse.y's $$ is not zero-initialized. Found by Rene Ammerlaan OK markus@ florian@ --- sbin/iked/parse.y | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index db438642f0d..5f93f075d2c 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.55 2016/06/21 21:35:24 benno Exp $ */ +/* $OpenBSD: parse.y,v 1.56 2016/07/20 12:31:00 reyk Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -811,15 +811,19 @@ ipcomp : /* empty */ { $$ = 0; } ikeauth : /* empty */ { $$.auth_method = IKEV2_AUTH_RSA_SIG; + $$.auth_eap = 0; $$.auth_length = 0; } | RSA { $$.auth_method = IKEV2_AUTH_RSA_SIG; + $$.auth_eap = 0; $$.auth_length = 0; } | PSK keyspec { memcpy(&$$, &$2, sizeof($$)); $$.auth_method = IKEV2_AUTH_SHARED_KEY_MIC; + $$.auth_eap = 0; + $$.auth_length = 0; } | EAP STRING { unsigned int i; -- 2.20.1