]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
23 months agoaf-packet: terminate on same interface & copyiface 9370/head
Shivani Bhardwaj [Thu, 10 Aug 2023 12:17:35 +0000 (17:47 +0530)] 
af-packet: terminate on same interface & copyiface

If the interface and copy-iface are same for an af-packet IPS device
setting then fataly exit else it leads to a segfault in later stages.

Bug 5870

23 months agoaf-packet: check out_iface not NULL
Shivani Bhardwaj [Thu, 10 Aug 2023 12:16:41 +0000 (17:46 +0530)] 
af-packet: check out_iface not NULL

23 months agodetect/file: use util to turn keyword to nocase 9355/head
Victor Julien [Fri, 4 Aug 2023 15:08:06 +0000 (17:08 +0200)] 
detect/file: use util to turn keyword to nocase

This changes the way the pattern is stored by making it lowercase.

23 months agodetect/content: cleanup nocase conversion
Victor Julien [Fri, 4 Aug 2023 12:18:20 +0000 (14:18 +0200)] 
detect/content: cleanup nocase conversion

23 months agodoc: update file.magic information
jason taylor [Tue, 1 Aug 2023 15:34:08 +0000 (15:34 +0000)] 
doc: update file.magic information

Signed-off-by: jason taylor <jtfas90@gmail.com>
23 months agodoc: update fileext keyword information
jason taylor [Tue, 18 Jul 2023 21:17:31 +0000 (21:17 +0000)] 
doc: update fileext keyword information

Signed-off-by: jason taylor <jtfas90@gmail.com>
23 months agodoc: update file.name keyword information
jason taylor [Mon, 17 Jul 2023 16:36:58 +0000 (16:36 +0000)] 
doc: update file.name keyword information

Signed-off-by: jason taylor <jtfas90@gmail.com>
23 months agodoc/userguide: improve SCStreamingBuffer example
Alexandre Iooss [Fri, 28 Jul 2023 07:46:02 +0000 (09:46 +0200)] 
doc/userguide: improve SCStreamingBuffer example

Add direction indication in SCStreamingBuffer usage example.
This adds documentation for the changes introduced by commit
5b1d8c7e94ef613107870d4d9d9cdde76d4c3438.

2 years agodpdk/mlx5: fix shutdown crash in IPS mode 9349/head
Victor Julien [Thu, 3 Aug 2023 14:02:10 +0000 (16:02 +0200)] 
dpdk/mlx5: fix shutdown crash in IPS mode

Make sure to first close all ports before freeing device mempools.

Thread 1 "Suricata-Main" received signal SIGSEGV, Segmentation fault.
0x00007ffff456a3fb in ?? () from /usr/lib/x86_64-linux-gnu/dpdk/pmds-20.0/librte_pmd_mlx5.so
(gdb) bt
 #0  0x00007ffff456a3fb in ?? () from /usr/lib/x86_64-linux-gnu/dpdk/pmds-20.0/librte_pmd_mlx5.so
 #1  0x00007ffff469a948 in ?? () from /usr/lib/x86_64-linux-gnu/dpdk/pmds-20.0/librte_pmd_mlx5.so
 #2  0x00007ffff45606aa in ?? () from /usr/lib/x86_64-linux-gnu/dpdk/pmds-20.0/librte_pmd_mlx5.so
 #3  0x00007ffff6d4ed8d in rte_eth_dev_close () from /usr/lib/x86_64-linux-gnu/librte_ethdev.so.20.0
 #4  0x000000000055fc4c in DPDKCloseDevice (ldev=ldev@entry=0xe3a400) at util-dpdk.c:53
 #5  0x000000000055f4eb in LiveDeviceListClean () at util-device.c:331
 #6  0x00000000005511c8 in GlobalsDestroy (suri=<optimized out>) at suricata.c:381
 #7  0x0000000000550a76 in SuricataMain (argc=<optimized out>, argv=<optimized out>) at suricata.c:3059
 #8  0x00007ffff6a24083 in __libc_start_main (main=0x54cca0 <main>, argc=8, argv=0x7fffffffe4c8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4b8) at ../csu/libc-start.c:308
 #9  0x000000000054cbde in _start ()

