]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Wed, 11 Jan 2023 20:07:16 +0000 (21:07 +0100)]
smb: fix post-trunc chunk behavior
After a gap in a file transaction, the file tracker is truncated. However
this did not clear any stored out of order chunks from memory or stop more
chunks to be stored, leading to accumulation of a large number of chunks.
This patches fixes this be clearing the stored chunks on trunc. It also
makes sure no more chunks are stored in the tracker after the trunc.
Bug: #5781.
Philippe Antoine [Mon, 16 Jan 2023 10:14:37 +0000 (11:14 +0100)]
fuzz: check libpcap timestamp consistency
That is microseconds should be positive
Philippe Antoine [Thu, 8 Dec 2022 09:06:40 +0000 (10:06 +0100)]
fuzz: fix use of uninitialized value
packet timestamp is not set when function returns error.
also use C positive modulo for microseconds
Philippe Antoine [Wed, 28 Dec 2022 14:57:12 +0000 (15:57 +0100)]
ftp: completely resets port_line
In the case port_line is first allocated and port_line_len is set,
Then a second request reaches memcap and frees port_line,
port_line_len should also be reset, because both will get used
by the response parsing.
Ticket: #5701
jason taylor [Mon, 9 Jan 2023 22:17:26 +0000 (22:17 +0000)]
userguide: update http.cookie description
Signed-off-by: jason taylor <jtfas90@gmail.com>
Victor Julien [Mon, 5 Sep 2022 08:56:19 +0000 (10:56 +0200)]
flow-worker: prune frames and stream for pseudo packets as well
Victor Julien [Mon, 5 Sep 2022 08:51:11 +0000 (10:51 +0200)]
debug: add pkt_src to detect/stream entry log
Victor Julien [Thu, 12 Jan 2023 14:13:43 +0000 (15:13 +0100)]
stream: add debug statements
Victor Julien [Tue, 13 Dec 2022 13:16:54 +0000 (14:16 +0100)]
stream: consider any uninspected data
Victor Julien [Tue, 13 Dec 2022 11:21:17 +0000 (12:21 +0100)]
stream: minor constification
Victor Julien [Thu, 5 Jan 2023 06:25:26 +0000 (07:25 +0100)]
streaming/sbb: fix debug message
Victor Julien [Wed, 4 Jan 2023 19:39:24 +0000 (20:39 +0100)]
stream: remove bug on from packet path
Victor Julien [Fri, 6 Jan 2023 13:50:34 +0000 (14:50 +0100)]
output: improve debug format by adding function name
Victor Julien [Tue, 17 Jan 2023 10:10:54 +0000 (11:10 +0100)]
src: fix deprecated-non-prototype compile warnings
Tested on Fedora 37 with clang 15.
util-strlcatu.c:45:8: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
size_t strlcat(dst, src, siz)
^
1 error generated.
Victor Julien [Mon, 16 Jan 2023 21:09:02 +0000 (22:09 +0100)]
src: fix unused-but-set-variable compile warnings
Tested on Fedora 37 with clang 15.
datasets.c:852:9: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable]
int n = 0;
^
1 error generated.
Victor Julien [Mon, 16 Jan 2023 18:14:28 +0000 (19:14 +0100)]
src: fix strict-prototype warnings
Tested on Fedora 37 with clang 15.
app-layer.c:1055:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
void AppLayerSetupCounters()
^
void
app-layer.c:1176:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
void AppLayerDeSetupCounters()
^
void
2 errors generated.
Philippe Antoine [Tue, 13 Dec 2022 08:52:43 +0000 (09:52 +0100)]
smb: configurable max number of transactions per flow
Ticket: #5753
Philippe Antoine [Tue, 13 Dec 2022 08:09:44 +0000 (09:09 +0100)]
smb: convert transaction list to vecdeque
Allows for more efficient removal from front of the list.
Ticket: #5753
Philippe Antoine [Fri, 4 Nov 2022 14:17:19 +0000 (15:17 +0100)]
detect/frames: fix crash when parsing bad rule
Indexing of Signature::init_data::smlists would fail for a rule that
used a frame and fast_pattern w/o content, as the array would only be
expanded when adding a content.
Adding a check to see if there list id is in bounds
is an implicit check for the "no content" case.
Ticket: #5530
dependabot[bot] [Thu, 22 Dec 2022 15:57:48 +0000 (15:57 +0000)]
github-actions: bump ossf/scorecard-action from 2.1.1 to 2.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/
15c10fcf1cf912bd22260bfec67569a359ab87da ...
e38b1902ae4f44df626f11ba0734b14fb91f8f86 )
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Jason Ish [Thu, 22 Dec 2022 16:12:35 +0000 (10:12 -0600)]
doc/userguide: update logging section for time formats
- Update fragment of configuration file to match suricata.yaml with
new default-log-format.
- Document new %z format specifier.
Jason Ish [Thu, 22 Dec 2022 16:05:15 +0000 (10:05 -0600)]
logging: use ISO-like timestamp in file log
Also update suricata.yaml to show this default, as updating the
"default-log-format" does not affect the file output.
Jason Ish [Thu, 22 Dec 2022 16:00:40 +0000 (10:00 -0600)]
suricata.yaml: update default-log-format current state
The default-log-format has changed, reflect this in the suricata.yaml.
Jason Ish [Thu, 22 Dec 2022 15:55:13 +0000 (09:55 -0600)]
logging: add new date format: YYYY-MM-DD HH:MM:SS
Adds a new logging format character, %z that uses a more standard time
format of "YYYY-MM-DD HH:MM:SS".
Ticket #5764
Philippe Antoine [Mon, 26 Dec 2022 16:51:09 +0000 (17:51 +0100)]
src: remove unneeded double colon
git grep ';;' src/ | grep -v for | cut -d: -f1 | uniq
| while read f; do sed -i -e 's/;;/;/' $f; done
Philippe Antoine [Mon, 26 Dec 2022 15:57:41 +0000 (16:57 +0100)]
smb: fix typo in comment
Philippe Antoine [Mon, 26 Dec 2022 15:57:19 +0000 (16:57 +0100)]
test: remove one duplicate line
Philippe Antoine [Mon, 26 Dec 2022 20:07:36 +0000 (21:07 +0100)]
flow: complete stats for app_layer protocol counters
In the case of a gap, or in the case of a flow where one side
is recognized, but the other is not before the end, we still
increase the counters to have consistency between
jq 'select(.event_type=="flow" and .app_proto=="ftp") | .app_proto' log/eve.json | wc -l
jq 'select(.event_type=="stats") | .stats."app_layer".flow.ftp' log/eve.json
Ticket: #5769
Haleema Khan [Wed, 28 Dec 2022 19:00:28 +0000 (00:00 +0500)]
mqtt: rustfmt parser.rs
Haleema Khan [Wed, 28 Dec 2022 18:57:45 +0000 (23:57 +0500)]
mqtt: add unittests for nom7 parsers
Ticket: #5742
dependabot[bot] [Fri, 6 Jan 2023 19:06:19 +0000 (19:06 +0000)]
github-actions: bump actions/download-artifact from 3.0.1 to 3.0.2
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/
9782bd6a9848b53b110e712e20e42d89988822b7 ...
9bc31d5ccc31df68ecc42ccf4149144866c47d8a )
---
updated-dependencies:
- dependency-name: actions/download-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 6 Jan 2023 19:06:16 +0000 (19:06 +0000)]
github-actions: bump actions/upload-artifact from 3.1.1 to 3.1.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/
83fd05a356d7e2593de66fc9913b3002723633cb ...
0b7f8abb1508181956e8e162db84b466c27e18ce )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Thu, 5 Jan 2023 19:06:23 +0000 (19:06 +0000)]
github-actions: bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Philippe Antoine [Fri, 6 Jan 2023 16:49:22 +0000 (17:49 +0100)]
stream: fix memory leak when failing to insert segment
As introduced by commit
f848e34bcc266a2a4d8f5fc2661d2b430449b190
DoInsertSegment can now return `-EINVAL` and there was no
generic handling of error values to return the tcp segment
to its pool.
Ticket: #5777
Jeff Lucovsky [Fri, 8 Apr 2022 13:47:31 +0000 (09:47 -0400)]
log/stats: Ensure output exists for the stats thread
Issue: 5198
This commit ensures that a log output destination exists for the stats
thread.
Jeff Lucovsky [Fri, 8 Apr 2022 13:45:35 +0000 (09:45 -0400)]
log: Use hash table for slot maintenance
Issue: 5198
This commit modifies the threaded logging support to use the hash table
for handling thread/slot mappings. As a result, it's no longer necessary
to provide the thread id when ensuring the log output exists.
Jeff Lucovsky [Fri, 8 Apr 2022 13:39:35 +0000 (09:39 -0400)]
log: Add hash table for thread/slot mappings
Issue: 5198
This commit adds a hash table to manage thread id to slot mappings. This
ensures that each thread will have its own slot (file output device)
Juliana Fajardini [Fri, 9 Dec 2022 13:52:44 +0000 (10:52 -0300)]
devguide/install: add note about ubuntu version
We want to make it clear with which system the instructions for
installing from were tested with.
Haleema Khan [Fri, 16 Dec 2022 00:18:20 +0000 (05:18 +0500)]
rfb: rustfmt parser.rs
Haleema Khan [Fri, 16 Dec 2022 00:16:24 +0000 (05:16 +0500)]
rfb: add unittests for nom7 parsers
Task: #5741
Philippe Antoine [Wed, 7 Dec 2022 12:51:31 +0000 (13:51 +0100)]
smb: set event for ntlmssp unusual order
Philippe Antoine [Tue, 6 Dec 2022 13:36:09 +0000 (14:36 +0100)]
smb: rustfmt ntlmssp_records.rs
Philippe Antoine [Tue, 6 Dec 2022 13:34:37 +0000 (14:34 +0100)]
smb/ntlmssp: parse fields independently of order
Instead of relying on the usual ordering...
Ticket: #5258
dependabot[bot] [Tue, 20 Dec 2022 19:05:08 +0000 (19:05 +0000)]
github-actions: bump ossf/scorecard-action from 2.0.6 to 2.1.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.6 to 2.1.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/
99c53751e09b9529366343771cc321ec74e9bd3d ...
15c10fcf1cf912bd22260bfec67569a359ab87da )
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Jeff Lucovsky [Mon, 19 Dec 2022 13:51:31 +0000 (08:51 -0500)]
detect/cert: Use client side certs
Issue: 5516
This commit modifies the detect logic to choose the certificate based on
the flow direction -- to server or to client.
Jason Ish [Tue, 20 Dec 2022 21:09:19 +0000 (15:09 -0600)]
rust: sync log levels with C
Juliana Fajardini [Tue, 29 Nov 2022 18:14:30 +0000 (15:14 -0300)]
exception-policies: fix typos
Shivani Bhardwaj [Tue, 20 Dec 2022 14:10:27 +0000 (19:40 +0530)]
scripts: fix app-layer-protos.c setup
After the changes in the script in
05e16820de , the file
app-layer-protos.c was to be modified properly iff it was left unformatted.
However, the file was also formatted as a part of the same commit making
the lines split which broke the output of the script. Fix that by
looking for another pattern and changing the lines following that.
Victor Julien [Tue, 20 Dec 2022 10:36:55 +0000 (11:36 +0100)]
app/protos: reformat string to proto
Victor Julien [Tue, 20 Dec 2022 10:34:45 +0000 (11:34 +0100)]
app-layer: check name vs proto mapping in registration
Victor Julien [Tue, 20 Dec 2022 09:58:27 +0000 (10:58 +0100)]
netmap/runmode: minor code cleanup
Victor Julien [Tue, 20 Dec 2022 07:01:20 +0000 (08:01 +0100)]
ioctl: output cleanups
Victor Julien [Tue, 20 Dec 2022 07:01:06 +0000 (08:01 +0100)]
netmap: output cleanups
Victor Julien [Sun, 18 Dec 2022 05:52:22 +0000 (06:52 +0100)]
dpdk: don't "fix" broken ips setting
Victor Julien [Sat, 17 Dec 2022 19:36:59 +0000 (20:36 +0100)]
dpdk: output cleanups
Victor Julien [Sat, 17 Dec 2022 13:31:12 +0000 (14:31 +0100)]
nfq: minor error message improvement
Victor Julien [Sat, 17 Dec 2022 08:01:10 +0000 (09:01 +0100)]
output: add %M format option for the log message body
If %M is not specified, it is automatically appended to the format
string, to provide backwards compatibility.
Victor Julien [Sat, 17 Dec 2022 06:27:17 +0000 (07:27 +0100)]
commandline: output cleanups
Victor Julien [Sat, 17 Dec 2022 06:26:00 +0000 (07:26 +0100)]
pcap: output cleanups
Victor Julien [Sat, 3 Dec 2022 16:09:40 +0000 (17:09 +0100)]
output: default output format
Add a separate default for file output.
Victor Julien [Thu, 1 Dec 2022 12:02:45 +0000 (13:02 +0100)]
output: remove unused log levels
Critical, alert and emergency were unused, so remove.
Victor Julien [Thu, 1 Dec 2022 11:51:42 +0000 (12:51 +0100)]
output: print detect-engine as detect
Victor Julien [Wed, 30 Nov 2022 15:15:58 +0000 (16:15 +0100)]
output/capture: group source and runmode
So outputs from runmode-af-packet and source-af-packet both will
show 'af-packet' as the module.
Victor Julien [Thu, 1 Dec 2022 11:51:03 +0000 (12:51 +0100)]
output: add %D for compact log level
Jeff Lucovsky [Sun, 4 Apr 2021 15:25:39 +0000 (11:25 -0400)]
log/json: Convert log output to use JsonBuilder
This commit converts the file logging logic to use JsonBuilder instead
of libjansson.
Jeff Lucovsky [Sun, 4 Apr 2021 14:45:38 +0000 (10:45 -0400)]
config: Clarify when log format can be overridden
Jeff Lucovsky [Sun, 4 Apr 2021 14:45:09 +0000 (10:45 -0400)]
log: Use SCCalloc instead of alloc/clear
Jeff Lucovsky [Wed, 14 Apr 2021 12:47:52 +0000 (08:47 -0400)]
log: Add module and subsystem identifiers to log
Issue: 2497
This changeset provides subsystem and module identifiers in the log when
the log format string contains "%S". By convention, the log format
surrounds "%S" with brackets.
The subsystem name is generally the same as the thread name. The module
name is derived from the source code module name and usually consists of
the first one or 2 segments of the name using the dash character as the
segment delimiter.
Victor Julien [Thu, 15 Dec 2022 18:44:58 +0000 (19:44 +0100)]
unix-socket: minor output improvements
Victor Julien [Thu, 15 Dec 2022 18:51:31 +0000 (19:51 +0100)]
mpm/ac: remove dead code
Victor Julien [Thu, 1 Dec 2022 12:01:54 +0000 (13:01 +0100)]
mpm/ac: use FatalError instead of Critical and exit
Victor Julien [Thu, 1 Dec 2022 11:49:13 +0000 (12:49 +0100)]
detect: more compact message on error
Victor Julien [Thu, 1 Dec 2022 11:46:39 +0000 (12:46 +0100)]
af-packet: output cleanups and unification
Make all messages use the same format:
<iface>: <message>
Victor Julien [Sat, 3 Dec 2022 16:09:07 +0000 (17:09 +0100)]
output: issue warning if file can't be opened
Victor Julien [Wed, 30 Nov 2022 08:57:06 +0000 (09:57 +0100)]
output: remove all custom errors
Victor Julien [Wed, 30 Nov 2022 07:02:46 +0000 (08:02 +0100)]
output: remove error codes from output
Victor Julien [Fri, 21 Oct 2022 10:24:58 +0000 (12:24 +0200)]
error: use SC_EINVAL for invalid input
Victor Julien [Mon, 24 Oct 2022 11:08:25 +0000 (13:08 +0200)]
error: remove unused alloc error code
Victor Julien [Mon, 24 Oct 2022 10:57:29 +0000 (12:57 +0200)]
error: use SC_ENOMEM for alloc errors
Victor Julien [Mon, 24 Oct 2022 11:05:47 +0000 (13:05 +0200)]
logopenfile: errno style error handling
Victor Julien [Mon, 24 Oct 2022 11:02:55 +0000 (13:02 +0200)]
hashlist: use errno style error handling
Victor Julien [Mon, 24 Oct 2022 10:48:28 +0000 (12:48 +0200)]
membuffer: errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:46:42 +0000 (12:46 +0200)]
pool: use errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:45:13 +0000 (12:45 +0200)]
error: bootstrap errno like error code approach
Victor Julien [Sat, 17 Dec 2022 06:25:12 +0000 (07:25 +0100)]
detect/mpm: output cleanups
Victor Julien [Sun, 18 Dec 2022 06:46:44 +0000 (07:46 +0100)]
device: special case handling of dpdk devices
Victor Julien [Sat, 17 Dec 2022 19:49:46 +0000 (20:49 +0100)]
device: output tweak
Victor Julien [Sun, 18 Dec 2022 05:54:47 +0000 (06:54 +0100)]
dpdk: set RSS flags for igb driver
Tested on i340.
Victor Julien [Sun, 18 Dec 2022 06:15:03 +0000 (07:15 +0100)]
dpdk: ips output cleanups
Victor Julien [Thu, 15 Dec 2022 15:30:26 +0000 (16:30 +0100)]
eve/schema: bittorrent format fixup
Victor Julien [Fri, 2 Dec 2022 20:26:52 +0000 (21:26 +0100)]
output: minor code cleanups
Victor Julien [Thu, 1 Dec 2022 11:45:50 +0000 (12:45 +0100)]
unix-socket: don't print unix socket message twice
Jeff Lucovsky [Sun, 4 Apr 2021 14:44:53 +0000 (10:44 -0400)]
general: Correct typos
Victor Julien [Wed, 30 Nov 2022 15:29:20 +0000 (16:29 +0100)]
runmodes: minor output cleanup
Victor Julien [Thu, 1 Dec 2022 11:44:38 +0000 (12:44 +0100)]
detect: turn cleanup message into debug message
Victor Julien [Thu, 1 Dec 2022 11:48:43 +0000 (12:48 +0100)]
device/mtu: clean up mtu message
Victor Julien [Thu, 1 Dec 2022 11:48:21 +0000 (12:48 +0100)]
device: cleanup stats print
Victor Julien [Sat, 3 Dec 2022 16:07:39 +0000 (17:07 +0100)]
runmode: log test mode later
Victor Julien [Wed, 30 Nov 2022 15:14:11 +0000 (16:14 +0100)]
pcap-file: output cleanups
Victor Julien [Wed, 30 Nov 2022 15:12:53 +0000 (16:12 +0100)]
af-packet: output cleanups