Commit graph

2860 commits

Author SHA1 Message Date
Jon Siwek
ec4df80c67 Improve error messages from to_addr and to_subnet BIFs
Related to GH-514
2019-08-01 10:49:03 -07:00
Jon Siwek
ee28e9e9f3 Merge remote-tracking branch 'origin/topic/seth/mqtt'
* origin/topic/seth/mqtt:
  Bug fixes and test baseline updates
  Fix an issue with bro_init -> zeek_init
  MQTT Analyzer heavily updated and ported from the analyzer originally by Supriya Kumar

Adjustments during merge:

* Minor whitespace cleanups
* Some bro to zeek renaming
* Fixed the parsing of unsubscribe messages to generate an event for each topic
2019-07-31 21:29:38 -07:00
Jon Siwek
09ea4ceb7e Rename a broxygen unit test to zeekygen 2019-07-31 14:25:22 -07:00
Jon Siwek
d1770853b3 Merge remote-tracking branch 'origin/topic/dev/non-ascii-logging'
* origin/topic/dev/non-ascii-logging:
  Removed Policy Script for UTF-8 Logs
  Commented out UTF-8 Script in Test All Policy
  Minor Style Tweak
  Use getNumBytesForUTF8 method to determine number of bytes
  Added Jon's test cases as unit tests
  Prioritizes escaping predefined Escape Sequences over Unescaping UTF-8 Sequences
  Added additional check to confirm anything unescaping is a multibyte UTF-8 sequence, addressing the test case Jon brought up
  Added optional script and redef bool to enable utf-8 in ASCII logs
  Initial Commit, removed std::isprint check to escape

Made minor code format and logic adjustments during merge.
2019-07-30 19:42:34 -07:00
Dev Bali
da5a0e800e Removed Policy Script for UTF-8 Logs 2019-07-30 11:19:06 -07:00
Jon Siwek
db9f81a890 Merge branch 'topic/jsbarber/rexmit-patch' of https://github.com/jsbarber/zeek
* 'topic/jsbarber/rexmit-patch' of https://github.com/jsbarber/zeek:
  Duplicate TCP segment should trigger tcp_multiple_retransmissions
2019-07-29 20:16:48 -07:00
Robin Sommer
13c373086d Merge remote-tracking branch 'origin/topic/zeke/closures' 2019-07-30 02:32:34 +00:00
Seth Hall
7bf856768a Bug fixes and test baseline updates
- ConnAckMsg return_code wasn't passed as a count on accident.
 - Some renaming items were missing due to the age of this code.
2019-07-29 15:12:11 -04:00
Seth Hall
a42b3a1d63 MQTT Analyzer heavily updated and ported from the analyzer originally by Supriya Kumar
This analyzer generates three logs to fully display what is happening over the MQTT connection.
  - mqtt_connect.log
  - mqtt_subscribe.log
  - mqtt_publish.log

At this time it only supports MQTT 3.1 and 3.1.1
2019-07-29 13:45:10 -04:00
Johanna Amann
95ce177682 Merge remote-tracking branch 'origin/topic/jsiwek/gh-488-new-versioning'
* origin/topic/jsiwek/gh-488-new-versioning:
  Add release branches to Travis CI whitelist
  GH-488: teach the Version module to parse new version scheme
2019-07-29 10:02:00 -07:00
Johanna Amann
02f19f7420 Merge remote-tracking branch 'origin/topic/jsiwek/gh-491-vector-of-enum-ctor'
* origin/topic/jsiwek/gh-491-vector-of-enum-ctor:
  Improve type inference for vector-of-enum constructor
2019-07-29 09:30:04 -07:00
Johanna Amann
486bf1e713 Merge remote-tracking branch 'origin/topic/timw/cleaner-utf8'
* origin/topic/timw/cleaner-utf8:
  GHI-486: Switch over to using LLVM utf8-checking code to better validate characters

