134 Commits

Author SHA1 Message Date
Michael Rash
03000dde5d bumped version to 2.6.3 in preparation for release 2014-07-28 15:55:38 -04:00
Michael Rash
59718f1a36 [client] Updated IP resolution mode -R to use SSL
External IP resolution via '-R' (or '--resolve-ip-http') is now done via SSL by
default. The IP resolution URL is now 'https://www.cipherdyne.org/cgi-gin/myip',
and a warning is generated in '-R' mode whenever a non-HTTPS URL is specified
(it is safer just to use the default). The fwknop client leverages 'wget' for
this operation since that is cleaner than having fwknop link against an SSL
library.
2014-07-25 17:42:06 -04:00
Michael Rash
7d5b75886c added lcov coverage link 2014-07-19 17:26:15 -04:00
Michael Rash
b2117e6fe7 ChangeLog updates 2014-07-19 17:18:59 -04:00
Michael Rash
74428adae6 [server] Bug fix for PF firewalls without ALTQ support on FreeBSD.
With this commit PF rules are added correctly regardless of whether ALTQ support
is available or not. Thanks to Barry Allard for discovering and reporting this
issue. Closes issue #121 on github.
2014-07-18 20:54:11 -04:00
Michael Rash
9f2e01eb01 [server] Fix uninitialized value usage after proper SPA authentication/decryption
Bug fix discovered with the libfiu fault injection tag
"fko_get_username_init" combined with valgrind analysis. This bug
is only triggered after a valid authenticated and decrypted SPA
packet is sniffed by fwknopd:

==11181== Conditional jump or move depends on uninitialised value(s)
==11181==    at 0x113B6D: incoming_spa (incoming_spa.c:707)
==11181==    by 0x11559F: process_packet (process_packet.c:211)
==11181==    by 0x5270857: ??? (in /usr/lib/x86_64-linux-gnu/libpcap.so.1.4.0)
==11181==    by 0x114BCC: pcap_capture (pcap_capture.c:270)
==11181==    by 0x10F32C: main (fwknopd.c:195)
==11181==  Uninitialised value was created by a stack allocation
==11181==    at 0x113476: incoming_spa (incoming_spa.c:294)
2014-07-07 21:27:53 -05:00
Michael Rash
43b770320a [server] Require sig ID's or fingerprints when sigs are validated
When validating access.conf stanzas make sure that one of
GPG_REMOTE_ID or GPG_FINGERPRINT_ID is specified whenever GnuPG
signatures are to be verified for incoming SPA packets. Signature
verification is the default, and can only be disabled with
GPG_DISABLE_SIG but this is NOT recommended.
2014-06-30 11:52:42 -04:00
Michael Rash
77384a904e [server] add access.conf variable GPG_FINGERPRINT_ID
Add a new GPG_FINGERPRINT_ID variable to the access.conf file
so that full GnuPG fingerprints can be required for incoming SPA packets
in addition to the appreviated GnuPG signatures listed in GPG_REMOTE_ID.
From the test suite, an example fingerprint is

GPG_FINGERPRINT_ID            00CC95F05BC146B6AC4038C9E36F443C6A3FAD56
2014-06-30 11:11:09 -04:00
Michael Rash
0c544f2690 [server] add --test mode to enable broader fuzzing coverage 2014-05-08 07:35:42 -04:00
Michael Rash
fb21e3a575 [server] bug fix to handle SPA packets via http 2014-04-29 23:25:31 -04:00
Michael Rash
d996c45141 minor 2.6.2 release date change 2014-04-28 20:26:05 -04:00
Michael Rash
0c70c7db21 ChangeLog for 2.6.2 2014-04-26 23:42:17 -04:00
Michael Rash
55965dd1a4 minor typo fix 2014-04-12 15:20:31 -04:00
Michael Rash
2cafdad968 bump version to 2.6.1 2014-04-11 22:41:00 -04:00
Michael Rash
ac6ffe2ec7 [server] Validate GPG sigs with libfko fko_gpg_signature_id_match() function 2014-04-09 23:56:03 -04:00
Michael Rash
41f12eba81 [libfko] Memory leak bug fix in GnuPG handling
Bug fix to correct a memory leak in GnuPG SPA packet handling within
the gpg_decrypt() function.  Here is the specific valgrind leak record
that enabled the bug to be found (note that the new valgrind
suppressions usage was critical for finding this bug among all other
libgpgme memory leaks):

