Commit Graph

6796 Commits (6d7b4c81e3e2dd79bbb933f21c16b7f0d8a660c5)
 

Author SHA1 Message Date
Mats Klepsland 45342078e4 tlsstore: fix memleak
Bug #1771.

Direct leak of 1834 byte(s) in 1 object(s) allocated from:
    #0 0x4e2e65 in realloc ??:?
    #1 0xcec27b in LogTlsLogPem /home/mats/suricata/src/log-tlsstore.c:130
    #2 0xcea4f5 in LogTlsStoreLogger /home/mats/suricata/src/log-tlsstore.c:303
    #3 0xd8b99c in OutputPacketLog /home/mats/suricata/src/output-packet.c:104
9 years ago
Mats Klepsland ed33f5f148 tlsstore: use TxLogger 9 years ago
Mats Klepsland 77cc03505b output: add new tx logger to log at certain condition
Some loggers needs certain conditions to be met before logging.
This enables us to use conditions on the tx logger.
9 years ago
Mats Klepsland 663273a31e tls: change flag checking in SSLParserTest23
Change flag checking in SSLParserTest23 to check each flag individually
to enable adding more flags without the test failing.
9 years ago
Mats Klepsland 47a4daeeb8 output: allow more than one TLS logger 9 years ago
Mats Klepsland e9074bc829 jsontls: use TxLogger 9 years ago
Mats Klepsland c6a61e009b tlslog: use TxLogger 9 years ago
Mats Klepsland 88bf866381 output-lua: use LuaTxLogger for TLS 9 years ago
Mats Klepsland fa6257b66a output: add new logger to log at specified state
Sometimes we want to log when we reach a specified state instead of
waiting for the session to end. E.g for TLS we want to log as soon
as the handshake is done.

To do this, a new logger is added, where it is possible to specify
a custom "ProgressCompletionStatus".
9 years ago
Mats Klepsland 4166ec3064 template: register logger functions 9 years ago
Mats Klepsland 593f81527a modbus: register logger functions 9 years ago
Mats Klepsland c52fe9a5fa http: register logger functions 9 years ago
Mats Klepsland d484812d05 smtp: register logger functions 9 years ago
Mats Klepsland dacb860d24 dns: register logger functions 9 years ago
Mats Klepsland 1f98915ebe tls: register logger functions 9 years ago
Mats Klepsland f3599323e4 tx: add functions for logging
Add function AppLayerParserRegisterLoggerFuncs for registering
a callback function for checking if a specific logger has logged
a transaction, and a callback function for specifying that it has.

Also add functions AppLayerParserGetTxLogged and
AppLayerParserSetTxLogged to invoke these callback functions.
9 years ago
Mats Klepsland c4b918b6c4 tx: do not store ProgressCompletionStatus per ipproto
Change AppLayerParserRegisterGetStateProgressCompletionStatus to
only store one ProgressCompletionStatus callback function for each
alproto, instead of storing one for each ipproto.

This enables us to use AppLayerParserGetStateProgressCompletionStatus
in functions where we do not know the ipproto used.
9 years ago
Mats Klepsland e4f03b18ba tls: make TX aware 9 years ago
Mats Klepsland a422ae9f3c tls-sni: fix alignment issues 9 years ago
Victor Julien 8dc477f85a sources: fix netmap compilation and pcap setup 9 years ago
Victor Julien be714a2f02 flow queue handler: use int16_t
Use int16_t instead of int to store the autofp queue id. We should
not easily get to 32k threads so 2 bytes per flow is sufficient.
9 years ago
Victor Julien ba64069b35 flow: remove unused debug code 9 years ago
Victor Julien 2c7cd1c22a flowint: redo tests 9 years ago
Victor Julien 3a36dea358 detect: add missing sigorder case 9 years ago
DIALLO David 271bd04539 modbus: fix AddressSanitizer error (segmentation fault)
In case of Mask Write register or Write single register request with
no data (malformed packet), app-layer-modbus checks response content
(data) with the none stored request content. That causes the segmentation
fault.

Before accessing to request content, app-layer-modbus checks now if
content has been previously stored. 4 unitests have been adding, 2 of them
to test the management of Mask Write register and Write single register requests,
and the 2 others to check invalid Mask Write register and Write single register
requests.
9 years ago
Victor Julien 79c1904ab2 ipv6: fix alignment issue in address to string code 9 years ago
Victor Julien 3979cb0e57 ac-ks: fix integer handling issue 9 years ago
Victor Julien 8db7b70e93 unittests: don't call memcpy on NULL-ptr 9 years ago
Victor Julien 4875040dca pcre: initialize var before use 9 years ago
Victor Julien e13f956100 yaml: minor cleanup 9 years ago
Victor Julien 542492d6c2 yaml: initialize var to prevent uninitialized read 9 years ago
Victor Julien d79208d93b tcp sack: fix alignment issues 9 years ago
Victor Julien 055f8bea10 smb: improve integer handling 9 years ago
Victor Julien ed5a01e8dd dcerpc: improve integer handling 9 years ago
Victor Julien 9235dd498f detect port: fix integer handling in hashing 9 years ago
Victor Julien 001e87310d decode: don't call memcpy on NULL-ptr on pseudo packets 9 years ago
Victor Julien 35d081a797 ippair: fix alignment issues 9 years ago
Victor Julien 31b632a17d host: fix alignment issues 9 years ago
Victor Julien b112af817d flow: fix alignment issues 9 years ago
Victor Julien 76c8c077c5 tcp: fix alignment issues with tcp timestamps 9 years ago
Victor Julien c64815e4a8 decode-mime: don't call memcpy on NULL pointer 9 years ago
Jason Ish aa8e747e4d sources: allow interface definitions to be reordered
For af-packet, pf-ring, netmap, and pcap use a generic
lookup function to find the configuration node for an
interface.

The new lookup function does not depend on the ordering
of the items inside the device configuration.
9 years ago
Eric Leblond e29e9056cb config-test: fix memory leak detect by ASAN
NSS library was not deinit at exit resulting in memory leak. As
it is useless for a config test, the patch updates the code so it
is not initialized.

Patch also calls MagicDeinit to free memory used by libmagic.
9 years ago
maxtors bf551ace4e Use ConfValIsTrue for parseing util-logfile append value. 9 years ago
maxtors 3c15c1f8d5 Use ConfValIsTrue for parsing TILE PCIE logging append value. 9 years ago
maxtors a81796654f Use ConfValIs* for parsing pf-ring.checksum-checks. 9 years ago
maxtors 70b864d06b Use ConfValIs* for parsing pcap.checksum-checks. 9 years ago
maxtors b28ebae088 Use ConfValIs* for parsing netmap.checksum-checks. 9 years ago
maxtors d18e2f6e9a Use ConfValIs* for parsing af-packet.checksum-checks. 9 years ago
maxtors 3d4cdd1117 Use ConfValIs* for parseing mpipe.checksum-checks. 9 years ago