Bug: #5619.

2 years agouserguide/ppa: fix typo
Juliana Fajardini [Thu, 3 Aug 2023 15:38:52 +0000 (12:38 -0300)] 
userguide/ppa: fix typo

The launchpad repo for suricata-beta read 'oisd' instead of 'oisf'

2 years agodetect/analysis: Move globals to engine ctx
Jeff Lucovsky [Thu, 3 Aug 2023 14:06:47 +0000 (10:06 -0400)] 
detect/analysis: Move globals to engine ctx

Issue: 6239

This commit moves the global variables associated with engine analysis
into the detect engine context. Doing so provides encapsulation of the
analysis components as well as thread-safe operation in a multi-tenant
(context) deployment.

2 years agouserguide/install: add info on ubuntu ppa installs 9336/head
Juliana Fajardini [Tue, 1 Aug 2023 21:42:08 +0000 (18:42 -0300)] 
userguide/install: add info on ubuntu ppa installs

Bringing info that was only in our Redmine wiki to our documentation.

Task #6231

2 years agodocs: miscellanea updates
Juliana Fajardini [Tue, 1 Aug 2023 21:19:45 +0000 (18:19 -0300)] 
docs: miscellanea updates

- Fix a DPDK reference link, add some line breaks.
- Exemplify what a good commit message looks
like, for Suricata's commit style.

2 years agogithub-ci: disable some workflows on doc only changes 9331/head
Jason Ish [Wed, 2 Aug 2023 16:49:07 +0000 (10:49 -0600)] 
github-ci: disable some workflows on doc only changes

Don't run the following GitHub workflows on documentation only
changes:
- cifuzz
- codeql
- formatting
- rust
- scan-build

2 years agodoc/userguide: display version on front page 9330/head
Jason Ish [Wed, 2 Aug 2023 16:09:40 +0000 (10:09 -0600)] 
doc/userguide: display version on front page

When viewing the docs online at Readthedocs, or similar it might be
immediately apparent what version of the documentation is being
displayed. Display the version on the first line before the table of
contents to make it clear.

2 years agorust: update cargo.lock 9320/head
Victor Julien [Mon, 31 Jul 2023 07:15:44 +0000 (09:15 +0200)] 
rust: update cargo.lock

2 years agodetect: update filename buffer description name
jason taylor [Tue, 1 Aug 2023 15:59:03 +0000 (15:59 +0000)] 
detect: update filename buffer description name

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agostream: special handling for RST data
Victor Julien [Tue, 1 Aug 2023 06:44:53 +0000 (08:44 +0200)] 
stream: special handling for RST data

Data on RST packets is not invalid, but also shouldn't be used
in reassembly.

RFC 1122:

  4.2.2.12  RST Segment: RFC-793 Section 3.4

    A TCP SHOULD allow a received RST segment to include data.

    DISCUSSION
        It has been suggested that a RST segment could contain
        ASCII text that encoded and explained the cause of the
        RST.  No standard has yet been established for such
        data.

RST data will be presented to the detection engine per packet,
but will not be part of stream reassembly.

Bug: #6244.

2 years agostream: add stream.rst_with_data event for RST with data
Victor Julien [Tue, 1 Aug 2023 05:48:04 +0000 (07:48 +0200)] 
stream: add stream.rst_with_data event for RST with data

2 years agoftp: reenable debug check; improve debug log
Victor Julien [Mon, 31 Jul 2023 19:54:45 +0000 (21:54 +0200)] 
ftp: reenable debug check; improve debug log

2 years agopcap/file: normalize file timestamps
Victor Julien [Mon, 31 Jul 2023 19:52:18 +0000 (21:52 +0200)] 
pcap/file: normalize file timestamps

Normalize the timestamps that are too far in the past to epoch.

Bug: #6240.

