Commit graph

13262 commits

Author SHA1 Message Date
Jon Siwek
d6f671494e Reliability adjustments to istate tests with network communication. 2012-09-26 12:14:11 -05:00
Seth Hall
50e319a417 Checkpoint commit. This is all a huge mess right now. :) 2012-09-26 10:08:48 -04:00
Robin Sommer
bf62a6e673 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Uncomment some previously-broken tests
  Fix parsing of integers
  Serialize language.when unit test with the "comm" group.
2012-09-25 14:22:23 -07:00
Daniel Thayer
f7e55509a4 Uncomment some previously-broken tests
Uncommented some tests that previously would cause Bro to exit
with an error.
2012-09-25 16:05:23 -05:00
Daniel Thayer
6f45a8f4ef Fix parsing of integers
This bug was seen on 32-bit systems, where the range of recognized values
was less than the range of hexadecimal values.
2012-09-25 15:26:44 -05:00
Jon Siwek
1044762dfa Serialize language.when unit test with the "comm" group.
Since it now loads the listen script.
2012-09-25 14:53:51 -05:00
Robin Sommer
d4b95e2bbf Updating submodule(s).
[nomail]
2012-09-25 06:25:15 -07:00
Robin Sommer
958c3d74d6 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix race condition in language/when.bro test
2012-09-24 16:24:49 -07:00
Daniel Thayer
101ba67203 Fix race condition in language/when.bro test 2012-09-24 18:20:42 -05:00
Robin Sommer
45926e6932 Updating submodule(s).
[nomail]
2012-09-24 16:13:24 -07:00
Robin Sommer
8cd85a9013 Updating submodule(s).
[nomail]
2012-09-24 11:45:18 -07:00
Robin Sommer
801f8d3de6 Updating submodule(s).
[nomail]
2012-09-24 11:44:23 -07:00
Robin Sommer
73115dd334 Updating CHANGES and VERSION. 2012-09-24 11:15:43 -07:00
Robin Sommer
d89fda319e Merge remote-tracking branch 'origin/topic/dnthayer/faq-update'
* origin/topic/dnthayer/faq-update:
  Add an item to FAQ page about broctl options
2012-09-23 08:46:03 -07:00
Robin Sommer
832539f548 Merge remote-tracking branch 'origin/topic/dnthayer/language-tests'
* origin/topic/dnthayer/language-tests:
  Update language tests for recent bug fixes
  Add more language tests
  Add more language tests
  Add more language tests
  Update language tests
  Add more language tests
  Add tests of the Bro scripting language
2012-09-23 08:44:34 -07:00
Robin Sommer
17df13e7e1 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix construction of ip6_ah (Authentication Header) record values.
  Update compile/dependency docs for OS X.
  Adjusting Mac binary packaging script.
  Unit test reliability adjustment.
  Adjusting some unit tests that do cluster communication.
  Small change to non-blocking DNS initialization.
  reorder a few statements in scan.l to make 1.5msecs etc work.
2012-09-23 08:43:10 -07:00
Jon Siwek
392b99b2fa Fix construction of ip6_ah (Authentication Header) record values.
Authentication Headers with a Payload Len field set to zero would cause
a crash due to invalid memory allocation because the previous code
assumed Payload Len would always be great enough to contain all
mandatory fields of the header.  This changes it so the length of
the header is explicitly checked before attempting to extract fields
located past the minimum length (8 bytes) of an Authentication Header.

Crashes due to this are only possible when handling script-layer events
ipv6_ext_headers, new_packet, esp_packet, or teredo_*.  Or also when
implementing one of the discarder_check_* family of functions.
Otherwise, Bro correctly parses past such a header.
2012-09-18 16:52:12 -05:00
Seth Hall
009efbcb27 Major revisions to Modbus analyzer support (not quite done yet).
- Renamed many data structures to align with most recent standard.

- Reworked modbus events to make them more canonically "Bro".

- Converted the Modbus analyzer to a simpler style for easier maintenance.

- Modbus coil related events still don't work (I haven't finished the
  function for converting the data structures).

