71 Commits

Author SHA1 Message Date
Damien Stuart
f544a4aeb5 Added the --icmp-xxxx arg descriptions to the fwknop usage message. 2012-11-19 09:48:34 -05:00
Michael Rash
517f447028 bumped version to 2.0.4 2012-11-14 23:45:43 -05:00
Michael Rash
bc58b3a15f Added chain_exists() check to fwknopd SPA rule creation
Added chain_exists() check to SPA rule creation so that if any
of the fwknop chains are deleted out from under fwknopd they will be
recreated on the fly.  This mitigates scenarios where fwknopd might be
started before a system level firewall policy is applied due to init
script ordering, or if an iptables policy is re-applied without
restarting fwknopd.
2012-11-12 21:48:26 -05:00
Michael Rash
03b222ddda [client] (Franck Joncourt) Fixed Ctrl-C problem where SPA packets were sent anyway
[client] (Franck Joncourt) Contributed a patch to allow the fwknop
client to be stopped during the password entry prompt with Ctrl-C before
any SPA packet is sent on the wire.
2012-11-08 22:22:04 -05:00
Michael Rash
9f9910c317 added blurb about Android-4.1.2 2012-11-08 22:09:23 -05:00
Michael Rash
66ad134708 [server] Added '--pcap-file <file>' option
Added a new '--pcap-file <file>' option to allow pcap files to
be processed directly by fwknopd instead of sniffing an interface.  This
feature is mostly intended for debugging purposes.
2012-11-08 21:33:23 -05:00
Michael Rash
575e696164 [test suite] added pinentry check for gpg tests that have keys that require associated passphrases 2012-11-05 20:38:34 -05:00
Michael Rash
7db2d1e796 [client+server] Added --disable-gpg to the autoconf config
Added --disable-gpg to the autoconf ./configure script
via configure.ac.  This makes it easy to not have fwknop/fwknopd
link against libgpgme even if it is installed on the local system.
2012-10-31 21:37:55 -04:00
Michael Rash
e103bdf4b0 Updated build CFLAGS and LDFLAGS for PIE support similar to Debian hardening-includes
The Debian hardening-includes package sets CFLAGS and LDFLAGS as follows for PIE support:

_HARDENED_PIE_CFLAGS  := -fPIE
_HARDENED_PIE_LDFLAGS := -fPIE -pie

The configure.ac file has been updated to conform to the above.
2012-10-30 21:40:21 -04:00
Michael Rash
ac38f8d993 [libfko] bug fix to check b64_decode() return value
Bug fix to check b64_decode() return value to ensure that
non-base64 encoded data is never used.  Even though other validation
routines checked decoded results, it is important to discard invalid
data as early as possible.  Note too that such invalid data would only
be provided to b64_decode() after proper decryption, so the client must
provide authentic SPA data.
2012-10-26 15:36:08 -04:00
Michael Rash
627035fb22 Patch from Franck Joncourt for setting permissions via open()
[client+server] Applied patch from Franck Joncourt to remove unnecessary
chmod() call when creating client rc file and server replay cache file.
The permissions are now set appropriately via open(), and at the same
time this patch fixes a potential race condition since the previous code
used fopen() followed by chmod().
2012-10-23 21:47:56 -04:00
Michael Rash
95001b7da8 minor ChangeLog updates 2012-10-19 22:11:27 -04:00
Michael Rash
e0d86f9a33 [libfko] validation of NAT access strings
Added validation of NAT access strings in the various NAT modes in libfko.
This applies to both the client and server, and test suite support was added
as well.
2012-10-15 20:52:23 -04:00
Michael Rash
e4751d1c20 added icmp type/code blurb 2012-10-11 23:40:04 -04:00
Michael Rash
67f5d1f1e9 Applied perl FKO module libfko path patch from Franck Joncourt
Applied patch from Franck Joncourt to have the perl FKO module link
against libfko in the local directory (if it exists) so that it doesn't
have to have libfko completely installed in /usr/lib/.  This allows the
test suite to run FKO tests without installing libfko.

Added the ability to the test suite to compile, install, and run some
basic tests against the perl FKO module.
2012-10-11 23:36:50 -04:00
Michael Rash
229a36625b Better IP spoofing support (udpraw and icmp)
- [client] Added '-P udpraw' to allow the client to send SPA packets over
  UDP with a spoofed source IP address.  This is in addition to the
  original 'tcpraw' and 'icmp' protocols that also support a spoofed
  source IP.
- [server] Bug fix to accept SPA packets over ICMP if the fwknop client
  is executed with '-P icmp' and the user has the required privileges.
