2295 Commits

Author SHA1 Message Date
Michael Rash
76d8ce5158 minor change to remove debugging statement 2015-07-17 12:17:48 -07:00
Michael Rash
6e4ad4767f [server] make sure fw _exp_NNN... strings contain only digits after the _exp_ prefix 2015-07-17 12:15:01 -07:00
Michael Rash
b753812cf6 [server] minor addition of function names to fw command error log messages 2015-07-17 11:48:28 -07:00
Michael Rash
a8ef2922e6 Merge branch 'master' of https://github.com/mrash/fwknop 2015-07-17 10:56:28 -07:00
Michael Rash
c25f951b42 Merge pull request #161 from sgh7/master
[server] daemon exits if listened-to interface goes down
2015-07-17 22:37:59 -04:00
Michael Rash
4169c6d477 [server] switch chain_exists() log message to LOG_DEBUG upon error since FWKNOP_INPUT almost never exists at startup 2015-07-17 10:38:34 -07:00
Michael Rash
e7b48af47c [server] Calculate payload length from IP header
Github user Scotte noticed that in his setup a 'VSS-Monitoring ethernet trailer'
was being added to incoming Ethernet frames that contained SPA packets. This
caused base64 decoding to break because the packet data length was calculated
from what libpcap returned for the frame (so these bytes became included in the
SPA payload itself). This issue was reported as #163 on github.

