Commit graph

3375 commits

Author SHA1 Message Date
Jon Siwek
26bf99c5a3 Add parsing for GTPv1 extension headers and control messages.
Added a generic gtpv1_message event generated for any GTP message type.

Added specific events for the create/update/delete PDP context
request/response messages.

Addresses #934.
2013-02-07 14:59:02 -06:00
Seth Hall
f8be65ca56 Merge remote-tracking branch 'origin/master' into topic/seth/metrics-merge 2013-02-07 10:01:13 -05:00
Seth Hall
e974950c6d Correctly handle DNS lookups for software version ranges. 2013-02-06 13:59:17 -05:00
Seth Hall
ff3ec04f32 Improvements to vulnerable software detection.
- Add a DNS based updating method.  This needs to be tested still.

 - Vulnerable version ranges are used now instead
   of only single versions.  This can deal with
   software with multiple stable major versions.
2013-02-06 13:59:12 -05:00
Seth Hall
ad9e2a143c Update software version parsing and comparison to account for a third numeric subversion.
- $addl is also compared numerically now if the value is actually numeric.
2013-02-06 13:59:05 -05:00
Seth Hall
a2556642e6 Merge remote-tracking branch 'origin/topic/matthias/notary'
* origin/topic/matthias/notary:
  Small cosmetic changes.
  Give log buffer the correct name.
  Simplify delayed logging of SSL records.
  Implement delay-token style SSL logging.
  More style tweaks: replace spaces with tabs.
  Factor notary code into separte file.
  Adhere to Bro coding style guidelines.
  Enhance ssl.log with information from notary.

Closes #928
2013-02-05 02:06:33 -05:00
Robin Sommer
10d91fd1eb Merge remote-tracking branch 'origin/topic/bernhard/input-tests-exit-after-terminate'
* origin/topic/bernhard/input-tests-exit-after-terminate:
  update input tests to use exit_only_after_terminate
2013-02-04 09:46:01 -08:00
Robin Sommer
52f52f60a5 Merge branch 'topic/robin/exit-after-terminate'
* topic/robin/exit-after-terminate:
  Updating submodule(s).
  Fixing exit-after-terminate when used with bare mode.
  New option exit_only_after_terminate to prevent Bro from exiting.
2013-02-04 09:44:33 -08:00
Bernhard Amann
dd24d7af83 update input tests to use exit_only_after_terminate 2013-02-01 15:45:21 -08:00
Bernhard Amann
d4289b3313 Merge remote-tracking branch 'origin/topic/robin/exit-after-terminate' into topic/bernhard/input-tests-exit-after-terminate 2013-02-01 15:14:49 -08:00
Robin Sommer
d3814594ff Updating submodule(s).
[nomail]
2013-02-01 08:03:18 -08:00
Robin Sommer
01c2bf4e0e Updating submodule(s).
[nomail]
2013-01-30 20:10:36 -08:00
Robin Sommer
b08bdbce46 Updating submodule(s).
[nomail]
2013-01-30 20:09:19 -08:00
Robin Sommer
8c807d19c3 Fixing exit-after-terminate when used with bare mode. 2013-01-30 20:08:36 -08:00
Bernhard Amann
e80d28c9ef Merge branch 'topic/robin/exit-after-terminate' into topic/bernhard/input-tests-exit-after-terminate 2013-01-30 16:34:37 -08:00
Robin Sommer
f6c8995fd2 Merge remote-tracking branch 'origin/topic/jsiwek/record-coerce-orphans'
* origin/topic/jsiwek/record-coerce-orphans:
  Add an error for record coercions that would orphan a field.

Closes #936.
2013-01-25 13:53:12 -08:00
Robin Sommer
b9518f4329 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix runaway reference counting bug in record coercion.
  Fix memory leak in some reporter messaging cases.