2 years agothreads: improve spawn failure error reporting
Victor Julien [Tue, 1 Aug 2023 12:00:54 +0000 (14:00 +0200)] 
threads: improve spawn failure error reporting

2 years agodoc: add note about cpu prio overwrite behavior 9312/head
Andreas Herz [Tue, 25 Jul 2023 14:46:01 +0000 (16:46 +0200)] 
doc: add note about cpu prio overwrite behavior

2 years agodoc: dataset - add type to be mandatory
Andreas Herz [Tue, 25 Jul 2023 14:37:30 +0000 (16:37 +0200)] 
doc: dataset - add type to be mandatory

2 years agoradix: Detect duplicate netblocks 9306/head
Jeff Lucovsky [Mon, 24 Apr 2023 13:56:01 +0000 (09:56 -0400)] 
radix: Detect duplicate netblocks

This commit prevents duplicate IPV4/IPV6 netblocks from being added to the
radix tree.

Contributed by Giuseppe Longo <giuseppe@glongo.it>

Issue: 5748

2 years agoerror: Add SC_EEXIST for dups
Jeff Lucovsky [Wed, 14 Jun 2023 12:40:26 +0000 (08:40 -0400)] 
error: Add SC_EEXIST for dups

Issue: 5748

This commit adds SC_EEXIST to be used for cases where an
item/resource/artifact with the same attributes already exists.

2 years agogen/bool: Use bool type instead of ints
Jeff Lucovsky [Mon, 24 Apr 2023 13:55:04 +0000 (09:55 -0400)] 
gen/bool: Use bool type instead of ints

This commit converts usages of `int` to `bool` within the radix utility
code.

2 years agoreputation: Release memory on key add fails
Jeff Lucovsky [Mon, 24 Apr 2023 13:51:56 +0000 (09:51 -0400)] 
reputation: Release memory on key add fails

Ensure that memory for the reputation key is released on failed adds.

Contributed by Giuseppe Longo <giuseppe@glongo.it>

Issue: 5748

2 years agogen/typos: Correct misc. typos.
Jeff Lucovsky [Mon, 24 Apr 2023 13:49:40 +0000 (09:49 -0400)] 
gen/typos: Correct misc. typos.

2 years agogeneral: Remove unused include files 9295/head
Jeff Lucovsky [Wed, 26 Jul 2023 12:48:14 +0000 (08:48 -0400)] 
general: Remove unused include files

2 years agooutput/stats: Handle stat names w/out scope
Jeff Lucovsky [Wed, 26 Jul 2023 12:46:00 +0000 (08:46 -0400)] 
output/stats: Handle stat names w/out scope

Issue: 6094

Not all stat names are scoped, e.g. decoder.pkts is scoped to decoder;
mempressure_max is unscoped.

The concept of a short-name is added to the underlying stat structure so
- Calculation is done once, at stat registration time
- The output code can easily determine if a stat has a scope

2 years agomem/alloc: Replace malloc with calloc
Jeff Lucovsky [Wed, 26 Jul 2023 12:38:13 +0000 (08:38 -0400)] 
mem/alloc: Replace malloc with calloc

Minor cleanup so SCCalloc is used in preference to SCMalloc.

2 years agogeneral/typo: Correct spelling/grammar issues
Jeff Lucovsky [Wed, 26 Jul 2023 12:37:04 +0000 (08:37 -0400)] 
general/typo: Correct spelling/grammar issues

2 years agoschema: Add memcap pressure values
Jeff Lucovsky [Wed, 26 Jul 2023 12:33:04 +0000 (08:33 -0400)] 
schema: Add memcap pressure values

Issue: 6094

This commit extends the EVE schema with memcap_pressure values; these
are included in the stat event type records.

2 years agodcerpc: accept ALTER_CONTEXT as a valid request 9291/head
Shivani Bhardwaj [Wed, 26 Jul 2023 09:41:59 +0000 (15:11 +0530)] 
dcerpc: accept ALTER_CONTEXT as a valid request

