From 22289a3f58278d13a36249efc18809da92fb4309 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Tue, 18 Nov 2014 20:16:12 -0500 Subject: [PATCH] [client] disable IP resolution in AFL_FUZZING mode --- client/config_init.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/client/config_init.c b/client/config_init.c index e4c0958e..5b62a02d 100644 --- a/client/config_init.c +++ b/client/config_init.c @@ -1824,6 +1824,14 @@ validate_options(fko_cli_options_t *options) log_msg(LOG_VERBOSITY_WARNING, "[-] WARNING: Should use -a or -R to harden SPA against potential MITM attacks"); } + } + + /* Make sure -a overrides IP resolution + */ + if(options->allow_ip_str[0] != 0x0 + && strncasecmp(options->allow_ip_str, "resolve", strlen("resolve")) != 0) + { + options->resolve_ip_http_https = 1; if(! is_valid_ipv4_addr(options->allow_ip_str)) { @@ -1856,6 +1864,12 @@ validate_options(fko_cli_options_t *options) snprintf(options->http_user_agent, HTTP_MAX_USER_AGENT_LEN, "%s%s", "Fwknop/", MY_VERSION); +#if AFL_FUZZING + /* Don't issue IP resolution requests in AFL fuzzing mode + */ + options->resolve_ip_http_https = 0; +#endif + if(options->http_proxy[0] != 0x0 && options->spa_proto != FKO_PROTO_HTTP) { log_msg(LOG_VERBOSITY_ERROR,