2013-01-25 13:51:16 -08:00
Jon Siwek
7d3b20d4fb Fix runaway reference counting bug in record coercion.
The RecordVal ctor refs the type arg via the MutableVal -> Val ctors,
so this line was double incrementing the type's ref count, but could
only decrement it once upon the Val's destruction.
2013-01-25 11:57:21 -06:00
Jon Siwek
b72fbaf99f Fix memory leak in some reporter messaging cases.
Related to the changes in fdd11428.
2013-01-24 10:26:54 -06:00
Jon Siwek
69afc4a882 Add an error for record coercions that would orphan a field.
These cases should be avoidable by fixing scripts where they occur and
they can also help catch typos that would lead to unintentional runtime
behavior.

Adding this already revealed several scripts where a field in an inlined
record was never removed after a code refactor.
2013-01-24 09:56:19 -06:00
Robin Sommer
ed165f22a2 Making a test portable. 2013-01-23 19:43:52 -08:00
Robin Sommer
b6c71f5390 Updating submodule(s).
[nomail]
2013-01-23 18:11:49 -08:00
Robin Sommer
762c034ec2 Merge remote-tracking branch 'origin/topic/bernhard/input-logging-commmon-functions'
* origin/topic/bernhard/input-logging-commmon-functions:
  add the last of Robins suggestions (separate info-struct for constructors).
  port memory leak fix from master
  harmonize function naming
  move AsciiInputOutput over to threading
  and thinking about it, ascii-io doesn't need the separator
  change constructors
  and factor stuff out the input framework too.
  factor out ascii input/output.
  std::string accessors to escape_sequence functionality
  intermediate commit - it has been over a month since I touched this...

I cleaned up the AsciiInputOutput class somewhat, including renaming
it to AsciiFormatter, renaming some of its methods, and turning the
static methods into members for consistency.

Closes #929.
2013-01-23 16:51:54 -08:00
Robin Sommer
c780bfdb48 Merge remote-tracking branch 'origin/topic/jsiwek/ticket-932'
* origin/topic/jsiwek/ticket-932:
  Fix uninitialized locals in event/hook handlers from having a value.

Closes #932.
2013-01-23 15:17:55 -08:00
Robin Sommer
854891930d Merge remote-tracking branch 'origin/topic/jsiwek/ticket-930'
* origin/topic/jsiwek/ticket-930:
  Add a null value check in CompositeHash::ComputeHash.
  Change reporter messages to more reliably print to stderr.

Closes #930.
2013-01-23 14:48:25 -08:00
Robin Sommer
0541c49a50 Changing btest call to use "-j" instead of "-j 5". 2013-01-23 14:44:10 -08:00
Robin Sommer
c9412c4271 Updating submodule(s).
[nomail]
2013-01-23 14:43:12 -08:00
Robin Sommer
dcd675280e Merge remote-tracking branch 'origin/topic/jsiwek/no-switch-fallthrough'
* origin/topic/jsiwek/no-switch-fallthrough:
  Add "fallthrough" keyword, require a flow statement to end case blocks.
  Disable automatic case fallthrough in switch stmts.  Addresses #754.

I've added a test for the error case where no break/fallthrough/return
is given.

Closes #754.
2013-01-23 14:41:23 -08:00
Robin Sommer
4f39470c1b New option exit_only_after_terminate to prevent Bro from exiting.
If set, the main loop won't terminate before somebody calls
terminate().

This should make input framework testing more reliable I'd hope.
2013-01-18 17:34:33 -08:00
Robin Sommer
fdf79196c6 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fixing variable size issues (was uint, should be long) with http response code.
  Revert "Trick for parallelizing input framework unit tests."
  add opaque type-ignoring for the accept_unsupported_types input framework option.
2013-01-18 17:19:40 -08:00
Gilbert Clark
a712488cd6 Merge branch 'fastpath' of ssh://git.bro-ids.org/bro into fastpath 2013-01-18 14:34:00 -05:00
Gilbert Clark
cce73a3aad Fixing variable size issues (was uint, should be long) with http response code. 2013-01-18 14:23:34 -05:00
Gilbert Clark
0a7e0cc7d5 Merge branch 'master' into fastpath 2013-01-18 14:16:37 -05:00
Jon Siwek
acafcfafd2 Revert "Trick for parallelizing input framework unit tests."
This reverts commit 43ed437daa.