So far, if only the starting request was a DCERPC request, it would be
considered DCERPC traffic. Since ALTER_CONTEXT is a valid request type,
it should be accepted too.

Reported and patch proposed in the following Redmine ticket by
InterNALXz.

Bug 6191

2 years agodpdk: treat unknown socket ID as a valid socket ID 9288/head
Lukas Sismis [Mon, 17 Jul 2023 09:33:18 +0000 (11:33 +0200)] 
dpdk: treat unknown socket ID as a valid socket ID

Ticket: #6232

2 years agodpdk: fix DPDK thread check for IPS mode
Lukas Sismis [Tue, 25 Jul 2023 11:07:39 +0000 (13:07 +0200)] 
dpdk: fix DPDK thread check for IPS mode

Ticket: #6233

2 years agouserguide/upgrade: link to exception policy FAQ
Juliana Fajardini [Mon, 24 Jul 2023 15:45:41 +0000 (12:45 -0300)] 
userguide/upgrade: link to exception policy FAQ

With the release of 7, people are starting to have issues with traffic
being blocked. While we don't add a more expansive documentation for
this, add a link to the FAQ covering possible fixes for drops caused by
the fail closed default behavior of the exception policies.

2 years agooutput: add storing boolean for files
Philippe Antoine [Mon, 26 Dec 2022 11:24:11 +0000 (12:24 +0100)] 
output: add storing boolean for files

When filestore keyword is triggered, the file is not yet stored,
when the alert is generated, but only marked for storing.

Ticket: 4881

2 years agojsonschema: add missing field .files[].file_id
Philippe Antoine [Mon, 26 Dec 2022 11:26:15 +0000 (12:26 +0100)] 
jsonschema: add missing field .files[].file_id

2 years agosrc: checks to avoid divisions by zero
Philippe Antoine [Fri, 30 Jun 2023 08:21:57 +0000 (10:21 +0200)] 
src: checks to avoid divisions by zero

Ticket: #5920

2 years agoprofiling: fix check to compute average bytes
Philippe Antoine [Wed, 5 Jul 2023 13:32:57 +0000 (15:32 +0200)] 
profiling: fix check to compute average bytes

2 years agostats: add drop reason counters
Victor Julien [Tue, 25 Jul 2023 05:51:02 +0000 (07:51 +0200)] 
stats: add drop reason counters

{
  "accepted": 296185,
  "blocked": 162,
  "rejected": 0,
  "replaced": 0,
  "drop_reason": {
    "decode_error": 0,
    "defrag_error": 0,
    "defrag_memcap": 0,
    "flow_memcap": 0,
    "flow_drop": 94,
    "applayer_error": 0,
    "applayer_memcap": 0,
    "rules": 3,
    "threshold_detection_filter": 0,
    "stream_error": 63,
    "stream_memcap": 0,
    "stream_midstream": 2,
    "nfq_error": 0,
    "tunnel_packet_drop": 0
  }
}

Ticket: #6230.

2 years agostats: update ips capture counters centrally
Victor Julien [Mon, 24 Jul 2023 20:13:52 +0000 (22:13 +0200)] 
stats: update ips capture counters centrally

This adds support to all capture methods for these counters.

The updates happen only on "real" packets, not on encapsulated
packets.

Ticket: #4756.

2 years agostats: register ips capture stats for each packet thread
Victor Julien [Mon, 24 Jul 2023 19:09:10 +0000 (21:09 +0200)] 
stats: register ips capture stats for each packet thread

ReleasePacket based verdicts can happen in several threads,
depending on the runmode details.

Only register and update if in IPS mode.

2 years agoeve/schema: add ips capture stats
Victor Julien [Mon, 24 Jul 2023 19:08:00 +0000 (21:08 +0200)] 
eve/schema: add ips capture stats

2 years agostats: simplify ips capture stats logic
Victor Julien [Mon, 24 Jul 2023 18:33:35 +0000 (20:33 +0200)] 
stats: simplify ips capture stats logic

