Commit graph

6849 commits

Author SHA1 Message Date
Jon Siwek
c9d44788f6 Merge branch 'fastpath' 2013-09-12 16:00:09 -05:00
Jon Siwek
0b97343ff7 Fix various potential memory leaks.
Though I expect most not to be exercised in practice.
2013-09-12 15:23:52 -05:00
Jon Siwek
801f32c8ee Updating submodule(s).
[nomail]
2013-09-12 12:33:24 -05:00
Daniel Thayer
b02709f88f Fix broken links in the documentation
Also removed a duplicate link under "Script Reference".
2013-09-11 16:32:02 -05:00
Bernhard Amann
9834755948 fix case where hll_error_margin could be undefined (thanks John) 2013-09-11 12:50:29 -07:00
Bernhard Amann
c40a97156a make client and server random available on script-level.
Patch by ewust

Addresses BIT-950
2013-09-11 12:39:23 -07:00
Jon Siwek
c3a4454892 Fix significant memory leak.
Particularly, unserializing a function is frequent and leaked.
2013-09-10 16:10:10 -05:00
Jon Siwek
1fbeefedbc Fix two use-after-free bugs. 2013-09-10 13:30:23 -05:00
Daniel Thayer
ee1312f2ad Fix an error seen when building documentation 2013-09-10 11:22:14 -05:00
Seth Hall
7c1dffa66f Fixed an issue with the HLL_UNIQUE SumStats plugin that caused a reporter error. 2013-09-06 15:31:00 -04:00
Jon Siwek
b76d8eedbb Updating submodule.
[nomail]
2013-09-05 16:54:53 -05:00
Jon Siwek
a9a245e017 Workaround type ambiguity w/ default record field. 2013-09-05 16:41:51 -05:00
Jon Siwek
aed9943c95 Merge branch 'master' into fastpath 2013-09-05 16:33:03 -05:00
Jon Siwek
0b5a75a463 Fix mem leak in failing table initialization case.
Specifically that case looked like tables that have a compound index
and an element assignment fails due to a type mismatch.
2013-09-05 16:09:52 -05:00
Jon Siwek
f823b92e5e Fix mem leak when merging incompatible types.
Though this would typically be caused by a scripting error that should
be fixed and Bro would exit anyway if encountered at parse time.
2013-09-05 15:47:57 -05:00
Jon Siwek
75d469532c Fix mem leak when unserializing table entry fails.
Shouldn't happen in practice.
2013-09-05 15:40:10 -05:00
Jon Siwek
766cc0d220 Fix mem leak when failing to end a serialization.
We'd probably know about it if that actually ever happened in practice
(which it shouldn't).
2013-09-05 15:30:28 -05:00
Jon Siwek
703ef3b908 Fix mem leak when unserializing an arg in a function call fails.
Shouldn't be a typical scenario since hopefully we'd know about
and fix the underlying problem w/ unserialization...
2013-09-05 15:09:05 -05:00
Jon Siwek
4e8ba6eaa2 Fix signatures that use identifiers of type table. 2013-09-05 13:01:40 -05:00
Jon Siwek
eef432561e Fix memory leak if a DNS request fails to be made.
A symptom of this is a "can't issue DNS request" warning in
reporter.log. (Doesn't look like this should be a typical thing
that happens in most environments).
2013-09-05 11:52:40 -05:00
Seth Hall
ef50802fd7 Make the notice $actions field have a default empty set to avoid having to check for it's presence. 2013-09-05 12:07:21 -04:00
Jon Siwek
7799a86a7f Adjust HLL cluster leak test so leaks trigger a failure. 2013-09-04 16:53:58 -05:00
Jon Siwek
3939b629ae Adjust DNS memory leak test to actually fail if there's a leak. 2013-09-04 16:49:04 -05:00
Jon Siwek
62de5678f7 Fix memory leak in DNS TXT lookups. 2013-09-04 16:47:44 -05:00
Jon Siwek
6ad82ff263 Fix invalid/mismatched deallocators. 2013-09-04 14:45:09 -05:00
Jon Siwek
f9dc48e573 Fix logging filter over-allocation and leak.
The leak could happen in a couple cases where adding a log filter
fails: OOM and unsupported field type.
2013-09-04 14:25:57 -05:00
Jon Siwek
0678468353 Internal UID simplifications/nits. 2013-09-04 11:46:53 -05:00
Jon Siwek
ca9b9162a7 Fix raw execution input reader's signal blocking.
Signals are generally blocked within threads in Bro so that the main
thread does all signal handling, however, signal masks are inherited
over fork() and exec(), so they should be unblocked before exec() so
that process can respond to signals normally.

This fixes the raw reader from leaving behind processes that didn't
respond to SIGTERM at shutdown because it was blocked before exec().
2013-09-04 10:45:29 -05:00
Jon Siwek
db470a637a Documentation fixes.
This cleans up most of the warnings from sphinx (broken :doc: links,
broxygen role misuses, etc.).  The remaining ones should be harmless,
but not quick to silence.

I found that the README for each component was a copy from the actual
repo, so I turned those in to symlinks so they don't get out of date.
2013-09-03 15:59:40 -05:00
Robin Sommer
2392a29b7f Redoing doc.sphinx baselines. 2013-08-31 18:10:09 -07:00
Robin Sommer
ac66db286a Merge remote-tracking branch 'origin/topic/documentation'
I'm merging in the documentation branch to avoid that it keeps getting
out of sync. We still need to work on this a bit more, I'll summarize
in a mail.

* origin/topic/documentation: (68 commits)
  Going over initial parts of the scripting overview.
  Adding lines in scripting/index.txt. No other change.
  Updating submodule.
  Pass over the Using Bro section.
  Applying doc updates from BIT-1063. (Anthony Verez)
  Breaking lines in using/*.
  More doc reorg, and a light pass over the first 3 sections.
  Starting to put a new structure in place.
  Updating submodule(s).
  Updating submodule(s).
  Adding some temporary testing/demonstration to front page.
  Switching btest to topic/robin/parts branch.
  Basic cross-referencing UIDs between files, btests, and baselines.
  A truly embarassing number of spelling corrections.
  Using redirection with bro-cut.  Include initial btests for this document.
  Corrected a mis-typed RST include.
  Initial start for "Using Bro".
  Spelling corrections.
  Include Notice Policy shortcuts in the Scripting User Manual.
  Notice::policy hooks and tests.
  ...

Conflicts:
	src/3rdparty
2013-08-31 16:07:44 -07:00
Robin Sommer
bf9eb7c44f Updating submodule(s).
[nomail]
2013-08-31 11:22:40 -07:00
Robin Sommer
de5bb65ff7 Removing the "uint8*" methods from SerializationFormat.
They conflict with the "char" version, so that other classes would now
pick the wrong one. Added a bit of casting to HLL to use the "char"
versions instead.
2013-08-31 11:17:49 -07:00
Robin Sommer
a8ac7d8a5b Updating tests for HLL merge. 2013-08-31 11:17:49 -07:00
Robin Sommer
41cab5e0dd Updating tests. 2013-08-31 10:47:19 -07:00
Robin Sommer
6f9d28cc18 Merge branch 'topic/robin/hyperloglog-merge'
* topic/robin/hyperloglog-merge: (35 commits)
  Making the confidence configurable.
  Renaming HyperLogLog->CardinalityCounter.
  Fixing bug introduced during merging.
  add clustered leak test for hll. No issues.
  make gcc happy
  (hopefully) fix refcounting problem in hll/bloom-filter opaque vals. Thanks Robin.
  re-use same hash class for all add operations
  get hll ready for merging
  and forgot a file...
  adapt to new structure
  fix opaqueval-related memleak.
  make it compile on case-sensitive file systems and fix warnings
  make error rate configureable
  add persistence test not using predetermined random seeds.
  update cluster test to also use hll
  persistence really works.
  well, with this commit synchronizing the data structure should work.. ...if we had consistent hashing.
  and also serialize the other things we need
  ok, this bug was hard to find.
  serialization compiles.
  ...
2013-08-31 10:42:42 -07:00
Robin Sommer
295987c8d0 Making the confidence configurable. 2013-08-31 10:34:50 -07:00
Robin Sommer
fb3ceae6d5 Renaming HyperLogLog->CardinalityCounter.
For consistency with the class' name.
2013-08-31 10:22:27 -07:00
Robin Sommer
ef04ce809b Fixing bug introduced during merging. 2013-08-31 10:17:13 -07:00
Robin Sommer
b74bf10565 Going over initial parts of the scripting overview.
I made a light pass over the text. Switched the includes over to the
new btest-include and adapted the other TEXT-EXECs a bit.

Also includes more tweaking all over the Sphinx setup.
2013-08-30 16:23:17 -07:00
Robin Sommer
4dcf8fc0db Merge remote-tracking branch 'origin/topic/bernhard/hyperloglog'
* origin/topic/bernhard/hyperloglog: (32 commits)
  add clustered leak test for hll. No issues.
  make gcc happy
  (hopefully) fix refcounting problem in hll/bloom-filter opaque vals. Thanks Robin.
  re-use same hash class for all add operations
  get hll ready for merging
  and forgot a file...
  adapt to new structure
  fix opaqueval-related memleak.
  make it compile on case-sensitive file systems and fix warnings
  make error rate configureable
  add persistence test not using predetermined random seeds.
  update cluster test to also use hll
  persistence really works.
  well, with this commit synchronizing the data structure should work.. ...if we had consistent hashing.
  and also serialize the other things we need
  ok, this bug was hard to find.
  serialization compiles.
  change plugin after feedback of seth
  Forgot a file. Again. Like always. Basically.
  do away with old file.
  ...
2013-08-30 11:30:05 -07:00
Bernhard Amann
2dd0d057e6 Merge remote-tracking branch 'origin/master' into topic/bernhard/hyperloglog
Conflicts:
	src/NetVar.cc
	src/NetVar.h
2013-08-30 08:43:47 -07:00
Robin Sommer
23144e44a7 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix global opaque val segfault, addresses BIT-1071
  Fix malloc/delete mismatch.
  Fix invalid pointer dereference in AsciiFormatter.
2013-08-30 08:28:18 -07:00
Jon Siwek
dc2e3d6e04 Fix global opaque val segfault, addresses BIT-1071
The opaque types need to be created before scripts are parsed.
2013-08-29 17:17:40 -05:00
Jon Siwek
742a047a40 Fix malloc/delete mismatch. 2013-08-29 16:22:59 -05:00
Robin Sommer
c8a2fbeadd Merge remote-tracking branch 'origin/fastpath'
Changed two deletes to Unrefs.

* origin/fastpath:
  Fix input framework memory leaks.
  Fix mem leak in socks analyzer for bad addr types.
  Fix bloom filter memory leaks.
2013-08-29 14:20:59 -07:00
Bernhard Amann
4cd20c6375 add clustered leak test for hll. No issues. 2013-08-29 14:01:22 -07:00
Jon Siwek
c4e8908c8e Fix invalid pointer dereference in AsciiFormatter.
Using a temporary object with strtol() makes the end pointer that it
sets invalid after the call.
2013-08-29 15:50:46 -05:00
Jon Siwek
b6e2505202 Fix input framework memory leaks.
Couldn't figure out a test case: gperftools didn't report them (maybe
due to threading?), but valgrind did.
2013-08-29 14:13:16 -05:00
Jon Siwek
e54ea6d7e9 Fix mem leak in socks analyzer for bad addr types. 2013-08-29 14:09:56 -05:00