I addressed a buffer over-read during the merge and added test-cases for
it.
2019-07-29 09:25:25 -07:00
Jeff Barber
4336de6651 Duplicate TCP segment should trigger tcp_multiple_retransmissions 2019-07-28 15:15:40 -06:00
Jon Siwek
8cf9c41c12 GH-485: fix cases where DHCP log omits MAC field
The field is populated in this order of preference:

  (1) Use a client-identifier option sent by client
  (2) Use the server's CHADDR field
  (3) Use the client's CHADDR field

Case (3) did not exist before this patch.
2019-07-26 20:05:15 -07:00
Jon Siwek
70aa886806 Improve type inference for vector-of-enum constructor 2019-07-25 23:27:47 -07:00
Jon Siwek
94d470c158 GH-488: teach the Version module to parse new version scheme
Such as the new -rc format for release candidates (replacing "beta") and
-dev.X for development versions in the master branch.
2019-07-25 23:05:06 -07:00
Zeke Medley
dc6a849cf5 add a leak test 2019-07-25 13:18:53 -07:00
Zeke Medley
e6464dae79 fix bug in serialization test 2019-07-25 11:53:16 -07:00
Zeke Medley
bdc8e0e6c4 Merge branch 'master' of https://github.com/zeek/zeek into topic/robin/closures-merge 2019-07-25 11:23:40 -07:00
Zeke Medley
cef94832f1 Frame merge and cleanup for merge. 2019-07-25 11:19:17 -07:00
Tim Wojtulewicz
ad19f1e1bb GHI-486: Switch over to using LLVM utf8-checking code to better validate characters 2019-07-24 10:58:00 -07:00
Dev Bali
6fcb23066d Added Jon's test cases as unit tests 2019-07-23 11:59:33 -07:00
Dev Bali
66557d3178 Added optional script and redef bool to enable utf-8 in ASCII logs 2019-07-23 11:59:33 -07:00
Jon Siwek
9698d8d7cc Remove --disable-perftools from coverity builds 2019-07-23 09:38:16 -07:00
Johanna Amann
3159577821 Merge remote-tracking branch 'origin/topic/zeke/expire-func'
* origin/topic/zeke/expire-func:
  Ignore abs-path in test.
  Report argument # type check failed on.
  Update test baseline.
  Improve func arg type checking.
  &expire_func(table, arg1, arg2, ...) + type checking.
2019-07-22 12:44:55 -07:00
Jon Siwek
07e0dba3c6 Add DPD::max_violations option
This allows one to tune the number of protocol violations to tolerate
from any given analyzer type before just disabling a given instance
of it.

Also removes the "disabled_aids" field from the DPD::Info record
since it serves no purpose: in this case, calling disable_analyzer
multiple times for the same analyzer is a no-op.
2019-07-19 13:00:02 -07:00
Jon Siwek
794748dda8 Add missing expr_name: vector_coerce 2019-07-18 19:39:16 -07:00
Zeke Medley
63a3f4e5bc Ignore abs-path in test. 2019-07-18 16:30:42 -07:00
Zeke Medley
d3574d231b Update test baseline. 2019-07-18 14:06:34 -07:00
Zeke Medley
0ca6b3e013 &expire_func(table, arg1, arg2, ...) + type checking. 2019-07-18 12:11:27 -07:00
Zeke Medley
1692be4c2d Fix bug in selective cloning. 2019-07-16 15:15:05 -07:00
Jon Siwek
db5b73cb8a Fix ref-counting bug in EnumType copy ctor
Which was used by the new ShallowClone method and causes multiple enum
declarations/definitions to now crash.  Such code is not typically
seen in scripts, but being able to define an enum in both .bif and
.bro files has historically been supported.
2019-07-15 12:42:56 -07:00
Jon Siwek
50e4da74cf Fix canonification of timestamps with a decisecond multiple
Unit tests sometimes use current_time(), which occassionally lands on
a perfect tenth of a second and end up fooling the old canonification
regexp and resulting in output which differs from what's in the
test baseline.
2019-07-12 18:24:56 -07:00
Zeke Medley
ef75092875 Use BROKER_PORT. 2019-07-12 16:00:12 -07:00
Zeke Medley
db8379edc2 Update baseline to reflect new anonymous function naming. 2019-07-12 14:07:57 -07:00
Zeke Medley
8d9355eb51 Merge branch 'master' of https://github.com/zeek/zeek into topic/zeke/closures 2019-07-12 10:33:43 -07:00
Zeke Medley
f0798c4b49 Allow serialization of closures over Broker.
anonymous-functions, their closures, can now be sent over broker.
In order to send an anonymous function the receiver must have parsed
a definition of the functon, but it need not to have been evaluated.
See testing/btest/language/closure-sending.zeek for an example of how
this can be done.

