Commit Graph

11701 Commits (3fdfec860fdd30b56cb6d37a4752fa794870d385)
 

Author SHA1 Message Date
Victor Julien 3fdfec860f version: start 7.0.0 development 4 years ago
Victor Julien e860b9eee9 version: set to 6.0.1 4 years ago
Victor Julien 1d84f72a65 changelog: update for 6.0.1 4 years ago
Philippe Antoine 8c4e53e803 dnp3: regenerates C code with script 4 years ago
Philippe Antoine 15980af7de dnp3: avoids DOS by too long loop over null-sized objects 4 years ago
Philippe Antoine 5749024e3f dnp3: fix memory leak with object containing bytearrays 4 years ago
Philippe Antoine 001350547a dnp3: fix signed integer overflow
By using unsigned integers everywhere
4 years ago
Shivani Bhardwaj ea0936199d output: use BASE64_BUFFER_SIZE macro
Base64Encode function requires the maximum length of the output string
as its last parameter. Use the macro BASE64_BUFFER_SIZE to calculate it
correctly.
4 years ago
Shivani Bhardwaj b0a6ed1e2a datasets/string: fix buffer overflow
The size of encoded_data array and the maximum output length parameter
to Base64Encode function were incorrect leading to buffer overflow for
certain cases. The algorithm requires at least 5 bytes of space to even
convert a string of length 1.

Use BASE64_BUFFER_SIZE macro to correctly calculate this output length.
Set size of encoded_data array to the calculated output length.
4 years ago
Shivani Bhardwaj 02942a123a util/crypt: Add macro for max base64encode len
Maximum length of a base64 encoded string can be 33% over the actual
length of the input string. The formula to best cover all the edge cases
is mathematically
(4 * (input_length + 2) / 3) + 1

Add a macro to calculate this for a given input length.
4 years ago
Philippe Antoine 057c4b34c8 ftp: optimize FTPGetOldestTx by starting from last handled tx
Avoids DOS by quadratic complexity algorithm.
Attack is
1 stack many requests/transactions (like cwd commands on a line)
2 get many answers
4 years ago
Philippe Antoine f574663352 http2: files inspection API fixes
uses right transaction id for file tracker
uses FILE_USE_DETECT for good matches with keyword startswith
4 years ago
Philippe Antoine a63ee5adbd http2: allow multiple size updates in one headers batch
cf RFC 7541 section 4.2
4 years ago
Victor Julien a8fc481cd3 http2: avoid null pointer deref in alert output
Bug #4120.
4 years ago
Philippe Antoine 096dce4bba http2: allow filestore to work with HTTP2 4 years ago
Philippe Antoine d5ac77ee8b packet: set length of 0 for too big copy 4 years ago
Philippe Antoine 6d2247391e ssl: improves keyword ssl_version parsing
Removes the use of PCRE for performance
Forbids empty negations after a valid pattern
Forbids mixing negative and positive forms as it is irrelevant
Forbids useless repetition of a version
4 years ago
Philippe Antoine 6181459086 smb: do not rely on one valid NBSS byte for probing
Need to have the SMB header so as to validate
4 years ago
Philippe Antoine 48f0c612e3 ssl: upgarde to uint32 for bytes_processed
as it can overflow, and is compared with uint32 such as
message_length and message_start and
4 years ago
Philippe Antoine 445e03d752 detect: null sanity checks for pkthdr
Even when the rules are only applied on traffic with the protocol
the structure for the protocol header can be set to NULL if there
was an error parsing the header
4 years ago
Victor Julien f5af8864f7 configure: require libhtp 0.5.36 4 years ago
Philippe Antoine 4e242645be doc: explicit header normalization further
And their concatenation as described in RFC 2616
4 years ago
Victor Julien 3ea33f5e47 github-ci: CentOS 6 is EOL 4 years ago
Philippe Antoine 6b30890de9 doc: http.uri.raw has no spaces
as they are in the protocol

