Commit Graph
541 Commits
Author SHA1 Message Date
Michael Rash 8471d8aae6 semicolon syntax buf fix 2012-07-27 02:01:43 -04:00
Michael Rash d561fdd4d7 added lib/fko_util.c with basic length checking functions 2012-07-26 18:01:36 -04:00
Michael Rash bdb6cc0eb1 Added digest_len and raw_digest_len fields and replaced strlen() calls 2012-07-26 15:00:32 -04:00
Michael Rash 3f05a6d25a [test suite] added sha384 and digest type arg tests 2012-07-26 14:53:45 -04:00
Michael Rash 4f1c5b55a4 [test suite] added --test-limit argument 2012-07-26 12:52:25 -04:00
Michael Rash e733f4aa4f have encryption calls use encoded_msg_len 2012-07-26 12:21:24 -04:00
Michael Rash 661991b747 complete cycle tests for client-set digest types 2012-07-26 04:09:06 -04:00
Michael Rash 838829f2bb added a new encoded_msg_len to cut down on strlen() calls within libfko 2012-07-26 00:10:28 -04:00
Michael Rash c51a85523f Added valgrind individual test diff results.
A new output/valgrind-coverage directory was added to test suite results, and valgrind
output is compared in --diff mode using data in this directory.
2012-07-25 23:38:41 -04:00
Michael Rash 5043683739 [test suite] bug fix after merge to account for new file_find_regex() API 2012-07-24 17:50:17 -04:00
Michael Rash 175374337d merged crypto_update after fwknop-2.0.1 merge to crypto_update from master 2012-07-24 17:10:00 -04:00
Michael Rash c6b674617c completed merge from master after fwknop-2.0.1 release 2012-07-24 16:19:48 -04:00
Michael Rash 8e26cca9f3 removed diffstat and ShortLog from 'make dist' target 2012-07-23 22:53:38 -04:00
Michael Rash cab2ea9083 bumped version to 2.0.1 2012-07-23 22:40:47 -04:00
Michael Rash 9fe6dc7d6f bumped version to fwknop-2.0.1 2012-07-23 21:58:14 -04:00
Michael Rash a980a029a7 removed diffstat and ShortLog files in favor of ChangeLog.git for each release 2012-07-23 21:54:49 -04:00
Michael Rash 3c533de7e4 updated Debian init script (contributed by Franck Joncourt) 2012-07-23 21:49:25 -04:00
Michael Rash 62445d0d03 add test/conf/local_nat_fwknopd.conf for 'make dist' 2012-07-23 21:32:24 -04:00
Michael Rash e68c561c40 bumped version to fwknop-2.0.1-pre5 2012-07-23 21:24:29 -04:00
Michael Rash 24dccb34ec [client] fix memory leak when unable to open --get-key file 2012-07-23 21:23:23 -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 6255bff95f replace strlen() calls with strnlen() and appropriate maximums 2012-07-22 23:13:39 -04:00
Michael Rash 335abdd545 use LOGNAME env var before cuserid() since we're already looking for SPOOF_USER 2012-07-22 23:13:01 -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 4c25aa17f3 [test suite] minor filename update -> use config files for fwknopd in a hash 2012-07-20 21:16:13 -04:00
Michael Rash 4c7923413e Implemented server-side bounds checking on inccoming SPA data.
Enhanced the libfko decoding routine to include bounds checking on decrypted
SPA data.  This includes verifying the number of fields within incoming SPA
data (colon separated) along with verifying string lengths of each field.
2012-07-19 22:34:45 -04:00
Michael Rash 8f500fd67f added some integer bounds checking for fwknopd.conf variables 2012-07-18 23:20:09 -04:00
Michael Rash 65b2acd8f5 minor update to print FORCE_NAT settings when access stanzas are printed 2012-07-18 23:17:27 -04:00
Michael Rash 15c76b25cd minor pcap_capture update to not call atoi() against PCAP_LOOP_SLEEP for every sleep interval 2012-07-18 23:00:58 -04:00
Michael Rash c0aa346890 [test suite] minor hostname bugfix to get 'local NAT' test to work 2012-07-18 22:55:56 -04:00
Michael Rash 72aaeb893e [test suite] better fwknopd is running check 2012-07-18 22:32:16 -04:00
Michael Rash 8ed741dd48 Merge branch 'master' of github.com:mrash/fwknop 2012-07-17 22:20:36 -04:00
Michael Rash 71fc4fe7fe [test suite] file_find_regex() postive vs. negative match styles
Positive match style requires all regex's to be found, whereas negative match
style only requires seeing one regex.
2012-07-17 21:55:13 -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 981059452b minor file_find_regex() logging prefix update 2012-07-16 22:05:15 -04:00
Michael Rash 1b9f847521 [test suite] added local_nat_fwknopd.conf file for local NAT tests 2012-07-16 21:43:28 -04:00
Michael Rash de7aa3b619 Add INPUT ACCEPT rule for --nat-local connections
When using the --nat-local argument on the fwknop client command line, the
fwknopd server needs to add an INPUT ACCEPT rule for the requested access
since the incoming connection is destined for a local socket.  Added test
suite support to test --nat-local access.

[test suite] Minor bug fix to ensure that all file_find_regex() calls return
true if all regex's are matched and false if any regex does not match data in
the specified file.
2012-07-15 21:32:14 -04:00
Damien Stuart d49e44dad0 Forgot to update the VERSION file. 2012-07-14 22:10:37 -04:00
Damien Stuart d5568cb1a1 Bumped version to 2.0.1-pre4 2012-07-14 20:54:05 -04:00
Damien Stuart 2a5bc7ed14 Added tweaks to ipfw command for Mac OS X 2012-07-14 18:22:42 -04:00
Damien Stuart f06c775654 Merge branch 'master' of ssh://github.com/mrash/fwknop 2012-07-14 10:14:05 -04:00
Damien Stuart 283e213a61 Added gpg validity check. Tweak to rpm spec file. 2012-07-14 10:13:26 -04:00
Michael Rash c57f4a82b7 bumped version to fwknop-2.0.1-pre3 2012-07-12 22:19:41 -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 e250776107 [test suite] Bug fix to account for libfko.dylib extension
Richard Haas reported the test suite failing on Mac OS X systems with the
existence check for the libfko library.  Damien Stuart advised that the library
has a different extention '.dylib' on Mac OS X, so this change accounts for the
difference.
2012-07-12 22:11:35 -04:00
Michael Rash 29fe16d29f post-merge fix after merged crypto_update branch changes 2012-07-10 22:16:54 -04:00
Michael Rash d7c4572521 merged test suite changes from the crypto_update branch 2012-07-10 22:03:56 -04:00
Michael Rash 47e39272ed Make encrypt/decrypt code accept integer key lengths instead of using strlen()
Now that encryptions keys and hmac keys may be acquired from /dev/random with
--key-gen (and base64 encoded), they may contain NULL bytes.  This emphasizes
the need to not leverage code that assumes C-style strings when making use of
key information.
2012-07-10 21:44:06 -04:00
Michael Rash 7145cdd8a1 Merge from master minor bug fix to include default encryption mode
When getting raw digest for replay attack detection specify the default
encryption mode (which doesn't actually get used when passing a NULL key).
2012-07-10 08:30:11 -04:00