This also sends their closures as well as the closures of regular
functions.
2019-07-12 10:31:40 -07:00
Tim Wojtulewicz
ec4913ac18 GH-157: Mark some attributes as not allowed for global variables 2019-07-11 13:34:39 -07:00
Johanna Amann
1f329ad541 Merge remote-tracking branch 'origin/topic/timw/150-to-json'
* origin/topic/timw/150-to-json:
  Update submodules for JSON work
  Update unit tests for JSON logger to match new output
  Modify JSON log writer to use the external JSON library
  Update unit test output to match json.zeek being deprecated and slight format changes to JSON output
  Add proper JSON serialization via C++, deprecate json.zeek
  Add new method for escaping UTF8 strings for JSON output
  Move do_sub method from zeek.bif to StringVal class method
  Move record_fields method from zeek.bif to Val class method
  Add ToStdString method for StringVal
2019-07-11 11:17:32 -07:00
Jon Siwek
002109973d Improve stability of a unit test 2019-07-03 13:04:57 -07:00
Jon Siwek
c5c688054c Merge remote-tracking branch 'origin/topic/johanna/gh-446-rfb'
* origin/topic/johanna/gh-446-rfb:
  Deprecate rfb_event.
2019-07-03 09:36:12 -07:00
Tim Wojtulewicz
d732fb4d4b Update unit tests for JSON logger to match new output 2019-07-02 13:14:52 -07:00
Tim Wojtulewicz
d27c846ec5 Update unit test output to match json.zeek being deprecated and slight format changes to JSON output 2019-07-02 13:14:52 -07:00
Zeke Medley
6e84a5eb8e Merge branch 'master' of https://github.com/zeek/zeek into topic/zeke/closures 2019-07-01 13:43:48 -07:00
Zeke Medley
409f27955b Call parent constructor from LambdaExpr. 2019-07-01 13:36:28 -07:00
Johanna Amann
3cdda7647f Merge remote-tracking branch 'origin/topic/jsiwek/gh-443-fix-timestamp-0-logs'
* origin/topic/jsiwek/gh-443-fix-timestamp-0-logs:
  GH-443: fix uses of timestamp 0 in cluster diagnostic logs
2019-07-01 01:29:41 -07:00
Johanna Amann
1ebd3adf20 Merge remote-tracking branch 'origin/topic/jsiwek/gh-243-wrap-up-deprecation-removal'
* origin/topic/jsiwek/gh-243-wrap-up-deprecation-removal:
  Improve deprecation warning messages
  Remove deprecated DNS events
  Remove BackDoor analyzer
  Remove InterConn analyzer
  Remove deprecated/unused irc_servers option
  Remove deprecated print_hook event
  Remove dead code: dump_used_event_handlers
  Remove unused software_version_found events
  Remove deprecated open_log_file and log_file_name functions
  Remove deprecated/unused "packet" type
  Un-deprecate anonymizer BIFs
  Un-deprecate file rotation functions
2019-07-01 01:14:29 -07:00
Zeke Medley
f47390f66a Merge branch 'master' of https://github.com/zeek/zeek into topic/zeke/closures 2019-06-28 16:22:18 -07:00
Seth Hall
9795782ecb
Merge pull request #324 from zeek/topic/jsiwek/gh-320
Improve RFB (VNC) protocol parsing
2019-06-28 17:27:16 -04:00
Jon Siwek
bc77b65b0a Merge remote-tracking branch 'origin/topic/johanna/gh-214-notice-on-workers'
* origin/topic/johanna/gh-214-notice-on-workers:
  Change notices to be processed on worker.

Fixes GH-214
2019-06-28 11:51:04 -07:00