- Modbus file record events remain incomplete.
2012-09-17 09:19:52 -04:00
Jon Siwek
6fbbf28290 Update compile/dependency docs for OS X. 2012-09-14 10:28:23 -05:00
Jon Siwek
6d1abdb661 Adjusting Mac binary packaging script.
Setting CMAKE_PREFIX_PATH helps link against standard system libs
instead of ones that come from other package manager (e.g. MacPorts).

Changed to allow only more recent CMake versions to create packages
due to poorer clang compiler support in older versions, important
since clang is now the default compiler instead of gcc on Macs.
2012-09-13 16:47:40 -05:00
Jon Siwek
292bf61ae8 Unit test reliability adjustment.
Sometimes manager node was shutting everything down before others had
a chance to generate output.  It now waits for all nodes to fully
connect with each other.
2012-09-13 12:59:40 -05:00
Jon Siwek
bd84ff2c20 Adjusting some unit tests that do cluster communication.
Added explicit synchronization and termination points to make the
tests more reliable and exit earlier in most cases.
2012-09-07 16:25:07 -05:00
Jon Siwek
67d01ab9e9 Small change to non-blocking DNS initialization.
The trailing dot on "localhost." circumvents use of /etc/hosts in
some environments (I saw it on FreeBSD 9.0-RELEASE-p3) and so emits
an actual DNS query.  When running the test suite, that would be
hundreds of useless queries.
2012-09-07 15:15:48 -05:00
Bernhard Amann
f6c9b69eda reorder a few statements in scan.l to make 1.5msecs etc work.
Adresses #872
2012-09-07 10:57:52 -07:00
Daniel Thayer
84fabf1718 Add an item to FAQ page about broctl options 2012-09-07 12:40:25 -05:00
Daniel Thayer
2dca037384 Merge remote-tracking branch 'origin/master' into topic/dnthayer/language-tests 2012-09-07 10:52:21 -05:00
Daniel Thayer
84ec139fd9 Update language tests for recent bug fixes 2012-09-07 10:48:13 -05:00
Robin Sommer
7e3f06fca3 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix the "-=" operator for intervals
  Fix "!=" operator for subnets
  Add sleeps to configuration_update test for better reliability.
  Fix a segfault when iterating over a set
2012-09-06 23:24:13 -07:00
Robin Sommer
11f66076a1 Starting 2.2 release notes. 2012-09-06 23:05:57 -07:00
Daniel Thayer
cd21eb5b6a Fix the "-=" operator for intervals
Fixed a bug where "a -= b" (both operands are intervals) was not allowed in
bro scripts (although "a = a - b" is allowed).
2012-09-05 17:17:43 -05:00
Daniel Thayer
9357aeb6b1 Fix "!=" operator for subnets
Fixed a bug where the "!=" operator with subnet operands
was treated the same as the "==" operator.
2012-09-05 16:52:14 -05:00
Jon Siwek
a10093b620 Add sleeps to configuration_update test for better reliability.
Not the greatest solution, but makes the 3 bro processes more likely to
run sequentially so that the controller2 process doesn't happen to be
scheduled before the controller process.  In that case, the controllee
gets the shutdown request before the configuration update.  FreeBSD
especially seemed to schedule them the unintended way frequently.
2012-09-05 16:20:34 -05:00
Daniel Thayer
63a550fa9e Fix a segfault when iterating over a set
When iterating over a set with a "for" loop, bro would segfault
when the number of index variables was less than required.
Example:  for ( [c1,c2] in s1 ) ...
where s1 is defined as set[addr,port,count].
2012-09-05 12:00:21 -05:00
Daniel Thayer
d5bf5eb38c Add more language tests 2012-09-04 17:39:00 -05:00
Daniel Thayer
76420e4b61 Add more language tests 2012-09-02 12:55:31 -05:00
Daniel Thayer
05ad3f95af Add more language tests
Added more tests and fixed a broken test.
2012-08-31 14:05:02 -05:00
Seth Hall
78401262d0 Merge remote-tracking branch 'origin/master' into topic/seth/intel-framework 2012-08-30 11:36:34 -04:00
Soumya Basu
3ffb4cab64 Everything works, and I just need to put the tests in the proper folder to get this functionality working. 2012-08-30 01:09:44 -07:00
Robin Sommer
a48963f82b Merge remote-tracking branch 'origin/master' into topic/robin/modbus-merge
* origin/master:
  Two fixes.
  Updating CHANGES and VERSION.
  Updating CHANGES and VERSION.
  Remove automatic use of gperftools on non-Linux systems.
  Set VERSION to 2.1-rc3 so that we don't get confused.
  Fix uninitialized value for 'is_partial' in TCP analyzer.
  parse 64-bit consts correctly.
  on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
