Commit Graph

6975 Commits (suricata-3.1.3)
 

Author SHA1 Message Date
Andreas Herz e1468107e5 nfqueue: fix wrong return value check in error cases
The check for the return value was wrong, we have 0 for success and 1
(and 2) for the error cases like TM_ECODE_FAILED, so we should quit
unless TM_ECODE_OK (0) is returned for NFQInitThread. This fixes #1870
10 years ago
DIALLO David 3a3cc43f6a modbus: fix compiler uninitialized warnings with -Wmaybe-uninitialized
All variables are initialized thanks to ModbusExtractUint8 or ModbusExtractUint16
function that extracts 8bits or 16bits data from pointer the received input data.
In case of extracting error (because of length), ModbusExtractUint8 or
ModbusExtractUint16 returns an error that is managed by the caller function.

All variables are now initialized to zero when they are declared. It does not
change anything functionnally but it removes Modbus warnings.
10 years ago
Victor Julien 3a6b7a1cd6 make install-rules: update URL to https and 3.0 10 years ago
Victor Julien fde7a2f656 cuda: fix compilation 10 years ago
Victor Julien c12044c6c5 cuda: update build system for modern versions
Remove support for compute capabilities below 2.0.

Add capabilities until 5.3.
10 years ago
Eric Leblond cb66db5ef2 xff: fix address overwrite in forward case 10 years ago
Tom DeCanio 4db3a0f0b4 output-json-alert: fix segfault when alerts separated out from eve-log. 10 years ago
Tom DeCanio f7c568d1b2 output-json-http: Add JSON support for X-Flash-Version.
Supported as a custom field.
10 years ago
Tom DeCanio 5ccf6f30ea Add JSON support for X-Authenticated-User. Supported as a custom field. 10 years ago
Giuseppe Longo 7a29aa116e http: close file when http body limit is reached
In some conditions, if stream.reassembly.depth is greater than
request/response-body-limit size, the logging output is wrong
if filestore keyword is used with http.

For example, we get:
{... "app_proto":"http","fileinfo":{"filename":"\/file.pdf","state":"CLOSED","stored":false,"size":1049292,"tx_id":0}}

"state":"CLOSED","stored":false should be "state":"TRUNCATED","stored":true.

This happens because the file state and file flags,
which is the information that determine a correct output,
are not set properly since a file is logged before and then closed (HTPFileClose).

The logic of this patch is to close a file when we are above
the limits, such that the proper state and flags can be set
and the file will be logged correctly.
10 years ago
Victor Julien 609cdff540 json-drop-log: clean up memory at shutdown 10 years ago
Victor Julien 3c788a8c17 flowbits: remove unused debugging code 10 years ago
Victor Julien 53af48f021 flowbits: fix memory leak
Flowbits removed from a flow by 'toggle' or 'unset' were not actually
freed, leading a small memory leak.
10 years ago
Victor Julien 0dbbe016d6 flowbits: optimize set and remove 10 years ago
Andreas Herz c467c39b61 build-info: workaround special _FORTIFY_SOURCE defines
On systems like Gentoo where _FORTIFY_SOURCE is already defined like
FORTIFY_SOURCE=((defined __OPTIMIZE && OPTIMIZE > 0) ? 2 : 0) the use
within the printf function (%d) won't result in the correct value and
we end up with 'defined' undeclared compile error. This workaround makes
sure that just the resolved value is checked and then printed.
10 years ago
Victor Julien 154891cf26 pcre: work around harmless coverity warnings 10 years ago
Victor Julien 893b01ed0d bpf: fix memleak on unusual error (CID 1197757) 10 years ago
Victor Julien 6228f5f689 lua: if pkg-config fails, try -llua 10 years ago
Victor Julien 9858ae41be configure: OS X fixes
Remove unnecessary -lpthread from tests.

Make linker warnings non-fatal with -Werror.
10 years ago
Victor Julien b25bd2e180 http: fix NULL deref on certain out of memory conditions 10 years ago
Victor Julien 45812c32ad runmode: fix memleak on live modes setup (CID 1197760) 10 years ago
Victor Julien b9ee86fdb4 detect-engine: free memory in error conditions (CID 1351210) 10 years ago
Victor Julien 0dd81b85d4 multi-tenants: improve error handling (CID 1312702) 10 years ago
Victor Julien fb90358e17 conf: explicitly ignore retval (CID 1353490) 10 years ago
Victor Julien f5ce7549be unix-manager: fix memleak in error case (CID 1353491) 10 years ago
Victor Julien e51707be90 pcre: blacklist 8.35 for JIT use (issue #1693) 10 years ago
Victor Julien 3f3ed71fe7 jansson: cleanup JSON_ESCAPE_SLASH use 10 years ago
Victor Julien 654829f969 unix-socket: optimize response sends
Instead of sending responses to clients in small chunks, send it in
one big chunk. For this the JSON message is first serialized into
a MemBuffer before sending.
10 years ago
Victor Julien 40cf1f8ef7 json: make membuffer helper public
Make json_t to MemBuffer helper public so it can reused.
10 years ago
Victor Julien acaf8a84e8 stats: fix dump-counters when no loggers are active 10 years ago
Victor Julien 14030239f8 unix-socket: restore dump-counters functionality
Create a eve.stats like output for dump-counters.
10 years ago
Victor Julien 310e8fcbf8 stats: export StatsToJSON 10 years ago
Victor Julien ffdfb6a8f0 json-stats: split out json generation
Split out JSON generation logic so the code becomes reusable.
10 years ago
Victor Julien c446abeb47 jansson: include in suricata-common.h 10 years ago
Andreas Herz 8c0e575063 configure: warn if libpcre 8.35 is used 10 years ago
Travis Green 72c9debbd6 yaml: disable rules by default
Change to "disable by default" rulefiles
10 years ago
Tom DeCanio 8f059b2841 output-json-dns: add logging of NS answer record content. 10 years ago
Andreas Herz 09fe1c62d8 detect-tls-version: fix small resource leak 10 years ago
Jason Ish 3d2834a232 json: use top-level sensor-name if provided.
Currently the default configuration file contains a "sensor-name"
at the root of the configuration file, however, eve-log will only
use it if its specified under eve-log.

Now we will look for it at the eve-log, if present we'll use it
but log a deprecation warning, if its not present we'll look
for sensor-name at the root of the configuration.
10 years ago
Victor Julien 5f39728509 ssh: fix string handling in unittest 10 years ago
Victor Julien 9015fb5a7f travis: set CFLAGS to error on cc warnings 10 years ago
Victor Julien 8bb1cf08ef eve: fix mishandling of big messages
When the string representation of a JSON message grew bigger than
64k, the JSON record would just be truncated. This lead to errors
in the parser(s) of the JSON stream.

This patch changes the buffer logic to grow the buffer on demand.
10 years ago
Victor Julien 6c30f7bdbb counters: fix thread stats delta logging
Just like with the global stats, store prev values. Fixes delta logging.
10 years ago
Victor Julien 0138bf5605 qa: add leak sanitzer suppression 10 years ago
Victor Julien 1c3a0434ca wirefuzz: exit with error code on more issues 10 years ago
Victor Julien 9d49b828a6 wirefuzz: logdir handling improvement 10 years ago
Victor Julien 8626eccf58 wirefuzz: remove obsolete stream mem check 10 years ago
Victor Julien 048e538828 wirefuzz: add -N option to count complete passes 10 years ago
Victor Julien 7299388d05 wirefuzz: improve logfile cleanup 10 years ago
Victor Julien 3d0542405d wirefuzz: enforce -n option per run 10 years ago