Commit Graph

15823 Commits (861ffff972a57057995ba747fb706f38c318dffc)
 

Author SHA1 Message Date
jason taylor f6375e487e doc: update http.accept_enc keyword information
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 7e3288f5a7 doc: update http keyword normalization notes
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 9e87d89d2e doc: update http.accept keyword information
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 8307168ae7 doc: update http.user_agent keyword
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 75c4cdfa1c doc: update http.cookie keyword information
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor ebd5cd61c2 detect: minor http.cookie keyword typo fix
Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 7a28874c8d doc: update http.header keyword information
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor b3af723486 doc: remove legacy description/duplicated data
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 292b3eb9b3 doc: update http.request_line keyword information
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor c7f351bd6e doc: update http.protocol keyword documentation
Ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 2d0ceedeba doc: update urilen keyword documentation
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor ef118aa582 doc: remove legacy uricontent information
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 96e8c10276 doc: update http.uri and http.uri.raw keywords
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor bf192926a8 doc: update http.method keyword
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 0cce5ba447 doc: add http keyword links
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor fd46175203 doc: update http primer information
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
jason taylor 54fd35c5b4 doc: remove legacy tables and image references
ticket: 3025

Signed-off-by: jason taylor <jtfas90@gmail.com>
11 months ago
Victor Julien 34f53f85bc systemd: reimplement sd_notify logic using UNIX socket
One of the lessons of the XZ backdoor story was that just linking to
libsystemd to call sd_notify is discouraged by the systemd project:

Lennart Poettering:
"PSA: In context of the xzpocalypse we now added an example reimplementation
of sd_notify() to our man page:

https://www.freedesktop.org/software/systemd/man/devel/sd_notify.html#Notes

It's pretty comprehensive (i.e. uses it for reload notification too), but
still relatively short.

In the past, I have been telling anyone who wanted to listen that if all you
want is sd_notify() then don't bother linking to libsystemd, since the
protocol is stable and should be considered the API, not our C wrapper
around it. After all, the protocol is so trivial"

From: https://mastodon.social/@pid_eins/112202687764571433

This commit takes the example code and uses it to reimplement the notify
logic.

The code is enabled if Linux is detected in configure. Since the code
won't do anything if the NOTIFY_SOCKET env var isn't set, this should
also work fine on systems w/o systemd.

Ticket: #6913.
11 months ago
Daniel Olatunji 6d40517502 detect/analyzer: add more details for the tcp ack keyword
Issue: 6354
Added the DETECT_ACK case to detect-engine-analyzer.c
11 months ago
Victor Julien 561b81dd9e decode: don't clear computed csums twice
Already done in a generic way by PACKET_RESET_CHECKSUMS.
11 months ago
Victor Julien 40afbf5b09 decode/ipv4: remove unused field 11 months ago
Victor Julien 3077310ff1 output/eve: constify mac address logic 11 months ago
Victor Julien 1213936978 macset: constify addr parameters 11 months ago
Victor Julien 2236c1fcc6 decode/udp: no need to pack the structure 11 months ago
Victor Julien 7c90144d19 decode/tcp: no need to pack the structure 11 months ago
Victor Julien a1a9b41a71 decode/icmpv4: no need to pack the structure 11 months ago
Victor Julien ff50dc49ef configure: tabs to spaces; minor reformatting 11 months ago
Victor Julien e557ba0460 unittests: don't set ports for non-port proto 11 months ago
Victor Julien e651cf922a detect/http: fix compile warning in body tests
When --enable-unittests w/o --enable-debug is used.
11 months ago
Victor Julien f6c24aab57 detect/ipproto: clean up test 11 months ago
Victor Julien 4e1ae1c3bf detect/fragbits: remove unused IP header struct from tests 11 months ago
Victor Julien d3a429d919 defrag: test cleanups and fixes
Pass tv and dtv to make sure reassembled packet is decoded.
11 months ago
Victor Julien 7728047888 decode/icmpv6: minor test cleanup 11 months ago
Victor Julien 3d4626f656 detect/dsize: remove unused ip6h from test 11 months ago
Jason Ish 568b941d7e configure: .git can be a file as well
In worktree scenarios, .git is a file. Assuming its a directory causes
the release date to check the ChangeLog instead of the last commit,
while not a big issue, can be confusing.
11 months ago
Jason Ish 71f59e529c jsonbuilder: fix serialization of nan and inf
When outputting a float, check if its infinity, or not a number and
output a null instead.