This commit has fwknopd calculate the SPA payload length using the length field
in the IP header so that any trailing bytes in the Ethernet frame are not
included. This solution also applies to the Ethernet Frame Check Sequence issue
(#126).
2015-07-16 23:02:50 -07:00
Michael Rash
042bf2d438 bump version to 2.6.7 (getting close to 2.6.7-pre1) 2015-07-16 11:59:34 -07:00
Michael Rash
71d6f01d11 [server] further no_chk_support for issue #162 2015-07-16 11:49:04 -07:00
Michael Rash
3c8e03d062 [server] add stronger 'no -C' support for firewalld systems (issue #162) 2015-07-16 11:39:14 -07:00
Michael Rash
72f03ae99c [test suite] fix 'FORWARD_ALL SNAT translate IP' test 2015-07-14 21:50:11 -04:00
Michael Rash
43f38551c9 [test suite] add ASAN mode to fko-wrapper 2015-07-14 21:26:44 -04:00
Michael Rash
fd07a95880 add test/tests/address_sanitizer.pl 2015-07-14 21:14:54 -04:00
Michael Rash
f1c3806dca [test suite] added tests for duplicate rule detection (issue #162) 2015-07-14 21:13:46 -04:00
Michael Rash
3de56f8f89 [test suite] add valgrind string to client command line for garbage collection test 2015-07-13 22:41:21 -04:00
Michael Rash
588cba6063 [test suite] validate iptables rule garbage collection (added in ef9498f7) 2015-07-13 21:59:58 -04:00
Michael Rash
ef9498f783 [server] Implement garbage cleanup mode for rule deletion
This is a significant commit that allows fwknopd to delete expired rules
from the firewall policy regardless of whether fwknopd is tracking them.
That is, a third party program could insert rules into the fwknopd
chains (iptables for now, but this will be extended to the other
firewalls) in order to take advantage of fwknopd rule deletion.
2015-07-13 21:29:16 -04:00
Michael Rash
41b137611f [test suite] validate multiple rules removed in a single check_firewall_rules() pass - validates f4f2ada1 2015-07-12 22:50:06 -04:00
Michael Rash
bb90a0cb2e [server] minor comment addition 2015-07-12 20:57:09 -04:00
Michael Rash
f4f2ada1c0 [server] bug fix to not zero the wrong buffer for iptables rule deletion
This commit fixes a bug where zero_cmd_buffers() was being called against the
wrong buffer as SPA rules were supposed to be deleted. Although multiple
iterations of check_firewall_rules() would have compensated, some rules would
not have been deleted as quickly as they should have in multi-rule scenarios.
2015-07-12 20:36:06 -04:00
Michael Rash
416023723f minor #define addition 2015-07-11 21:28:56 -04:00
Michael Rash
cd18570f71 [server] default to not returning partial line when collecting the output of an external command 2015-07-10 22:45:44 -04:00
Michael Rash
5460509f88 [server] add NAT rule existence detection for --no-ipt-check support (issue #162) 2015-07-07 08:28:16 -04:00
Michael Rash
4874dc9c83 [test suite] add --gpg-exe invalid path test 2015-07-05 22:55:23 -04:00
Michael Rash
012d1cf888 [server] interim commit towards a fix for --no-ipt-check rule detection
This is a significant commit for issue #162 where fwknopd is not properly
detecting rules (particularly NAT rules) on systems running older versions
of iptables where -C support is not offered. A new capability of searching
the output of an external command and getting the first matching line was
added with the search_extcmd_getline() function.
2015-07-05 20:47:06 -04:00
Michael Rash
5a58390ab4 [test suite] add dupe rule server output check 2015-07-04 17:12:49 -04:00
Michael Rash
86bcf243e6 [test suite] bug fix for iptables vs. firewalld 2015-07-04 17:03:08 -04:00
Michael Rash
4c7679fabd [server] start on sudo usage for command exec (issue #159) 2015-07-02 23:44:16 -04:00
Steve Harvey
a212353765 [server] daemon exits if listened-to interface goes down
This commit fixes fwknopd becoming non-responsive should the interface
temporarily cycles through a down state.  Verified on CentOS 7.
2015-07-02 19:33:03 -04:00
Michael Rash
ff9adc5f51 add OS X ramdisk wrapper script 2015-07-01 07:43:24 -04:00
Michael Rash
788bf543c8 [extras] added ramdisk-create-osx.sh for Mac OS X systems 2015-06-30 21:24:00 -04:00
Michael Rash
814d9e1050 [test suite] minor comment update 2015-06-30 17:47:01 -07:00
Michael Rash
464a680f13 [server] minor --udp-server option handling update for completeness 2015-06-30 17:44:07 -07:00
Michael Rash
ca2a73e333 add --with-firewalld autoconf argument as a synonym for --with-firewall-cmd 2015-06-30 12:59:04 -07:00
Michael Rash
ca54ec7a9b [test suite] integrate afl-cov with afl-fuzz wrapper scripts
Here is an example for the client-rc.sh wrapper script to have it also
generate code coverage results for afl-fuzz (afl-cov is enabled via two
environmental variables AFL_COV and CODE_DIR).

$ cd /tmp/afl-ramdisk/fwknop.git/test/afl/
$ AFL_COV=1 CODE_DIR=/home/mbr/git/fwknop.git ./fuzzing-wrappers/client-rc.sh
2015-06-29 19:06:50 -07:00
Michael Rash
5ba88e7b83 [test suite] support afl-fuzz on Mac OS X which uses afl-clang 2015-06-26 08:39:48 -07:00
Michael Rash
2b5c38dc2b [test suite] default to not zeroing profile coverage counters
The typical work flow when generating gcov coverage results is:

- compile fwknop with coverage support
- run the test suite
- hack on fwknop
- re-run the test suite to see what coverage has been added

This work flow is much more common than collecting coverage results
for a complete test suite run. Therefore, this commit switches the
default behavior in --enable-complete mode (which enables coverage
support) to not zero-out coverage counters. A new argument
--enable-profile-coverage-init zeros the counters in preparation
for a global coverage run.
2015-06-23 16:56:25 -07:00
Michael Rash
bc6118e19f [test suite] added missing test/asan/Makefile 2015-06-18 06:16:10 -07:00
Michael Rash
5c4f7dac9b [test suite] add fwknoprc2 file to AFL client rc test cases 2015-06-16 19:16:36 -07:00
Michael Rash
df51dacf17 add test/asan/ files 2015-06-16 19:06:36 -07:00
Michael Rash
e2520754bf update CREDITS file to include Fwknop2 2015-06-16 18:35:05 -07:00
Michael Rash
4d3c472116 [test suite] add Rijndael+HMAC test for F-Droid Fwknop2 client written by Jonathan Bennett 2015-06-16 18:32:19 -07:00
Michael Rash
e0778a2d37 [test suite] disable fault injection 'tag' tests with the fko wrapper does not compile against libfiu 2015-06-15 13:53:13 -07:00
Michael Rash
7da6b9e787 [test suite] produce include/exclude stats 2015-06-15 13:48:39 -07:00
Michael Rash
7e6ec092f6 [test suite] consolidate crash detection into a single function 2015-06-15 13:12:59 -07:00
Michael Rash
e20c09d572 [test suite] add ASAN verification if fwknop is compiled with ASAN support 2015-06-14 19:15:34 -07:00
Michael Rash
e8cc2845fa [test suite] minor formatting update 2015-06-14 05:59:30 -07:00
Michael Rash
70fd1c990f include link to DefCon 14 presentation on fwknop + Tor 2015-06-14 08:41:06 -04:00
Michael Rash
9ce5ad47c0 [test suite] disable python tests if Python.h is missing 2015-06-13 06:31:11 -07:00
Michael Rash
c8cdc91974 [test suite] added test for Rijndael-only SPA packet from the Android Fwknop2-v1.0-RC.2 binary 2015-06-12 17:46:22 -07:00