Since many implementations use the ReleasePacket callback to issue
their verdict, no thread ctx is available. To work around this
just register the stats in a `thread_local` variable instead.

2 years agomime: replace small memcpy with loop
Victor Julien [Fri, 21 Jul 2023 08:05:41 +0000 (10:05 +0200)] 
mime: replace small memcpy with loop

To address:

      In file included from /usr/include/string.h:535,
                 from suricata-common.h:108,
                 from util-decode-mime.c:26:
In function â€˜memcpy’,
    inlined from â€˜ProcessBase64Remainder’ at util-decode-mime.c:1201:13:
/usr/include/mipsel-linux-gnu/bits/string_fortified.h:29:10: warning: â€˜__builtin_memcpy’ forming offset 4 is out of the bounds [0, 4] of object â€˜block’ with type â€˜uint8_t[4]’ {aka â€˜unsigned char[4]’} [-Warray-bounds=]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
util-decode-mime.c: In function â€˜ProcessBase64Remainder’:
util-decode-mime.c:1174:13: note: â€˜block’ declared here
 1174 |     uint8_t block[B64_BLOCK];
      |             ^~~~~

Copy data should be <= 4 bytes.

2 years agodetect: fix minor compile warning
Victor Julien [Fri, 21 Jul 2023 08:32:07 +0000 (10:32 +0200)] 
detect: fix minor compile warning

      detect-engine.c: In function â€˜DetectKeywordCtxHashFunc’:
detect-engine.c:3550:75: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
 3550 |     uint64_t hash = StringHashDjb2((const uint8_t *)name, strlen(name)) + (uint64_t)ctx->data;
      |

2 years agosysfs: fix minor compile warning
Victor Julien [Fri, 21 Jul 2023 08:03:44 +0000 (10:03 +0200)] 
sysfs: fix minor compile warning

Seen in Debian QA on mipsel.

util-sysfs.c: In function â€˜SysFsWriteValue’:
util-sysfs.c:50:45: warning: format â€˜%ld’ expects argument of type â€˜long int’, but argument 4 has type â€˜int64_t’ {aka â€˜long long int’} [-Wformat=]
   50 |     snprintf(sentence, sizeof(sentence), "%ld", value);
      |                                           ~~^   ~~~~~
      |                                             |   |
      |                                             |   int64_t {aka long long int}
      |                                             long int
      |                                           %lld

2 years agodecode-ipv6: Set L4 proto on ipv6 incase of GRE decode error 9267/head
Cole Dishington [Mon, 10 Jul 2023 02:02:18 +0000 (14:02 +1200)] 
decode-ipv6: Set L4 proto on ipv6 incase of GRE decode error

Set the L4 proto before decoding GRE in ipv6 decoding in case there is a
GRE header decoding error.

Bug: #6222

2 years agodecode: fix offset for DCE layer 9261/head
Philippe Antoine [Fri, 30 Jun 2023 08:45:37 +0000 (10:45 +0200)] 
decode: fix offset for DCE layer

Fixes: 136d351e403b ("decode: single network layer entrypoint")
Ticket: #3637

2 years agodetect/include: Remove unnecessary includes 9248/head
Jeff Lucovsky [Tue, 18 Jul 2023 12:31:32 +0000 (08:31 -0400)] 
detect/include: Remove unnecessary includes

2 years agoversion: start development towards 7.0.1
Victor Julien [Tue, 18 Jul 2023 15:15:53 +0000 (17:15 +0200)] 
version: start development towards 7.0.1

2 years agorelease: 7.0.0; update changelog suricata-7.0.0
Shivani Bhardwaj [Tue, 18 Jul 2023 04:35:41 +0000 (10:05 +0530)] 
release: 7.0.0; update changelog

2 years agodetect/multi-tenant: Make tenant_id 32 bits everywhere 9244/head
Jeff Lucovsky [Wed, 21 Jun 2023 13:09:45 +0000 (09:09 -0400)] 
detect/multi-tenant: Make tenant_id 32 bits everywhere

Issue: 6047

