Commit graph

6849 commits

Author SHA1 Message Date
Jon Siwek
1750e351c4 Prevent division/modulo by zero in scripts.
Integral/floating-point division/modulo by zero in C++ is undefined
behavior, so to prevent such cases in a script from crashing Bro,
they're now reported as an error (with script location information) and
the event handler in which it occurred returns immediately.
2013-09-20 16:36:00 -05:00
Robin Sommer
97cb04aae2 Merge remote-tracking branch 'origin/topic/jsiwek/raw-exec-pgrp'
* origin/topic/jsiwek/raw-exec-pgrp:
  Kill raw input reader's child by process group.

BIT-1081 #merged
2013-09-20 14:12:59 -07:00
Jon Siwek
4e2e690bff Fix unintentional always-false condition. 2013-09-20 14:21:03 -05:00
Scott Runnels
261b9e1e97 Spelling corrections. 2013-09-20 13:36:56 -04:00
Scott Runnels
89090ec34a Include a better description for detect-MHR.bro
I added a better more concise and accurate description of what is going
on behind the scenes of detect-MHR.bro to not only bring it into line
with the Files framework but to help make it a bit more clear as to
where the various responsibilities lie.
2013-09-20 13:33:44 -04:00
Scott Runnels
8e3c6ada0f Rewrite the MHR detection description.
Now that the MHR script uses the file analysis framework, the
description needed to be rewritten to reflect the changes.  Robin
commented that he didn't feel the MHR script was a good introductory
script and he might be right, however, I couldn't find one that was
easier to explain.
2013-09-20 13:25:49 -04:00
Jon Siwek
9033b0384b Fix invalidated iterator usage. 2013-09-20 12:11:10 -05:00
Jon Siwek
dbbbea312c Fix DNS_Mgr iterator mismatch.
But not really since the global dns_mgr should be equal to "this" while
in all the member funcs.  Still, better that they always refer to their
own instance instead of the global one.
2013-09-20 11:37:19 -05:00
Scott Runnels
5fede2f73e Spelling corrections.
Apparently I am unable to spell "separate".
2013-09-20 12:22:12 -04:00
Jon Siwek
f9b8de8436 Merge branch 'master' into topic/jsiwek/coverity 2013-09-20 11:03:29 -05:00
Scott Runnels
17bc3955f9 Update the lines included from events.bif.bro.
Previously listed connection_established and connection_finished which
are no longer in place in events.bif.bro.
2013-09-20 11:43:45 -04:00
Jon Siwek
e5a4123b4e Kill raw input reader's child by process group.
This should help on systems where the default shell (e.g. dash on
Ubuntu) fork-execs in order to run commands.  In that case, we were
just killing the shell and the shell would exit without killing
the actual process corresponding to command that was requested.
Setting a process group for the shell exec'd from Bro and killing
by process group should help clean everything up since process group
will be inherited by any procs that shell fork-execs.
2013-09-20 09:38:52 -05:00
Robin Sommer
0316bd77f5 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add more links in the GeoLocation document
2013-09-19 20:08:22 -07:00
Daniel Thayer
bfbf1f7305 Add more links in the GeoLocation document 2013-09-19 17:34:07 -05:00
Robin Sommer
1e21fc177c Updating submodule(s).
[nomail]
2013-09-19 15:22:30 -07:00
Robin Sommer
fe3c14c9fa Updating submodule(s).
[nomail]
2013-09-19 15:14:53 -07:00
Robin Sommer
d123d95b46 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Add links to Intelligence Framework documentation
  update mozilla root ca list
  Update Mozilla root CA certs.
  Update documentation of required packages
2013-09-19 15:12:46 -07:00
Bernhard Amann
df552ca87d parse out extension. One event for general extensions (just returns the
openssl-parsed string-value), one event for basicconstraints (is a certificate
a CA or not) and one event for subject-alternative-names (only DNS parts).
2013-09-19 14:41:34 -07:00
Daniel Thayer
78ef31577b Add links to Intelligence Framework documentation 2013-09-19 16:16:09 -05:00
Bernhard Amann
8b48a476ec update mozilla root ca list 2013-09-19 12:53:45 -07:00
Jon Siwek
1ed210a572 Set safe umask when creating script profiler tmp files. 2013-09-19 13:57:51 -05:00
Jon Siwek
b6350d518a Merge branch 'master' into topic/jsiwek/coverity 2013-09-19 12:58:22 -05:00
Jon Siwek
d05a02e848 Update Mozilla root CA certs. 2013-09-19 12:57:14 -05:00
Jon Siwek
79bd81c8da Fix nesting/indent level whitespace mismatch.
The EndData() doesn't make sense as part of the condition that implies
the state is such that it's not inside data.  It might make sense as
part of an else block, but it also seems fine to unconditionally
EndData() like it currently does.  That way unexpected states (mail !=
0) are dealt with sooner rather than later.
2013-09-19 11:39:52 -05:00
Daniel Thayer
d417bd9f3a Update documentation of required packages 2013-09-18 23:48:54 -05:00
Robin Sommer
3738b4136b Merge remote-tracking branch 'origin/topic/bernhard/ticket950'
* origin/topic/bernhard/ticket950:
  make client and server random available on script-level.

