]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Mon, 23 Jan 2023 18:41:45 +0000 (19:41 +0100)]
frames: enable only used frames
Enable only frames that are actually used.
Ticket: #4979.
Victor Julien [Mon, 23 Jan 2023 13:57:33 +0000 (14:57 +0100)]
files: move FileContainer into FileTransferTracker
Update SMB, NFS, HTTP2.
Victor Julien [Thu, 8 Sep 2022 11:56:53 +0000 (13:56 +0200)]
detect/frame: improve frame detection
Add a per frame progress tracker.
Victor Julien [Mon, 16 Jan 2023 10:45:41 +0000 (11:45 +0100)]
output/frame: log frame type stream
Victor Julien [Thu, 8 Sep 2022 11:57:45 +0000 (13:57 +0200)]
output/frame: improve 'complete' logging
Victor Julien [Thu, 12 Jan 2023 14:02:40 +0000 (15:02 +0100)]
frame: add debug validation check
Victor Julien [Sat, 3 Sep 2022 07:19:00 +0000 (09:19 +0200)]
app-layer/frames: use absolute frame offset
Frame offset was already a 64 bit integer, so simplify things by
making it an absolute offset from the start of the stream.
Victor Julien [Fri, 2 Sep 2022 11:08:24 +0000 (13:08 +0200)]
frames: implement generic <alproto>.stream frames
Add a hard coded <alproto>.stream option for all stream data for
a protocol.
Starts at stream offset 0 or at the point of a protocol upgrade
in case of STARTTLS or CONNECT.
Victor Julien [Fri, 2 Sep 2022 11:07:09 +0000 (13:07 +0200)]
detect/frames: minor cleanup in buffer handling
Don't lookup a buffer twice, even if the lookup should be fast.
Victor Julien [Sun, 22 Jan 2023 08:31:34 +0000 (09:31 +0100)]
htp: simplify streaming buffer config
Use a single static config instead of the per profile config.
Victor Julien [Sat, 21 Jan 2023 09:43:41 +0000 (10:43 +0100)]
streaming: remove config pointer from struct
Victor Julien [Sat, 21 Jan 2023 11:24:35 +0000 (12:24 +0100)]
streaming: internal switch to sbcfg by argument
Victor Julien [Sat, 21 Jan 2023 12:39:10 +0000 (13:39 +0100)]
streaming: add sbcfg to StreamingBufferClear
Victor Julien [Sat, 21 Jan 2023 11:08:51 +0000 (12:08 +0100)]
streaming: add sbcfg to StreamingBufferFree
Victor Julien [Sat, 21 Jan 2023 11:03:56 +0000 (12:03 +0100)]
streaming: add sbcfg to StreamingBufferAppendRaw
Victor Julien [Sat, 21 Jan 2023 11:01:46 +0000 (12:01 +0100)]
streaming: add sbcfg to StreamingBufferAppend
Victor Julien [Sat, 21 Jan 2023 11:29:23 +0000 (12:29 +0100)]
streaming: add sbcfg to StreamingBufferSlideToOffset
Victor Julien [Sat, 21 Jan 2023 11:23:44 +0000 (12:23 +0100)]
streaming: add sbcfg to StreamingBufferInsertAt
Victor Julien [Sat, 21 Jan 2023 11:22:56 +0000 (12:22 +0100)]
streaming: add sbcfg to StreamingBufferAppendNoTrack
Victor Julien [Sun, 22 Jan 2023 07:29:43 +0000 (08:29 +0100)]
output/filedata: trunc file in output again
Victor Julien [Sat, 21 Jan 2023 09:13:22 +0000 (10:13 +0100)]
files: update API and callers to take stream config
This is to allow not storing the stream buffer config in each file.
Victor Julien [Fri, 20 Jan 2023 18:47:13 +0000 (19:47 +0100)]
output/filedata: don't call file close
Will be reenabled after file API is updated.
Victor Julien [Sat, 21 Jan 2023 21:45:36 +0000 (22:45 +0100)]
app-layer: get sbconfg with files
Victor Julien [Mon, 23 Jan 2023 08:13:44 +0000 (09:13 +0100)]
files: remove filecontainer drop trait
In preparation of it becoming impossible to use due to the free
function getting an cfg argument.
Victor Julien [Fri, 20 Jan 2023 17:51:04 +0000 (18:51 +0100)]
http2: explicity free files
In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.
Victor Julien [Fri, 20 Jan 2023 17:50:38 +0000 (18:50 +0100)]
smb: explicity free files
In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.
Victor Julien [Fri, 20 Jan 2023 17:50:18 +0000 (18:50 +0100)]
nfs: explicity free files
In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.
Victor Julien [Fri, 20 Jan 2023 14:27:42 +0000 (15:27 +0100)]
nfs: file handling cleanups
Victor Julien [Fri, 20 Jan 2023 14:27:23 +0000 (15:27 +0100)]
smb: file handling cleanups
Victor Julien [Sat, 21 Jan 2023 09:31:40 +0000 (10:31 +0100)]
files: remove unused Rust binding for file pruning
Victor Julien [Fri, 20 Jan 2023 18:39:22 +0000 (19:39 +0100)]
streaming: set size and max regions defaults
Victor Julien [Fri, 20 Jan 2023 18:28:07 +0000 (19:28 +0100)]
htp: remove duplicate prototypes
Victor Julien [Fri, 20 Jan 2023 18:04:08 +0000 (19:04 +0100)]
htp/body: minor optimization
Victor Julien [Sun, 22 Jan 2023 07:05:58 +0000 (08:05 +0100)]
flow: inline commonly used getters
Victor Julien [Fri, 13 Jan 2023 13:03:21 +0000 (14:03 +0100)]
streaming: remove inefficient buffer grow logic
Victor Julien [Fri, 13 Jan 2023 12:42:27 +0000 (13:42 +0100)]
streaming: remove unused slide logic
Victor Julien [Fri, 13 Jan 2023 12:32:45 +0000 (13:32 +0100)]
streaming: remove unused config member
Victor Julien [Mon, 9 Jan 2023 17:31:01 +0000 (18:31 +0100)]
streaming: make minimum region gap size configurable
Victor Julien [Mon, 9 Jan 2023 16:53:07 +0000 (17:53 +0100)]
stream/reassembly: make max-regions configurable; set default
Victor Julien [Mon, 9 Jan 2023 16:36:55 +0000 (17:36 +0100)]
streaming: add max regions config option
Victor Julien [Mon, 9 Jan 2023 11:49:04 +0000 (12:49 +0100)]
stream/list: hack around GAP handling in tests
Victor Julien [Mon, 9 Jan 2023 07:05:37 +0000 (08:05 +0100)]
stream: improve gap tests
Victor Julien [Sat, 7 Jan 2023 09:48:19 +0000 (10:48 +0100)]
eve: log max regions
Victor Julien [Fri, 6 Jan 2023 18:51:53 +0000 (19:51 +0100)]
stream: flow timeout improvement
Check continuous data for app-layer and post gap data as well for
stream inspection.
Victor Julien [Tue, 29 Nov 2022 09:32:53 +0000 (10:32 +0100)]
streaming: implement memory regions
In TCP, large gaps in the data could lead to an extremely poor utilization
of the streaming buffer memory. This was caused by the implementation using
a single continues memory allocation from the "stream offset" to the
current data. If a 100 byte segment was inserted for ISN + 20MiB, we would
allocate 20MiB, even if only 100 bytes were actually used.
This patch addresses the issue by implementing a list of memory regions.
The StreamingBuffer structure holds a static "main" region, which can be
extended in the form of a simple list of regions.
[ main region ] [ gap ] [ aux region ]
[ sbb ] [ sbb ]
On insert, find the correct region and see if the new data fits. If it
doesn't, see if we can expand the current region, or than we need to add
a new region. If expanding the current region means we overlap or get
too close to the next region, we merge them.
On sliding, we free any regions that slide out of window and consolidate
auxilary regions into main where needed.
Bug: #4580.
Victor Julien [Tue, 13 Dec 2022 09:05:12 +0000 (10:05 +0100)]
stream: reduce streaming buffer internals use
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