This commit ensures that the tenant id is contained in a unsigned 32 bit
container.

2 years agodetect/pcre: Use local match variables 9243/head
Jeff Lucovsky [Sun, 16 Jul 2023 15:57:14 +0000 (11:57 -0400)] 
detect/pcre: Use local match variables

pcre2 is not thread-safe wrt match objects so use locally scoped
objects.

Issue: 4797

2 years agodetect/base64_decode: use local pcre2_match_data 9240/head
Victor Julien [Sun, 16 Jul 2023 10:49:12 +0000 (12:49 +0200)] 
detect/base64_decode: use local pcre2_match_data

2 years agoreference: fix multi-tenant loading issues
Victor Julien [Sun, 16 Jul 2023 08:44:18 +0000 (10:44 +0200)] 
reference: fix multi-tenant loading issues

Bug: #4797.

2 years agoclassification: fix multi-tenant loading issues
Victor Julien [Sun, 16 Jul 2023 08:33:11 +0000 (10:33 +0200)] 
classification: fix multi-tenant loading issues

Move pcre2 data structures used for parsing into the detect engine
context, so that multiple tenant loading threads don't use the same
data structures.

Bug: #4797.

2 years agodoc/userguide: update ref to installation from git 9239/head
Juliana Fajardini [Tue, 11 Jul 2023 14:17:41 +0000 (11:17 -0300)] 
doc/userguide: update ref to installation from git

It was still pointing to the redmine wiki and the documentation to be
truthful to the new documentation.

2 years agometa-docs: update links
Juliana Fajardini [Tue, 4 Apr 2023 16:02:57 +0000 (13:02 -0300)] 
meta-docs: update links

Readme and PR template was still pointing to the redmine wiki and
readthedocs, replace with docs.suricata links.

2 years agodoc: security policy
Victor Julien [Wed, 16 Jun 2021 12:36:25 +0000 (14:36 +0200)] 
doc: security policy

2 years agogithub-ci: don't build docs in almalinux:8, centos:8
Jason Ish [Fri, 7 Jul 2023 17:11:48 +0000 (11:11 -0600)] 
github-ci: don't build docs in almalinux:8, centos:8

Our docs require a newer version of Sphinx.

2 years agodoc/support-status: add support status page
Jason Ish [Tue, 30 May 2023 18:50:34 +0000 (12:50 -0600)] 
doc/support-status: add support status page

Convert the wiki page,
https://redmine.openinfosecfoundation.org/projects/suricata/wiki/Support_Status
into a page that is versioned along with the user guide.

Includes many updates to reflect our current support status.

2 years agodoc/userguide: avoid horizontal scroll on rtd
Jason Ish [Tue, 30 May 2023 20:51:17 +0000 (14:51 -0600)] 
doc/userguide: avoid horizontal scroll on rtd

Add CSS to avoid horizontal scroll in tables on ReadTheDocs. This will
wrap the text instead.

Also, vertically align to top so if a cell does wrap, other cells that
do not wrap don't place the text in the middle of the cell.

2 years agofile: remove FILE_USE_DETECT flag 9237/head
Victor Julien [Tue, 11 Jul 2023 08:04:45 +0000 (10:04 +0200)] 
file: remove FILE_USE_DETECT flag

All implementations were converted to use the logic, so the flag itself
can be removed.

2 years agodetect/file: Remove centralized proto definition
Jeff Lucovsky [Mon, 10 Jul 2023 14:41:08 +0000 (10:41 -0400)] 
detect/file: Remove centralized proto definition

Issue: 4145

Remove centralized protocol definitions for file handling in favor of
consolidated file access handling.

2 years agodetect/file_data: Consolidate file handling
Jeff Lucovsky [Mon, 10 Jul 2023 14:40:24 +0000 (10:40 -0400)] 
detect/file_data: Consolidate file handling

Issue: 4145

Consolidate file handling for all protocols that use file objects for
file_data.