The old way of doing the tests seems more reliable for now.
2013-01-18 13:15:34 -06:00
Jon Siwek
3b73862ffb Merge branch 'master' into fastpath 2013-01-18 13:08:20 -06:00
Jon Siwek
624980b98d Add a null value check in CompositeHash::ComputeHash.
Because I guess aborting is nicer than segfaulting.

Addresses #930.
2013-01-18 12:56:23 -06:00
Jon Siwek
fdd11428c1 Change reporter messages to more reliably print to stderr.
Moved this functionality to be internal instead of in the script-layer
event handlers.  The issue with the later is that bad things can happen
between the time a reporter event handler is dispatched and the time it
is executed, and if bro crashes in that time, the message may never be
seen/logged.

Addressed #930 (and revisits #836).
2013-01-18 12:46:00 -06:00
Robin Sommer
2823744ea5 Removing unused class member. 2013-01-17 17:40:34 -08:00
Jon Siwek
0a69b87f03 Fix uninitialized locals in event/hook handlers from having a value.
Since values for local variables are referenced by offset within a Frame
(not by identifier name), and event/hook handler bodies share a common
Frame, the value offsets for local variables in different handlers may
overlap.  This meant locals in a handler without an initialization may
actually end up referring to the value of a previous handler's local
that has the same Frame offset.  When executing the body, that can
possibly result in a type-conflict error or give give unexpected
results instead of a "use of uninitialized value" error.

This patch makes it so uninitialized locals do always refer to a null
value before executing the body of a event/hook handler, so that using
them without assigning a value within the body will connsistently give
a "use of uninitialized value" error.

Addresses #932.
2013-01-17 15:21:50 -06:00
Jon Siwek
be71a42f4c Add "fallthrough" keyword, require a flow statement to end case blocks.
Case blocks in switch statements now must end in a break, return, or
fallthrough statement to give best mix of safety, readability, and
flexibility.

The new fallthrough keyword explicitly allows control to be passed to the
next case block in a switch statement.

Addresses #754.
2013-01-16 16:37:50 -06:00
Bernhard Amann
f7679a3d50 add opaque type-ignoring for the accept_unsupported_types input framework option.
Allows reading of records that contain &optional opaque-entries when
accept_unsupported_types=T
2013-01-15 15:03:20 -08:00
Matthias Vallentin
a635f96518 Small cosmetic changes. 2013-01-15 14:56:02 -08:00
Bernhard Amann
e2e22a707b add the last of Robins suggestions (separate info-struct for constructors).
This took a while.
2013-01-12 14:39:00 -08:00
Bernhard Amann
253b8201e8 port memory leak fix from master 2013-01-11 10:01:47 -08:00
Bernhard Amann
1b0bb5063a Merge remote-tracking branch 'origin/master' into topic/bernhard/input-logging-commmon-functions
Conflicts:
	src/input/readers/Ascii.cc
2013-01-11 09:48:53 -08:00
Jon Siwek
8695053e27 Disable automatic case fallthrough in switch stmts. Addresses #754.
Case bodies now don't require a "break" statement to prevent fallthrough
to case bodies below.  Empty case bodies generate an error message at
parse-time to help indicate the absence of automatic fallthrough; to
associate multiple values with a case, use "case 1, 2:" instead of
"case 1: case 2:".
2013-01-11 11:43:15 -06:00
Robin Sommer
564e27abb6 Merge remote-tracking branch 'origin/topic/jsiwek/string-indexing'
* origin/topic/jsiwek/string-indexing:
  Change substring index notation to use a colon (addresses #422).

Tweaked slightly to make it more generic, we may index other types
with slices eventually too.

Closes #422.
2013-01-08 10:20:12 -08:00
Jon Siwek
8b46bbb1c0 Change substring index notation to use a colon (addresses #422).
String slice notation is written as `s[1:2]` instead of `s[1, 2]`
because the later is ambiguous with composite index types.
2013-01-07 13:29:05 -06:00
Robin Sommer
e638f04301 Updating submodule(s).
[nomail]
2013-01-07 09:47:09 -08:00
Robin Sommer
4488dce493 Merge remote-tracking branch 'origin/fastpath'
* origin/fastpath:
  Fix memory leak in OpaqueType::DoUnserialize.
2013-01-07 09:43:56 -08:00