==23983== 1,044 bytes in 1 blocks are definitely lost in loss record 7 of 8
==23983==    at 0x4C2C494: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23983==    by 0x4E41D3A: gpg_decrypt (fko_encryption.c:422)
==23983==    by 0x4E42520: fko_decrypt_spa_data (fko_encryption.c:626)
==23983==    by 0x1155B0: incoming_spa (incoming_spa.c:519)
==23983==    by 0x1180A7: process_packet (process_packet.c:211)
==23983==    by 0x506D857: ??? (in /usr/lib/x86_64-linux-gnu/libpcap.so.1.4.0)
==23983==    by 0x117865: pcap_capture (pcap_capture.c:270)
==23983==    by 0x10F937: main (fwknopd.c:353)
2014-03-27 16:52:13 -04:00
Michael Rash
73bc473563 [client+server] verify GnuPG signatures by default
- [server] When GnuPG is used, the default now is to require that
incoming SPA packets are signed by a key listed in GPG_REMOTE_ID for each
access.conf stanza. In other words, the usage of GPG_REQUIRE_SIG
is no longer necessary in order to authenticate SPA packets via the
GnuPG signature. Verification of GnuPG signatures can be disabled with a
new access.conf variable GPG_DISABLE_SIG, but this is NOT a
recommended configuration.
- [client+server] Add --gpg-exe command line argument and GPG_EXE
config variable to ~/.fwknoprc and the access.conf file so that the path
to GnuPG can be changed from the default /usr/bin/gpg path.
2014-03-25 19:53:13 -04:00
Michael Rash
ded2443b00 ChangeLog updates for 2.6.1 2014-03-14 23:08:34 -04:00
Michael Rash
4181b43f55 [test suite] Added Rijndael+HMAC NAT rand port via client rc file test 2014-03-13 20:10:26 -04:00
Michael Rash
83595bdabb [test suite] Added Rijndael+HMAC command execution test 2014-03-13 19:40:47 -04:00
Michael Rash
0bae1a5a1b started on 2.6.1 ChangeLog entries 2014-03-09 19:16:36 -04:00
Michael Rash
431caa287a added ChangeLog.git to show changes since 2.5.1 2014-01-11 23:33:53 -05:00
Michael Rash
a347be354d merged android4.4_support branch 2014-01-10 22:46:54 -05:00
Michael Rash
6add06f76c bumped version to 2.6.0 2014-01-01 22:27:07 -05:00
Michael Rash
509dcf93dd [android] added HMAC test along with non-legacy Rijndael test 2013-12-23 23:15:11 -05:00
Michael Rash
8dfd57677a added Gerry Reno 2013-12-22 21:12:26 -05:00
Michael Rash
3b2cd063fe [server] pcap_dispatch() packet count default to 100
Updated pcap_dispatch() default packet count from zero to 100.
This change was made to ensure backwards compatibility with older
versions of libpcap per the pcap_dispatch() man page, and also because
some of a report from Les Aker of an unexpected crash on Arch Linux with
libpcap-1.5.1 that is fixed by this change (closes #110).
2013-12-10 22:24:39 -06:00
Michael Rash
e0114e60c2 [server] Added FORCE_SNAT to access.conf stanzas.
Added FORCE_SNAT to the access.conf file so that per-access stanza SNAT
criteria can be specified for SPA access.
2013-12-04 21:52:07 -05:00
Michael Rash
d7aa820e33 [server] Bug fix for SPA NAT modes on iptables firewalls for chain re-creation
For SPA NAT modes this commit ensures that custom fwknop chains are re-created
if they get deleted out from under the running fwknopd instance.
2013-12-03 21:42:23 -05:00
Michael Rash
a15be4005e minor ChangeLog rewording for GPG fix 2013-11-26 09:07:56 -05:00
Michael Rash
be904769c4 [libfko] Bug fix to not decrypt with GnuGP without FKO_ENC_MODE_ASYMMETRIC
[libfko] Bug fix to not attempt SPA packet decryption with GnuPG without
an fko object with encryption_mode set to FKO_ENC_MODE_ASYMMETRIC.  This
bug was caught with valgrind validation against the perl FKO extension
together with the set of SPA fuzzing packets in
test/fuzzing/fuzzing_spa_packets.  Note that this bug cannot be
triggered via fwknopd because additional checks are made within fwknopd
itself to force FKO_ENC_MODE_ASYMMETRIC whenever an access.conf stanza
contains GPG key information.  This fix strengthens libfko itself to
independently require that the usage of fko objects without GPG key
information does not result in attempted GPG decryption operations.  Hence
this fix applies mostly to third party usage of libfko - i.e. stock
installations of fwknopd are not affected.  As always, it is recommended to
use HMAC authenticated encryption whenever possible even for GPG modes since
this also provides a work around even for libfko prior to this fix.
2013-11-26 08:35:16 -05:00
Michael Rash
23ef1d4e59 [libfko] Candidate build fix for Mac OS X 10.9 (closes #108)
Nikolay Kolev reported a build issue on Mac OS X 10.9 (Mavericks) where fwknop
copies of strlcpy() and strlcat() functions were conflicting with those that ship
with OS X 10.9.

The solution was to add a configure.ac check for strlcat() and strlcpy() and
wrap "#if !HAVE_..." checks around those functions.

A portion of the build errors looked like this:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in lib
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..   -I ../common   -g -O2 -Wall -Wformat -Wformat-security -fstack-protector-all -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 -MT base64.lo -MD -MP -MF .deps/base64.Tpo -c -o base64.lo base64.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I ../common -g -O2 -Wall -Wformat -Wformat-security -fstack-protector-all -fstack-protector -D_FORTIFY_SOURCE=2 -MT base64.lo -MD -MP -MF .deps/base64.Tpo -c base64.c  -fno-common -DPIC -o .libs/base64.o
In file included from base64.c:34:
In file included from ./fko_common.h:149:
./fko_util.h:56:9: error: expected parameter declarator
size_t  strlcat(char *dst, const char *src, size_t siz);
        ^
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
  __builtin___strlcat_chk (dest, src, len, __darwin_obsz (dest))
                                           ^
/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
 #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
                                                             ^
2013-11-12 21:36:14 -05:00
Michael Rash
b063bd5734 added Test::Valgrind note to the ChangeLog 2013-10-22 22:58:58 -04:00
Michael Rash
6daabaf3be minor ChangeLog typo update 2013-09-05 20:31:08 -04:00
Michael Rash
83952fc734 added Radostan Riedel's AppArmor policy note 2013-08-18 23:02:44 -04:00
Michael Rash
c0c8048ee1 Added fko context dumper change to ChangeLog, updated test suite to account for single line printing of final SPA data 2013-08-11 22:07:02 -04:00
Michael Rash
333302a7cf ChangeLog/CREDITS update for Hank's libfko error code patch 2013-08-09 21:47:38 -04:00
Michael Rash
eb7914d45c minor ChangeLog update for --stanza-list 2013-08-08 21:37:44 -04:00
Michael Rash
320008b8de minor ChangeLog update for the test suite --gdb-test feature 2013-08-05 21:08:40 -04:00
Michael Rash
694fb39a85 [test suite] Bug fix to not run an iptables Rijndael HMAC test on non-Linux systems 2013-07-25 20:33:19 -04:00
Michael Rash
22836d9915 updated version and release date for 2.5.1 2013-07-24 23:11:46 -04:00
Michael Rash
246c4da322 added 2.5.1 material 2013-07-24 23:04:40 -04:00
Michael Rash
35d168cf21 added fwknop-2.5 release date 2013-07-18 23:05:49 -04:00
Michael Rash
f7a821d082 minor ChangeLog text tweaks and one typo fix 2013-07-17 23:34:37 -04:00
Michael Rash
2812897666 ChangeLog 2.5 updates 2013-06-21 21:37:23 -04:00
Michael Rash
1c8d247887 ChangeLog update to mention the constant_runtime_cmp() change 2013-06-01 22:30:29 -04:00
Michael Rash
366255188a HMAC and PBKDF1 ChangeLog updates 2013-05-14 23:28:45 -04:00
Michael Rash
09f073d393 Added blurb on Coverity to the ChangeLog 2013-05-12 21:04:25 -04:00
Michael Rash
eb143db9a7 [client] added --get-hmac-key to mirror --get-key, closes #68 2013-05-05 21:54:07 -04:00
Michael Rash
5804e15859 Merge remote-tracking branch 'ag4ve/master'
(Shawn Wilson) This adds better source IP logging for fwknopd log messages.
Closes #70.
2013-05-04 09:41:27 -04:00