Make sure http_server_body / http.response_body for HTTP1 continue
to inspect the actual body. For HTTP2, http.response_body acts as
an internal alias for `file_data`.

2 years agodetect/file: Filehandler registration logic
Jeff Lucovsky [Mon, 10 Jul 2023 14:39:02 +0000 (10:39 -0400)] 
detect/file: Filehandler registration logic

Add file handler registration functions for consolidated file handling.

Issue: 4145

2 years agofile/htp: Add logic for file access
Jeff Lucovsky [Mon, 10 Jul 2023 14:33:15 +0000 (10:33 -0400)] 
file/htp: Add logic for file access

Set file inspection sizes and marker for use with detect logic when
opening files by name or as part of a range.

Issue: 4145

2 years agofile: Window and edge adjustments
Jeff Lucovsky [Mon, 10 Jul 2023 14:31:45 +0000 (10:31 -0400)] 
file: Window and edge adjustments

Issue: 4145

Adjust edge and window values after considering file size/inspected
values.

2 years agodetect/engine: minor debug cleaup
Victor Julien [Fri, 14 Jul 2023 15:24:33 +0000 (17:24 +0200)] 
detect/engine: minor debug cleaup

2 years agodetect/mpm: remove useless checks
Victor Julien [Fri, 14 Jul 2023 15:10:20 +0000 (17:10 +0200)] 
detect/mpm: remove useless checks

The pattern store has already done these checks before.

2 years agompm: Use typedef for mpm registration
Jeff Lucovsky [Mon, 10 Jul 2023 14:12:09 +0000 (10:12 -0400)] 
mpm: Use typedef for mpm registration

Issue: 4145

2 years agorust: fix clippy warnings 9233/head
Shivani Bhardwaj [Thu, 13 Jul 2023 16:09:47 +0000 (21:39 +0530)] 
rust: fix clippy warnings

2 years agorust: update cargo.lock
Victor Julien [Thu, 13 Jul 2023 13:18:54 +0000 (15:18 +0200)] 
rust: update cargo.lock

2 years agouserguide/eve: format and reorganize alert section
Juliana Fajardini [Thu, 22 Dec 2022 23:47:24 +0000 (20:47 -0300)] 
userguide/eve: format and reorganize alert section

The `field action` portion seemed to be comprised of a more generic
section that followed it. Also formatted the section for lines to be
within the character limit.

2 years agooutput/drop: add verdict field
Juliana Fajardini [Wed, 5 Jul 2023 00:37:27 +0000 (21:37 -0300)] 
output/drop: add verdict field

Related to
Bug #5464

2 years agooutput/alert: add verdict field
Juliana Fajardini [Wed, 5 Jul 2023 15:52:53 +0000 (12:52 -0300)] 
output/alert: add verdict field

Related to
Bug #5464

2 years agomisc: fix typos & update copyright years
Juliana Fajardini [Thu, 5 Jan 2023 21:24:40 +0000 (18:24 -0300)] 
misc: fix typos & update copyright years

2 years agoutil/mime: skip over any invalid char
Shivani Bhardwaj [Tue, 11 Jul 2023 09:12:05 +0000 (14:42 +0530)] 
util/mime: skip over any invalid char

For certain edge case handling for spaces, spaces were handled
particularly in the remainder processing functions. Make sure that now
that as per RFC 2045, util-base64 would skip over any invalid char, the
edge cases in MIME processor also be handled the same way.

This completes the work done in e46b033.

Ticket 6135
Ticket 6207

2 years agohttp2: do not append data after closing file 9224/head
Philippe Antoine [Wed, 12 Jul 2023 07:42:47 +0000 (09:42 +0200)] 
http2: do not append data after closing file

Ticket: #6211

Completes commit 02dece5db5170ae9bd946d0b8805e45ac071a97c

Once a http2 stream has end of stream flag, we close the file.
If we see new data frames with this stream id, the new_chunk
function should ignore them as the file was already closed.