Using a null was chosen as this is what serde_yaml, Firefox, Chrome,
Node, etc. do.

Ticket: #6921
11 months ago
Victor Julien b224209f45 host-info: remove pcre2_substring_list_free use
Function prototype has changed in a recent release. Rather than dealing
with detecting that, fall back to our regular pattern of using
pcre2_substring_copy_bynumber().

Bug: #6918.
11 months ago
dependabot[bot] d310d00eb0 github-actions: bump github/codeql-action from 3.24.6 to 3.24.9
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.24.6...v3.24.9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
Jason Ish 6035a8a2b6 github-ci: set checkout directory as safe before running git commands
While the checkout job appears to do this, it is done with a different
version of git which seems to be the cause for it not having an effect
when doing manual git operations from within a job.

Also removes duplicate checkout statements in Windows builds.
11 months ago
Jason Ish b58dd5e585 configure: export release date for documentation
Sphinx embeds a date in the generated man pages, and to provide
reproducible builds this date needs to be provided to Sphinx,
otherwise it will use the current date.

If building from Git, extract the date from the most recent commit. In
a release, this commit would be the commit that sets the version so is
accurate.

If .git does not exist, use the most recent data found in the
ChangeLog.

The ChangeLog is not used when building from git, as the main/master
branch may not have recent enough timestamps.

This should provide a consistent date when re-building the
distribution from the same non-git archive, or from the same git
commit.

Ticket: #6911
11 months ago
Jason Ish 51bf1c3510 docs/userguide: use a consistent date for reproducible builds
By default, when Sphinx generates the man pages, the current date will
be embedded in them. This can be set to a specific date with the
"today" variable. Typically the date embedded in manpages in the
release date.

To achieve this, attempt to use the environment variable, RELEASE_DATE
to set the "today" variable, reverting back to the empty string if not
set. It is up to our build system to properly set this date.

Ticket: #6911
11 months ago
Jason Ish c00c2b116f configure: don't check ./revision, it never exists
Stop checking the ./revision file for the git revision info, its never
created.
11 months ago
Jason Ish 4c16032f63 docs/conf.py: fix python escape warning
/home/jason/oisf/dev/suricata/master/doc/userguide/conf.py:74: SyntaxWarning: invalid escape sequence '\('
  "AC_INIT\(\[suricata\],\s*\[(.*)?\]\)",
11 months ago
dependabot[bot] 23463b9814
github-actions: bump codecov/codecov-action from 4.1.0 to 4.1.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](54bcd8715e...c16abc29c9)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months ago
Philippe Antoine ee50fe4c30 sip: convert transaction list to vecdeque
Ticket: 6891

So as to avoid quadratic complexity on tx cleanup with SIP/TCP
that can create many transactions in one go.
11 months ago
Shivani Bhardwaj 4227e52c4b detect/port: handle range and upper boundary ports
So far, if a port was found to be single which was earlier a part of the
range, port + 1 was added to the list to honor the range that it was a
part of. But, this is incorrect in case the port is 65535 or if the port
was found to be of range when it was earlier a single port.

Bug 6896
11 months ago
Jason Ish 02b019d071 examples/capture: fix the slot
Use slot->slot_next, not the slot as passed in.
11 months ago
Jason Ish f104e9cecc suricata: expose and break out configuration loading
Expose LoadYamlConfig as SCLoadYamlConfig and remove it from
SuricataInit. This is required to allow the library user the ability
customize the loading of the configuration, for example doing some
programmatic configuration then loading a configuration file.
11 months ago
Jason Ish e38ec7d0a7 smtp: fix configuration node creation
A configuration sequence node needs to have name, which is just its
index in the sequence.

Discovered by calling ConfDump() after Suricata was fully initialized.
11 months ago
Jason Ish 2c71c7fe6a suricata: move SuricataMain into main()
Move the contents of SuricataMain into the `main()` function found in
main.c. This forces the Suricata application to bootstrap and run
Suricata through the same interfaces as a library user might do.

Required exposing StartInternalRunMode as SCStartInternalRunmode. Its
arguable whether those "actions" belong in the library or just the
application, but I think that is separation we can look at later.

For now the lib example and Suricata's own main are the same, however
the example will probably extend more into programmatically
configuring Suricata or dynamically registering a runmode, which
doesn't really belong the main Suricata application.
11 months ago