2012-08-29 18:01:31 -07:00
Robin Sommer
cbb31cedc3 Merge remote-tracking branch 'origin/topic/dina/modbus' into topic/robin/modbus-merge
* origin/topic/dina/modbus:
  put some make-up on Modbus analyser
  Modbus analyser, added support: FC=20,21
  Modbus analyzer,added support: FC=1,2,15,24
  Modbus analyzer, current support: FC=3,4,5,6,7,16,22,23

I cleaned up the code a bit, mainly layout style.

I did not include the *.bro scripts for now, but a test script
../testing/btest/scripts/base/protocols/modbus/events.bro that prints
out the value for each event.

Merged the Modbus traces from the ics repository into a single trace
as input for the test. They currently trigger 20 of the 34 events.

Addresses #870.
2012-08-29 17:58:41 -07:00
Daniel Thayer
44c6ed5e8c Update language tests
Updated the int and count max/min constant value tests based on latest fixes
in master.
2012-08-29 17:53:37 -05:00
Daniel Thayer
844ecd197e Merge remote-tracking branch 'origin/master' into topic/dnthayer/language-tests 2012-08-29 17:19:55 -05:00
Daniel Thayer
621a90d248 Add more language tests
Added tests for the conditional operator, operator precedence,
modules ("module" and "export" keywords, and the "::" operator), and
for the "copy" keyword.

Also improved tests of max/min values of int, count, and double constants.
2012-08-29 17:14:03 -05:00
Robin Sommer
22cf75dae5 Two fixes.
- Typo in recent scanner fix.

    - Make bif.identify_magic robust against FreeBSD's libmagic config.
2012-08-29 08:11:16 -07:00
Robin Sommer
b915db86d5 Updating CHANGES and VERSION. 2012-08-28 16:47:49 -07:00
Robin Sommer
e4b7ffa8ac Updating CHANGES and VERSION. 2012-08-28 16:44:30 -07:00
Robin Sommer
a24abddc5f Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Remove automatic use of gperftools on non-Linux systems.
  Fix uninitialized value for 'is_partial' in TCP analyzer.
  parse 64-bit consts correctly.
  on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...
2012-08-28 16:35:06 -07:00
Jon Siwek
cc49193f93 Remove automatic use of gperftools on non-Linux systems.
--enable-perftools must now explicity be supplied to ./configure on
non-Linux systems to link against the tcmalloc library that a
gperftools installation provides.  Linux systems still automatically
link it if it's found.  The rationale is that gperftools was developed
and most throroughly tested on Linux so it's safer there.

There especially seems to be potential problems with gperftools on OS X
(e.g. see http://code.google.com/p/gperftools/issues/detail?id=413),
and Bro currently doesn't work with gpertools there using clang or gcc.
2012-08-28 13:11:12 -05:00
Robin Sommer
393ded1efe Set VERSION to 2.1-rc3 so that we don't get confused. 2012-08-28 09:19:33 -07:00
Jon Siwek
b815b7ca5c Fix uninitialized value for 'is_partial' in TCP analyzer.
This led to non-deterministic behavior in cases where the first packet
analyzed wasn't from the originator side (see the conditionals in
TCP_Analyzer::CheckFlagCombos()).

The 'short' test in private test suite showed this behavior most often.
2012-08-28 10:57:21 -05:00