328 Commits

Author SHA1 Message Date
Michael Rash
cb61fd886d [server] minor header formating update 2013-07-06 14:53:04 -04:00
Michael Rash
4ff518d54a [server] zero out access stanza key information before exit (in support of #93) 2013-07-06 14:52:46 -04:00
Franck Joncourt
9d7feb52f6 Merge remote-tracking branch 'upstream/master' 2013-06-30 22:22:34 +02:00
Franck Joncourt
c2e1a00154 s/GNU Public/GNU General Public/g 2013-06-30 22:21:22 +02:00
Michael Rash
a792e8bf4e minor man page documentation updates (added twitter reference) 2013-06-30 15:55:01 -04:00
Michael Rash
5a4a8a5baa [server] convert several LOG_INFO messages to LOG_DEBUG 2013-06-27 22:15:39 -04:00
Franck Joncourt
5a0700eb46 * Mentionned the VERBOSE variable in fwknopd.conf.
* Made sure the -v command line switch overrides the value of the
  VERBOSE variable set in an fwknopd.conf file.
2013-06-27 21:39:38 -04:00
Franck Joncourt
10fdbb509c s/VERBOSITY/VERBOSE/g on the server side for consistency purposes. 2013-06-27 21:39:38 -04:00
Franck Joncourt
7fde3949da Fixed use of --verbose command line switch.
Set default log verbosity to LOG_INFO in the log_msg driver.
2013-06-27 21:39:38 -04:00
Franck Joncourt
5db1eeb268 Interim commit to add a VERBOSE variable to fwknopd. 2013-06-27 21:39:38 -04:00
Michael Rash
37b624ac8b bump version to 2.5, minor fwknopd -S exit status update
This commit bumps the fwknop version to 2.5 and sets the libfko version to 2.0 to
signal incompatibility with older libfko versions.  Backwards compatibility is
maintained in SPA packet construction, but function prototypes in libfko-2.0 are
no longer compatible with older versions.

This commit also returns non-zero exit status under 'fwknopd --status' if there
is no existing fwknopd process.  This is better than always exiting with a zero
status regardless of whether fwknopd is already running or not, and adds a level
of scriptability to --status usage.  This change was suggested by George Herlin.
2013-06-27 21:21:10 -04:00
Franck Joncourt
47a7ffe22b Merge remote-tracking branch 'upstream/master' 2013-06-25 23:03:28 +02:00
Franck Joncourt
5413d1c48c * Mentionned the VERBOSE variable in fwknopd.conf.
* Made sure the -v command line switch overrides the value of the
  VERBOSE variable set in an fwknopd.conf file.
2013-06-25 22:04:54 +02:00
Franck Joncourt
4525a7e57c s/VERBOSITY/VERBOSE/g on the server side for consistency purposes. 2013-06-25 21:56:53 +02:00
Franck Joncourt
07f96f86f8 Fixed use of --verbose command line switch.
Set default log verbosity to LOG_INFO in the log_msg driver.
2013-06-24 23:15:50 +02:00
Michael Rash
d125146c37 [server] minor --help update to include cipherdyne.org URL 2013-06-21 21:11:23 -04:00
Michael Rash
371036bad0 [client] re-use encryption/HMAC keys in --test mode
The client --test mode decrypts SPA packet data as a final step, but get_keys()
was being called to re-acquire the encryption/HMAC keys.  This commit reuses
the same keys that were supplied for SPA packet encryption/authentication
because the most important code to test is not get_keys() but rather libfko
encryption/decryption/authentication operations.
2013-06-21 21:08:41 -04:00
Franck Joncourt
afd6f6b23c Interim commit to add a VERBOSE variable to fwknopd. 2013-06-20 23:33:04 +02:00
Michael Rash
68acbaadc4 remove newline chars from log_msg() calls 2013-06-19 23:42:58 -04:00
Franck Joncourt
5667d8e151 Fixed default verbosity to LOG_NOTICE rather than LOG_WARNING. 2013-06-18 22:12:41 +02:00
Franck Joncourt
2cc1ac65bc Replaced some uses of *fprintf(stderr* by *log_msg(LOG_ERR* in config_init.c 2013-06-17 12:31:07 +02:00
Franck Joncourt
57cf6dc472 s/fprintf(stderr/log_msg(LOG_ERR/ 2013-06-16 22:16:41 +02:00
Franck Joncourt
84f8704949 Fix static_log_flag in the log_module. 2013-06-16 21:24:37 +02:00
Franck Joncourt
935565cd90 Fix log_msg().
* Added new constant LOG_WITHOUT_SYSLOG to be able to print messages to
    stderr only.
  * Renamed LOG_STDERR_MASK as LOG_VERBOSITY_MASK for a better understanding.
2013-06-16 21:16:25 +02:00
Franck Joncourt
b48295c69b Interim commit to make the log_msg strategy.
* log_msg : New log_set_verbosity(): It sets the default verbosity for the
    log module according to the verbose option set by the user through the command
    line.
  * Remove useless checks of the verbose option when log_msg() is invoked.
2013-06-16 19:12:06 +02:00
Michael Rash
8155cf3331 [server] ensure 'Rule added' log messages are generated when create_rule() is called 2013-06-13 21:23:59 -04:00
Michael Rash
c23d2d644f minor typo and format fixes 2013-06-13 21:22:58 -04:00
Michael Rash
1341601a66 [server] when log_msg() is called fflush() output to stderr (when stderr is used) 2013-06-13 21:21:40 -04:00
Michael Rash
7a1bdea514 [server] fix 'Use of untrusted string value' bug found by Coverity
This commit changes iptables policy parsing to re-use rule_exists() for fwknop
jump rule detection instead of using sscanf() against iptables policy list
output.  Also, fwknop jump rules are now deleted from iptables policies in a
loop to ensure all are removed even if there are duplicates (even though this
should not happen under normal circumstances anyway).
2013-06-09 14:28:17 -04:00
Michael Rash
f491c41697 [server] minor addition of IPT_CHK_RULE_ARGS macro for iptables -C usage 2013-06-06 21:29:08 -04:00
Michael Rash
866e0a95d5 [server] minor bug fix to switch iptables comment match check to built-in INPUT chain 2013-06-05 21:46:51 -04:00
Michael Rash
17974a1c05 [server] comment additions regarding Coverity low priority TOCTOU issues 2013-06-04 22:17:59 -04:00
Michael Rash
382099e85a Updated copyright dates, removed NEWS file in favor of the ChangeLog 2013-06-02 14:07:01 -04:00
Michael Rash
af88af3e51 Merge branch 'hmac_timing_bug_fix'
Fixes #85
2013-06-01 22:23:35 -04:00
Michael Rash
b95292ef90 added fwknopd man page blurb for the ENABLE_PCAP_ANY_DIRECTION variable 2013-06-01 22:10:32 -04:00
Michael Rash
54872acfc3 Convert strncmp() calls to constant_runtime_cmp() at various places
This commit is a follow up to Ryman's report (#85) of a potential timing attack
that could be leveraged against fwknop when strncmp() is used to compare HMAC
digests.  All strncmp() calls that do similar things have been replaced with a
new constant_runtime_cmp() function that mitigates this problem.
2013-06-01 21:55:45 -04:00
Michael Rash
0f0f73636f [server] minor update to rename PCAP_ANY_DIRECTION -> ENABLE_PCAP_ANY_DIRECTION 2013-05-31 23:19:48 -04:00
Michael Rash
9cbb80d434 update man page in client/server directories to the latest 2013-05-31 21:36:49 -04:00
Michael Rash
9a21bc11ba [server] update access.conf comments to conform to no trailing semicolon or colon within the variable name 2013-05-22 21:21:59 -04:00
Michael Rash
cfbbac2654 man page updates - access.conf section now includes variable guidance 2013-05-21 22:10:13 -04:00
Michael Rash
52462e7dba Use {0} initializer for all stack allocated char arrays
Lots of places in the code were already using {0} to initialize stack char
arrays, but memset() was being used as well.  This commit removes all
unnecessary memset() calls against char arrays that are already initialized
via {0} (which sets all members to zero for such arrays).
2013-05-21 22:00:15 -04:00
Michael Rash
16f96a3e53 [server] port list memory leak bug fix for OpenBSD/pf and FreeBSD/ipfw firewall interface code found by Coverity 2013-05-19 14:36:32 -04:00
Michael Rash
e31459bb1e updated client and server man page material 2013-05-19 14:12:58 -04:00
Michael Rash
23a354fced [client+server] ensure HMAC key and encryption passphrase are not the same 2013-05-18 12:10:18 -04:00
Michael Rash
7cb23c75cc [server] added check to ensure any existing fwknop jump rule is not duplicated at init 2013-05-17 22:34:26 -04:00
Michael Rash
cabcaf2174 [server] apply same logging policy for --fw-* modes as --foreground mode 2013-05-17 22:28:03 -04:00
Franck Joncourt
95615c90e2 Merge remote-tracking branch 'upstream/master' 2013-05-14 22:15:19 +02:00
Franck Joncourt
bb90a8bf75 Fixed gcc warnings on openbsd. - mrash/fwknop#60 2013-05-14 22:08:44 +02:00
Michael Rash
fb80575209 [server] minor memory leak bug fix during SPA digest calculation found by Coverity 2013-05-13 20:52:14 -04:00
Michael Rash
6a2bc3db27 [server] minor memory leak bug fix during access.conf parsing found by Coverity 2013-05-13 20:48:23 -04:00