2012-10-03 22:56:10 -04:00
Michael Rash
1828f51b90 [server] GPG_ALLOW_NO_PW + no KEY bug fix
Bug fix to allow GPG_ALLOW_NO_PW to result in not also having to specify a
Rijndael key.
2012-10-02 23:20:47 -04:00
Michael Rash
e37409c250 Added blurb about the new upstart config 2012-09-27 22:01:54 -04:00
Michael Rash
2b09f048f7 (Vlad Glagolev) Submitted an OpenBSD port for fwknop-2.0.3
(Vlad Glagolev) Submitted an OpenBSD port for fwknop-2.0.3, and this has
been checked in under extras/openbsd/.
2012-09-13 21:24:54 -04:00
Michael Rash
f8374c8aef [server] (Vlad Glagolev) Submitted a patch to fix command exec mode
(Vlad Glagolev) Submitted a patch to fix command exec mode
under SPA message type validity test.  Support for command exec mode was
also added to the test suite.
2012-09-11 21:54:26 -04:00
Michael Rash
591416e23b [server] bug fix in --disable-file-cache mode
Applied patch from Vlad Glagolev to fix ndbm/gdbm usage when --disable-file-cache
is used for the autoconf configure script.  This functionality was broken in
be4193d734850fe60f14a26b547525ea0b9ce1e9 through improper handling of #define
macros from --disable-file-cache.
2012-09-10 21:47:48 -04:00
Michael Rash
c560dc503a minor spelling typo fixes 2012-09-04 21:47:30 -04:00
Michael Rash
40ac28df21 bump version to 2.0.3 2012-09-03 22:23:48 -04:00
Michael Rash
e2c0ac4821 [server] Strong access.conf validation
Fernando Arnaboldi from IOActive found several conditions in
which the server did not properly throw out maliciously constructed
variables in the access.conf file.  This has been fixed along with new
fuzzing tests in the test suite.
2012-09-03 00:21:46 -04:00
Michael Rash
a60f05ad44 file permissions and client buffer overflow fix
- [client+server] Fernando Arnaboldi from IOActive found that strict
filesystem permissions for various fwknop files are not verified.  Added
warnings whenever permissions are not strict enough, and ensured that
files created by the fwknop client and server are only set to user
read/write.
- [client] Fernando Arnaboldi from IOActive found a local buffer overflow
in --last processing with a maliciously constructed ~/.fwknop.run file.
This has been fixed with proper validation of .fwknop.run arguments.
2012-08-29 22:21:43 -04:00
Michael Rash
89dfa2c1fb minor ChangeLog update for the RPM build change 2012-08-27 21:20:02 -04:00
Michael Rash
f4c16bc47f [server] Stronger IP validation based on a bug found by Fernando Arnaboldi from IOActive
This commit fixes a condition in which the server did not properly validate
allow IP addresses from malicious authenticated clients.  This has been fixed
with stronger allow IP validation.
2012-08-25 23:08:55 -04:00
Michael Rash
d46ba1c027 (Fernando Arnaboldi, IOActive) Found and fixed several DoS/code execution vulns for authenticated clients
- [server] Fernando Arnaboldi from IOActive found several DoS/code
execution vulnerabilities for malicious fwknop clients that manage to
get past the authentication stage (so a such a client must be in
possession of a valid access.conf encryption key).  These vulnerbilities
manifested themselves in the handling of malformed access requests, and
both the fwknopd server code along with libfko now perform stronger input
validation of access request data.  These vulnerabilities affect
pre-2.0.3 fwknop releases.
- [test suite] Added a new fuzzing capability to ensure proper server-side
input validation.  Fuzzing data is constructed with modified fwknop
client code that is designed to emulate malicious behavior.
2012-08-24 22:12:19 -04:00
Michael Rash
f7e84da340 fwknop-2.0.2 release 2012-08-18 15:03:04 -04:00
Michael Rash
3af8e4c517 [client] Added cipherdyne.com backup check in -R mode.
Added backup check against a cipherdyne.com 'myip' cgi instance in -R mode if
the normal check against cipherdyne.org fails.
2012-08-15 22:49:29 -04:00
Michael Rash
863838d0ba [server] Preserve any existing config files in /etc/fwknop/
Updated the 'make install' step to not overwrite any existing config files in
/etc/fwknop/ and instead install new copies from the source tree at
/etc/fwknop/fwknopd.conf.inst and /etc/fwknop/access.conf.inst
2012-08-13 22:39:03 -04:00
Michael Rash
8fafd4b80b [server] 'make install' permissions fix
Set restrictive permissions on /etc/fwknop/ directory and /etc/fwknop/* files.
Current default permissions on /etc/fwknop/ and /etc/fwknop/* are too lax.
2012-08-12 19:57:11 -04:00
Michael Rash
543de16613 [server] iptables 'comment' match check
Implemented a new check to ensure that the iptables 'comment' match exists to
ensure the proper environment for fwknopd operations.  This check is controlled
by the new ENABLE_IPT_COMMENT_CHECK variable, and was suggested by Hank
Leininger.
2012-08-12 15:44:13 -04:00
Michael Rash
27ccfe35d3 [server] Added GPG_ALLOW_NO_PW variable and associated test suite support
For GPG mode, added a new access.conf variable "GPG_ALLOW_NO_PW" to make it
possible to leverage a server-side GPG key pair that has no associated
password.  This comes in handy when a system requires the user to leverage
gpg-agent / pinentry which can present a problem in automated environments as
required by the fwknopd server.  Now, it might seem like a problem to remove
the passphrase from a GPG key pair, but it's important to note that simply
doing this is little worse than storing the passphrase in the clear on disk
anyway in the access.conf file.  Further, this link help provides additional
detail:

http://www.gnupg.org/faq/GnuPG-FAQ.html#how-can-i-use-gnupg-in-an-automated-environment
2012-08-10 22:20:30 -04:00
Michael Rash
79a947603a added changes for the 2.0.2 release (so far) 2012-08-03 22:08:14 -04:00
Michael Rash
cab2ea9083 bumped version to 2.0.1 2012-07-23 22:40:47 -04:00
Michael Rash
3c533de7e4 updated Debian init script (contributed by Franck Joncourt) 2012-07-23 21:49:25 -04:00
Michael Rash
5387242ce9 PCAP_LOOP_SLEEP bug fix to 1/10th of a second
[server] Updated PCAP_LOOP_SLEEP default to 1/10th of a second (in
microseconds).  This was supposed to be the default anyway, but C
Anthony Risinger reported a bug where fwknopd was consuming more
resources than necessary, and the cause was PCAP_LOOP_SLEEP set by
default to 1/100th of a second - this has been fixed.
2012-07-23 21:13:30 -04:00
Michael Rash
049545b459 [client] Fixed several minor memory leaks caught by valgrind
This commit fixes memory leaks like the following in the fwknop client:

HEAP SUMMARY:
    in use at exit: 300 bytes in 11 blocks
  total heap usage: 100 allocs, 89 frees, 16,583 bytes allocated

16 bytes in 1 blocks are indirectly lost in loss record 1 of 11
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x5146C59: __nss_lookup_function (nsswitch.c:456)
   by 0x5C3D63E: ???
   by 0x50FF3FC: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:256)
   by 0x508938E: cuserid (cuserid.c:37)
   by 0x4E3983A: fko_set_username (fko_user.c:65)
   by 0x4E38D5C: fko_new (fko_funcs.c:84)
   by 0x10A824: main (fwknop.c:75)

16 bytes in 1 blocks are indirectly lost in loss record 2 of 11
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x5146C59: __nss_lookup_function (nsswitch.c:456)
   by 0x5C3D658: ???
   by 0x50FF3FC: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:256)
   by 0x508938E: cuserid (cuserid.c:37)
   by 0x4E3983A: fko_set_username (fko_user.c:65)
   by 0x4E38D5C: fko_new (fko_funcs.c:84)
   by 0x10A824: main (fwknop.c:75)

16 bytes in 1 blocks are indirectly lost in loss record 3 of 11
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x5146C59: __nss_lookup_function (nsswitch.c:456)
   by 0x5C3D672: ???
   by 0x50FF3FC: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:256)
   by 0x508938E: cuserid (cuserid.c:37)
   by 0x4E3983A: fko_set_username (fko_user.c:65)
   by 0x4E38D5C: fko_new (fko_funcs.c:84)
   by 0x10A824: main (fwknop.c:75)

16 bytes in 1 blocks are indirectly lost in loss record 4 of 11
   at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x5146C59: __nss_lookup_function (nsswitch.c:456)
   by 0x5C3D68C: ???
   by 0x50FF3FC: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:256)
   by 0x508938E: cuserid (cuserid.c:37)
   by 0x4E3983A: fko_set_username (fko_user.c:65)
   by 0x4E38D5C: fko_new (fko_funcs.c:84)
   by 0x10A824: main (fwknop.c:75)
2012-07-22 23:09:32 -04:00
Michael Rash
5ef07c73e2 Better SPA message validation upon SPA decrypt/decode.
Added SPA message validation calls to fko decoding routines to help
ensure that SPA messages conform to expected values.
2012-07-21 15:32:15 -04:00
Michael Rash
6c73e160d9 Ensure that INPUT rules are added in --nat-local mode
This change ensures that INPUT rules are added when the fwknop client is used to
request access to a local service with --nat-local mode.
2012-07-17 21:50:29 -04:00
Michael Rash
3b26157a40 added libfko.dylib test suite fix note to the ChangeLog 2012-07-12 22:18:39 -04:00
Michael Rash
2f9368b4d9 added valgrind parsing note 2012-07-09 22:39:13 -04:00
Michael Rash
e2c34d46fe switched back to older ChangeLog format which is more readable 2012-07-09 21:29:49 -04:00
Michael Rash
dd188dc392 added --stat output to ChangeLog 2012-01-02 18:35:41 -05:00
Michael Rash
a36082b543 moved ChangeLog-v2.0 to ChangeLog 2012-01-02 18:33:42 -05:00
Michael Rash
36f21f95ce removed old ChangeLog files 2012-01-02 18:32:35 -05:00
Michael Rash
4ed4558192 Updated ChangeLog with all changes from 2.0.0-rc3
Updated ChangeLog with all changes from 2.0.0-rc3
2011-08-21 14:00:16 -04:00
Michael Rash
1e494aba2e Added ChangeLog derived from git commit messages.
There will be branch and release specific ChangeLog files as well.
2011-08-18 21:13:58 -04:00
Michael Rash
409c08ac5c Renamed ChangeLog -> ChangeLog.old for new ChangeLog handling
The ChangeLog will be derived from commit messages.
2011-08-18 21:10:09 -04:00