2 years agodoc/upgrade: add more 6 to 7 changes and minor improvements
Andreas Herz [Tue, 11 Jul 2023 14:28:12 +0000 (16:28 +0200)] 
doc/upgrade: add more 6 to 7 changes and minor improvements

Issue: #5473

2 years agoconfig/swf: SWF deprecation warning message
Jeff Lucovsky [Tue, 11 Jul 2023 13:04:58 +0000 (09:04 -0400)] 
config/swf: SWF deprecation warning message

Issue: 6183

Issue a deprecation warning if SWF decompression is enabled.

2 years agoflow/hash: fix and cleanup key/flow_id getters
Victor Julien [Mon, 10 Jul 2023 13:25:04 +0000 (15:25 +0200)] 
flow/hash: fix and cleanup key/flow_id getters

Bug: #6205.

2 years agodoc: hyperscan information updated
jason taylor [Tue, 28 Feb 2023 22:46:32 +0000 (22:46 +0000)] 
doc: hyperscan information updated

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agodoc: add multi buffer support note to keyword docs
jason taylor [Wed, 5 Jul 2023 23:58:16 +0000 (23:58 +0000)] 
doc: add multi buffer support note to keyword docs

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agodoc: add multiple buffer matching documentation
jason taylor [Wed, 5 Jul 2023 23:32:45 +0000 (23:32 +0000)] 
doc: add multiple buffer matching documentation

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agodoc/userguide: more eve http upgrade notes
Jason Ish [Thu, 6 Jul 2023 22:56:50 +0000 (16:56 -0600)] 
doc/userguide: more eve http upgrade notes

Add more information with a examples of how the changes to EVE HTTP
logging may affect users.

2 years agouserguide: add details about tcp flow pass
jason taylor [Thu, 15 Jun 2023 18:17:24 +0000 (18:17 +0000)] 
userguide: add details about tcp flow pass

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agorequirements: use libhtp 0.5.45
Victor Julien [Wed, 12 Jul 2023 17:31:00 +0000 (19:31 +0200)] 
requirements: use libhtp 0.5.45

2 years agodetect/filemagic: fix thread ctx registration; reloads
Victor Julien [Wed, 12 Jul 2023 06:25:28 +0000 (08:25 +0200)] 
detect/filemagic: fix thread ctx registration; reloads

Make sure thread ctx registration happens and id remains correct
in case of reloads.

To do so, move id var into the detect ctx.

2 years agodetect: more compact layout of DetectEngineCtx
Victor Julien [Wed, 12 Jul 2023 06:08:37 +0000 (08:08 +0200)] 
detect: more compact layout of DetectEngineCtx

2 years agodetect: reduce failure_fatal to bool to save space
Victor Julien [Wed, 12 Jul 2023 06:05:29 +0000 (08:05 +0200)] 
detect: reduce failure_fatal to bool to save space

2 years agospm: reduce spm_matcher size to uint8_t
Victor Julien [Wed, 12 Jul 2023 06:00:47 +0000 (08:00 +0200)] 
spm: reduce spm_matcher size to uint8_t

No more space is needed.

2 years agodetect: create more strict rule validation
Victor Julien [Tue, 4 Jul 2023 18:42:23 +0000 (20:42 +0200)] 
detect: create more strict rule validation

Don't allow control characters other than LF, CR, TAB.

2 years agodetect/iponly: fix minor warning with unittest but no debug 9200/head
Victor Julien [Tue, 11 Jul 2023 04:46:07 +0000 (06:46 +0200)] 
detect/iponly: fix minor warning with unittest but no debug

2 years agogithub-ci: run cocci in fedora 38
Victor Julien [Mon, 10 Jul 2023 12:50:44 +0000 (14:50 +0200)] 
github-ci: run cocci in fedora 38

2 years agodetect/byte_math: Permit var name for bytes value 9198/head
Jeff Lucovsky [Sun, 9 Jul 2023 14:44:26 +0000 (10:44 -0400)] 
detect/byte_math: Permit var name for bytes value

Issue: 6145

Modifications to permit a variable name to be used for the byte_math
bytes value.