cf bug #2881
4 years ago
Jason Ish f3c59ef8a6 rust: handle windows naming change from .lib to .a
Prior to Rust 1.44, Cargo would name static libs with the .lib
extension. 1.44 changes this extension to .a when running under
a GNU environment on Windows like msys to make it more similar
to other unix environments.

Now assume static library name to be the same on Windows and
unix, but rename the .lib if found to still support older
versions of Rust on Windows.
4 years ago
Jason Ish 10f639e9d1 configure/mingw: move libs in LDFLAGS to LDADD
Moving the libs specified in LDFLAGS to LDADD put them into the
correct placement on in the link command.
4 years ago
Philippe Antoine 466466883b rust: do not rebuild stdlib when coverage is enabled
Because both seem incompatible for now
4 years ago
Philippe Antoine 33905b0910 fuzz: check PacketCopyData return value before processing packet 4 years ago
Philippe Antoine 18d8164a27 fuzz: limit memcap for datasets when fuzzing 4 years ago
Philippe Antoine 65e232669c dnp3: better limit for tests when fuzzing 4 years ago
Philippe Antoine 80dc6c6f1e fuzz: improves detect proto target
By mimicking assert message so as to clusterfuzz differentiates
between failures
4 years ago
Victor Julien 4664444067 detect: fix inspection order with stateful rules
When stateful detection rules, for which detection has already started
for a previous packet, are added to the candidates array, the array
is sorted to mantain the correct inspection order. However, due to a
trivial error in the sort helper the array was sorted in descending
instead of ascending order.
4 years ago
Victor Julien ba781265a4 dcerpc/udp: fix transaction handling and logging
Implement missing transaction handling.

Fix logging wrongly casting 'state' to DCERPCState instead of
DCERPCUDPState leading to crashes and malformed output.

Remove unused fields from DCERPCUDPState.
4 years ago
Victor Julien e7b5201016 detect/mpm: remove usused cleanup function 4 years ago
Victor Julien e799357d9f detect: optimize prefilter result handling 4 years ago
Victor Julien ffb0945b4c detect/prefilter: small cleanup 4 years ago
Jason Ish bb7f80ef6c github-ci: check for duplicate SIDs in rules/ 4 years ago
Jason Ish 8bd68478a4 rules/mqtt: renumber mqtt events to avoid conflict with ssh
Both SSH and MQTT events were in the 2228000 range. As SSH was
added first, renumber MQTT events into the 2229000 range which is
free.
4 years ago
Philippe Antoine 8db78208f9 rust: fix warnings found by nightly compiler
warning: getting the inner pointer of a temporary `CString`
this `CString` is deallocated at the end of the statement,
bind it to a variable to extend its lifetime
4 years ago
Victor Julien 14aacbd067 decode/null: fix type parsing 4 years ago
Victor Julien 8d0b0e8739 atomics: fix compilation on ppc64 4 years ago
Jason Ish 76e011a5ba dnp3: set byte order when logging dnp3 src and dst
DNP3 uses little endian on the wire, for the most part this
is handled as the messages are deserialize. However, the link
header is a cast over raw data, so swap these bytes as they
are being logged.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4173
4 years ago
Victor Julien 75c0f9bd0a github-ci: windows in builds 4 years ago
Victor Julien 7b4ac8dbab doc/userguide: update http keywords 4 years ago
Victor Julien ca47d75c80 doc/userguide: explain --strict-rule-keywords 4 years ago
Philippe Antoine 65711f6bc2 app-layer: do not try to parse gaps during protocol change
As this will leak the flow alstate because AppLayerParserParse
relies on FlowChangeProto to know if it should allocate a new
alstate
4 years ago
Philippe Antoine 89ae1a0036 detect: apply transforms to http body 4 years ago
Philippe Antoine dfadd03b6f ci: updates github ci add-path mechanism 4 years ago
Danny Browning ac37fd5e29 tools: bash from env
Use of hardcoded bash prevents users from using an upgraded bash which may
live in a different location. This behavior is often seen on OSX systems.

Utilize env to find the preferred bash to call for scripts.
4 years ago
Jason Ish 2f81f3fbe9 rust/log: clarify comment in non-debug mode SCLogDebug 4 years ago