BIT-950 #merged
2013-09-18 15:02:55 -07:00
Robin Sommer
c6de23ebe1 Merge remote-tracking branch 'origin/topic/bernhard/ticket1072'
* origin/topic/bernhard/ticket1072:
  and const 2 more functions
  update hll documentation, make a few functions private and create a new copy constructor.
  fix case where hll_error_margin could be undefined (thanks John)

BIT-1072 #merged
2013-09-18 15:00:06 -07:00
Robin Sommer
6e1f01f04c Merge remote-tracking branch 'origin/topic/dnthayer/compilerwarn'
* origin/topic/dnthayer/compilerwarn:
  Fix compiler warning (time_t is not a pointer type)
  Fix cmake warning about ENABLE_PERFTOOLS not being used
  Fix another compiler warning
  Fix compiler warnings

BIT-1079 #merged
2013-09-18 14:42:58 -07:00
Robin Sommer
9d3fc1e7ed Updating CHANGES and VERSION. 2013-09-18 14:36:59 -07:00
Jon Siwek
a316878d01 Add checks to avoid improper negative values use. 2013-09-17 16:42:48 -05:00
Daniel Thayer
0d68aad9b1 Merge remote-tracking branch 'origin/master' into topic/dnthayer/compilerwarn 2013-09-17 16:17:41 -05:00
Daniel Thayer
fdc0d5c7ec Fix compiler warning (time_t is not a pointer type) 2013-09-17 15:29:41 -05:00
Daniel Thayer
fdc364084b Fix cmake warning about ENABLE_PERFTOOLS not being used 2013-09-16 17:45:21 -05:00
Jon Siwek
a3b963ad4e Refactor Analyzer::AddChildAnalyzer and usages.
Make feedback available regarding whether adding a child analyzer fails
because one of the same type already exists (so one can avoid invalid
pointer access of a delete'd analyzer).
2013-09-16 16:20:55 -05:00
Jon Siwek
bb8f102b2c Minor refactor to SSL BinPAC grammer.
An unsized array already parses indefinitely.  &until($element <= 0)
just causes nonsense code to be generated.  I.e. checking a pointer that
can never even be null against <= 0.  And the compare would happen after
delete'ing the pointer, making it even odder (though still benign).
2013-09-16 16:10:49 -05:00
Bernhard Amann
e5a589dbfe Very basic file-analyzer for x509 certificates. Mostly ripped from
the ssl-analyzer and the topic/bernhard/x509 branch.

Simply prints information about the encountered certificates (I have
not yet my mind up, what I will log...).

Next step: extensions...
2013-09-16 14:08:22 -07:00
Jon Siwek
19b15217f0 Minor refactor to broxygen enum comments.
Coverity claimed a mismatched iterator here.  Don't think it was, but
this might make it either go away or make its insane template output
understandable.  Else at least it makes the code more readable.
2013-09-16 15:40:44 -05:00
Jon Siwek
c8758c4f24 Fix possible (unlikely) use of uninitialized value.
Plus two minor refactors/nits.
2013-09-16 15:36:18 -05:00
Bernhard Amann
ecc20b932a and const 2 more functions 2013-09-16 11:00:54 -07:00
Bernhard Amann
c0f780c728 update hll documentation, make a few functions private and create
a new copy constructor.
2013-09-16 10:40:25 -07:00
Daniel Thayer
1580fb5d61 Merge remote-tracking branch 'origin/master' into topic/dnthayer/compilerwarn 2013-09-16 11:21:00 -05:00
Daniel Thayer
20f11ad237 Fix another compiler warning 2013-09-16 11:20:07 -05:00
Bernhard Amann
eb1d7ccc4a Merge remote-tracking branch 'origin/master' into topic/bernhard/ticket1072 2013-09-16 09:15:24 -07:00
Jon Siwek
735d2c402a Fix/improve dereference-before-null-checks. 2013-09-13 16:41:41 -05:00
Jon Siwek
3d81432a1e Fix out-of-bounds memory accesses.
And remove a variable-length-array usage.
2013-09-13 15:05:17 -05:00
Jon Siwek
5a992879a0 Fix potential mem leak. 2013-09-13 14:31:03 -05:00
Jon Siwek
a99e873d5c Fix double-free and deallocator mismatch. 2013-09-13 14:30:22 -05:00
Jon Siwek
33a7e96268 Fix another function val reference counting bug.
Now that functions get unref'd in the val dtor in order to free mem of
unserialized functions, it's important to ref a function when creating a
val from a pre-existing function so it's not prematurely free'd.
2013-09-13 12:51:24 -05:00
Daniel Thayer
1d33883dfc Fix compiler warnings 2013-09-13 00:30:18 -05:00
Jon Siwek
bcf79fe11a Merge branch 'topic/dnthayer/doc-fix-links'
BIT-1076 #merged
2013-09-12 16:40:28 -05:00