]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agodoc: update base64_decode notes 7987/head
Shivani Bhardwaj [Mon, 10 Oct 2022 11:11:09 +0000 (16:41 +0530)] 
doc: update base64_decode notes

2 years agobase64: add and clean tests
Shivani Bhardwaj [Fri, 7 Oct 2022 06:31:45 +0000 (12:01 +0530)] 
base64: add and clean tests

2 years agobase64: add new mode as per RFC 4648
Shivani Bhardwaj [Wed, 5 Oct 2022 11:10:07 +0000 (16:40 +0530)] 
base64: add new mode as per RFC 4648

As per RFC 4648,
Implementations MUST reject the encoded data if it contains characters
outside the base alphabet when interpreting base-encoded data, unless
the specification referring to this document explicitly states
otherwise.

Add a new mode BASE64_MODE_RFC4648, and handle input strictly as per the
specification.

Bug 5223

2 years agotransversal: remove suricata-ids.org references 7983/head
Lukas Sismis [Mon, 10 Oct 2022 20:00:37 +0000 (22:00 +0200)] 
transversal: remove suricata-ids.org references

2 years agogithub-actions: bump actions/checkout from 2 to 3.1.0 7966/head
dependabot[bot] [Tue, 4 Oct 2022 10:20:51 +0000 (10:20 +0000)] 
github-actions: bump actions/checkout from 2 to 3.1.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.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/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-actions: bump actions/cache from 3.0.8 to 3.0.10
dependabot[bot] [Mon, 3 Oct 2022 19:42:13 +0000 (19:42 +0000)] 
github-actions: bump actions/cache from 3.0.8 to 3.0.10

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/fd5de65bc895cf536527842281bea11763fefd77...56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub-ci: add workflow for rust clippy
Jason Ish [Mon, 3 Oct 2022 22:30:31 +0000 (16:30 -0600)] 
github-ci: add workflow for rust clippy

2 years agorust: fix clippy lint for null comparison
Jason Ish [Mon, 3 Oct 2022 22:20:06 +0000 (16:20 -0600)] 
rust: fix clippy lint for null comparison

Use .is_null() instead of checking for equality against
std::ptr::null().

2 years agorust/modbus: derive default instead of manual impl
Jason Ish [Mon, 3 Oct 2022 22:17:07 +0000 (16:17 -0600)] 
rust/modbus: derive default instead of manual impl

Cleans up a clippy lint for a trivial default impl that can be derived.

2 years agorust/frames: cleanup clippy lint for unsafe
Jason Ish [Mon, 3 Oct 2022 22:15:12 +0000 (16:15 -0600)] 
rust/frames: cleanup clippy lint for unsafe

Where possible mark the relevant functions unsafe.  Otherwise suppress
the warning for now as this pattern is supposed to be a safe API around
an unsafe one. Might need some further investigation, but in general the
"guarantee" here is provided from the C side.

2 years agorust: fix clippy lint for unnecessary_unwrap
Jason Ish [Mon, 3 Oct 2022 22:01:09 +0000 (16:01 -0600)] 
rust: fix clippy lint for unnecessary_unwrap

Avoid check if not none followed by unwrap.

2 years agorust: fix clippy lint for single_char_add_str
Jason Ish [Mon, 3 Oct 2022 21:44:06 +0000 (15:44 -0600)] 
rust: fix clippy lint for single_char_add_str

Idiomatic cleanup and a fix automatically done by `cargo clippy --fix`.

2 years agorust: fix clippy lint for bool_assert_comparison
Jason Ish [Mon, 3 Oct 2022 21:42:20 +0000 (15:42 -0600)] 
rust: fix clippy lint for bool_assert_comparison

Checking for is_empty is faster than checking for equality.

2 years agorust: fix clippy lint for partialeq_to_none
Jason Ish [Mon, 3 Oct 2022 21:40:46 +0000 (15:40 -0600)] 
rust: fix clippy lint for partialeq_to_none

Use .is_some() and .is_none() instead of comparing against None.
Comparing against None requires a value to impl PartialEq, is_none() and
is_some() do not and are more idiomatic.

2 years agorust: fix clippy lint for explicit_auto_deref
Jason Ish [Mon, 3 Oct 2022 21:35:35 +0000 (15:35 -0600)] 
rust: fix clippy lint for explicit_auto_deref

This adds unnecessary complexity to code.

2 years agorust: fix clippy lint for needless_late_init
Jason Ish [Mon, 3 Oct 2022 21:32:07 +0000 (15:32 -0600)] 
rust: fix clippy lint for needless_late_init

2 years agorust: fix clippy lint for borrow_deref_ref
Jason Ish [Mon, 3 Oct 2022 21:28:50 +0000 (15:28 -0600)] 
rust: fix clippy lint for borrow_deref_ref

This type of borrow then reference has no effect.

2 years agorust: fix clippy lint for redundant_closure
Jason Ish [Mon, 3 Oct 2022 21:25:50 +0000 (15:25 -0600)] 
rust: fix clippy lint for redundant_closure

Removes a closure where the function can be directly provided.

2 years agorust: fix clippy ling for needless borrows
Jason Ish [Mon, 3 Oct 2022 21:09:32 +0000 (15:09 -0600)] 
rust: fix clippy ling for needless borrows

Cleanup needless borrows found by clippy. This fix done automatically by
`cargo clippy --fix`.

2 years agorust: allow some more clippy lints
Jason Ish [Mon, 3 Oct 2022 21:21:35 +0000 (15:21 -0600)] 
rust: allow some more clippy lints

Allow these lints for now until some more investigation can be done, as
--fix attempts to fix these.

2 years agorust: compile check rewording
Victor Julien [Tue, 4 Oct 2022 09:21:40 +0000 (11:21 +0200)] 
rust: compile check rewording

2 years agostream/rules: disable depth rule by default
Victor Julien [Tue, 4 Oct 2022 08:48:56 +0000 (10:48 +0200)] 
stream/rules: disable depth rule by default

2 years agodpdk: allow specifying RSS hash function flags in the config
Lukas Sismis [Tue, 13 Sep 2022 09:39:42 +0000 (11:39 +0200)] 
dpdk: allow specifying RSS hash function flags in the config

Ticket: #5400

2 years agodoc/dpdk: add IPS setup docs for DPDK mode
Lukas Sismis [Thu, 15 Sep 2022 13:21:40 +0000 (15:21 +0200)] 
doc/dpdk: add IPS setup docs for DPDK mode

Ticket: #5511

2 years agoeve: explicit default when setting port 7959/head
Eric Leblond [Sun, 2 Oct 2022 13:00:39 +0000 (15:00 +0200)] 
eve: explicit default when setting port

2 years agoeve: micro simplification
Eric Leblond [Sun, 2 Oct 2022 12:57:28 +0000 (14:57 +0200)] 
eve: micro simplification

2 years agoeve/schema: update following flow changes
Eric Leblond [Sun, 25 Sep 2022 17:56:47 +0000 (19:56 +0200)] 
eve/schema: update following flow changes

2 years agoeve/alert: add direction field to log data way
Eric Leblond [Fri, 16 Apr 2021 21:21:49 +0000 (23:21 +0200)] 
eve/alert: add direction field to log data way

Add a key in the event to specify if the data that did
trigger the alert are in to_client or to_server direction.

2 years agoeve/alert: add src and dest info to flow in alert
Eric Leblond [Sun, 2 Oct 2022 12:42:21 +0000 (14:42 +0200)] 
eve/alert: add src and dest info to flow in alert

When looking at an alert event, it was impossible to determine which
side from src or dest IP in the alert was the client and wich side
was the server with regards to the underlying flow. This was a problem
when you try to known who belongs a metadata property such as a HTTP
hostname or a TLS JA3.

This patch updates the code to add src and dest IP in the flow
subobject as well as src and dst port. This way, we can now which
side is the client and which side is the server.

The result is looking like:

{
  "event_type": "alert",
  "src_ip": "22.47.184.196",
  "src_port": 81,
  "dest_ip": "192.168.1.47",
  "dest_port": 1063,
  "proto": "TCP",
  "tx_id": 0,
  "alert": {
    "signature_id": 2018959,
    "rev": 3,
  },
  "app_proto": "http",
  "flow": {
    "pkts_toserver": 22,
    "pkts_toclient": 35,
    "bytes_toserver": 1370,
    "bytes_toclient": 48852,
    "start": "2009-10-28T10:01:46.755232+0100",
    "src_ip": "192.168.1.47",
    "dest_ip": "22.47.184.196",
    "src_port": 1063,
    "dest_port": 81
  }
}

2 years agounix-socket: add command to get flow stats
Eric Leblond [Thu, 25 Mar 2021 08:16:48 +0000 (09:16 +0100)] 
unix-socket: add command to get flow stats

Add a command to extract the accounting data from a live
flow using the unix socket. It takes the flow_id as param
and return the volume of data seen on the flow as well as
its age.

2 years agoflow: add function to get flow using flow_id
Eric Leblond [Fri, 26 Mar 2021 00:00:31 +0000 (01:00 +0100)] 
flow: add function to get flow using flow_id

2 years agoflow: change flow id computation method
Eric Leblond [Thu, 25 Mar 2021 23:13:43 +0000 (00:13 +0100)] 
flow: change flow id computation method

Previous method was truncating the flow hash value when building
the flow_id. It is interesting not to loose the flow hash value
as it can be used in other tools or to interact with a flow that
is still active.

2 years agojson/flow: log if flow had gap in TCP
Eric Leblond [Tue, 23 Mar 2021 22:45:22 +0000 (23:45 +0100)] 
json/flow: log if flow had gap in TCP

2 years agoflow: add function to say if there is gap
Eric Leblond [Mon, 20 Jun 2022 19:13:31 +0000 (21:13 +0200)] 
flow: add function to say if there is gap

2 years agostream: flag TCP streams with gap
Eric Leblond [Tue, 23 Mar 2021 22:06:41 +0000 (23:06 +0100)] 
stream: flag TCP streams with gap

2 years agorust/smb: avoid allocation in smb status function
Eric Leblond [Sun, 25 Sep 2022 09:51:32 +0000 (11:51 +0200)] 
rust/smb: avoid allocation in smb status function

Avoid an allocation by returning a static string.

2 years agodetect/smb: add smb.ntlmssp_domain keyword
Eric Leblond [Thu, 13 Jan 2022 10:41:49 +0000 (11:41 +0100)] 
detect/smb: add smb.ntlmssp_domain keyword

Feature #5411.

2 years agorust/smb1: add a missing command
Eric Leblond [Thu, 20 Jan 2022 20:43:19 +0000 (21:43 +0100)] 
rust/smb1: add a missing command

2 years agodetect/smb: add smb.ntlmssp_user keyword
Eric Leblond [Thu, 13 Jan 2022 10:28:54 +0000 (11:28 +0100)] 
detect/smb: add smb.ntlmssp_user keyword

Feature #5411.

2 years agorust/smb: import NT status code for Microsoft doc
Eric Leblond [Sun, 19 Dec 2021 13:32:21 +0000 (14:32 +0100)] 
rust/smb: import NT status code for Microsoft doc

This patch updates the NT status code definition to use the status
definition used on Microsoft documentation website. A first python
script is building JSON object with code definition.

```
import json
from bs4 import BeautifulSoup
import requests

ntstatus = requests.get('https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55')

ntstatus_parsed = BeautifulSoup(ntstatus.text, 'html.parser')

ntstatus_parsed = ntstatus_parsed.find('tbody')

ntstatus_dict = {}

for item in ntstatus_parsed.find_all('tr'):
    cell = item.find_all('td')
    if len(cell) == 0:
        continue
    code = cell[0].find_all('p')
    description_ps = cell[1].find_all('p')
    description_list = []
    if len(description_ps):
        for desc in description_ps:
            if not desc.string is None:
                description_list.append(desc.string.replace('\n ', ''))
    else:
        description_list = ['Description not available']
    if not code[0].string.lower() in ntstatus_dict:
        ntstatus_dict[code[0].string.lower()] = {"text": code[1].string, "desc": ' '.join(description_list)}

print(json.dumps(ntstatus_dict))
```

The second one is generating the code that is ready to be inserted into the
source file:

```
import json

ntstatus_file = open('ntstatus.json', 'r')

ntstatus = json.loads(ntstatus_file.read())

declaration_format = 'pub const SMB_NT%s:%su32 = %s;\n'
resolution_format = '        SMB_NT%s%s=> "%s",\n'

declaration = ""
resolution = ""

text_max = len(max([ntstatus[x]['text'] for x in ntstatus.keys()], key=len))

for code in ntstatus.keys():
    text = ntstatus[code]['text']
    text_spaces = ' ' * (4 + text_max - len(text))
    declaration += declaration_format % (text, text_spaces, code)
    resolution += resolution_format % (text, text_spaces, text)

print(declaration)
print('\n')
print('''
pub fn smb_ntstatus_string(c: u32) -> String {
    match c {
''')
print(resolution)
print('''
        _ => { return (c).to_string(); },
    }.to_string()
}
''')
```

Bug #5412.

2 years agodetect: remove unused data struct 7954/head 7957/head
Victor Julien [Thu, 29 Sep 2022 11:09:52 +0000 (13:09 +0200)] 
detect: remove unused data struct

2 years agoeve/schema: flow/stream updates
Victor Julien [Fri, 23 Sep 2022 21:07:04 +0000 (23:07 +0200)] 
eve/schema: flow/stream updates

2 years agoflow/worker: process injected flows more gradually
Victor Julien [Mon, 26 Sep 2022 07:54:37 +0000 (09:54 +0200)] 
flow/worker: process injected flows more gradually

Worker threads are responsible for final processing of timed out flows.
These are selected by the Flow Manager and inserted into a per thread
queue. The Flow Worker then checks this queue after each packet. Due to
the burstiness of this process, the packet threads would sometimes process
a lot of these flows in the context of a single packet, leading to spike
in latency which might cause packet loss.

This patch changes the behavior to only process at max 2 flows per packet.
This way added processing cost is amortized over many packets.

2 years agoflow: count max number of injected flows in workers
Victor Julien [Sun, 25 Sep 2022 09:40:21 +0000 (11:40 +0200)] 
flow: count max number of injected flows in workers

2 years agostream: reduce pool locking overhead
Victor Julien [Fri, 23 Sep 2022 20:54:52 +0000 (22:54 +0200)] 
stream: reduce pool locking overhead

Add thread local cache to avoid locking overhead for ssns and segments.

A thread will return segments/ssns to a local cache first, and if that
is full, to a return queue where the actual return to the pool returns
a batch, to amortize locking overhead.

Adds segment and session pool/cache counters to see where how effective
the cache is.

2 years agostream: minor test cleanup
Victor Julien [Sat, 24 Sep 2022 19:08:30 +0000 (21:08 +0200)] 
stream: minor test cleanup

2 years agococci: fix python issues
Victor Julien [Wed, 21 Sep 2022 08:17:38 +0000 (10:17 +0200)] 
cocci: fix python issues

2 years agofiles: only call loggers is there is work to do
Victor Julien [Wed, 21 Sep 2022 07:34:08 +0000 (09:34 +0200)] 
files: only call loggers is there is work to do

2 years agofilestore: remove obsolete checks
Victor Julien [Wed, 21 Sep 2022 06:48:37 +0000 (08:48 +0200)] 
filestore: remove obsolete checks

2 years agofilestore: fix empty file not opening, but trying to close
Victor Julien [Wed, 21 Sep 2022 06:46:46 +0000 (08:46 +0200)] 
filestore: fix empty file not opening, but trying to close

2 years agoapp-layer: reduce app cleanup and output-tx calls
Victor Julien [Sat, 17 Sep 2022 09:25:22 +0000 (11:25 +0200)] 
app-layer: reduce app cleanup and output-tx calls

Track packets that updated the app-layer, and for those run
the transaction housekeeping and output-tx logging loops.

Do the same of end of flow packets.

This skips needless iterations over the transaction stores.

2 years agooutput/tx: minor cleanups/optimizations
Victor Julien [Sun, 18 Sep 2022 08:10:28 +0000 (10:10 +0200)] 
output/tx: minor cleanups/optimizations

2 years agosrc: includes cleanup
Victor Julien [Fri, 16 Sep 2022 09:08:21 +0000 (11:08 +0200)] 
src: includes cleanup

Work towards making `suricata-common.h` only introduce system headers
and other things that are independent of complex internal Suricata
data structures.

Update files to compile after this.

Remove special DPDK handling for strlcpy and strlcat, as this caused
many compilation failures w/o including DPDK headers for all files.

Remove packet macros from decode.h and move them into their own file,
turn them into functions and rename them to match our function naming
policy.

2 years agodetect: clean up detect-engine-state.h
Victor Julien [Thu, 15 Sep 2022 18:51:54 +0000 (20:51 +0200)] 
detect: clean up detect-engine-state.h

Remove prototypes that are not about purely the data structures.

2 years agodetect: remove wrapper func
Victor Julien [Thu, 15 Sep 2022 18:07:28 +0000 (20:07 +0200)] 
detect: remove wrapper func

2 years agodetect: move DetectTransaction to header its used in
Victor Julien [Thu, 15 Sep 2022 18:04:34 +0000 (20:04 +0200)] 
detect: move DetectTransaction to header its used in

2 years agodetect/files: optimize file.data by skipping non-file txs
Victor Julien [Thu, 15 Sep 2022 08:54:02 +0000 (10:54 +0200)] 
detect/files: optimize file.data by skipping non-file txs

As well as 'file' txs not in our direction.

Implement the same logic for file.name and file.magic prefilter engines.

2 years agofiles/tx: inspection, logging and loop optimizations
Victor Julien [Wed, 14 Sep 2022 13:38:04 +0000 (15:38 +0200)] 
files/tx: inspection, logging and loop optimizations

Introduce AppLayerTxData::file_tx as direction(s) indicator for transactions.
When set to 0, its not a file tx and it will not be considered for file
inspection, logging and housekeeping tasks.

Various tx loop optimizations in housekeeping and output.

Update the "file capable" app-layers to set the fields based on their
directional file support as well as on the traffic.

2 years agodetect/tx: add AppLayerTxData to PrefilterTx
Victor Julien [Thu, 15 Sep 2022 08:45:46 +0000 (10:45 +0200)] 
detect/tx: add AppLayerTxData to PrefilterTx

In preparation of some file inspection optimizations, for which we need the
tx data.

Update all users.

2 years agofiles: remove unused code
Victor Julien [Tue, 23 Aug 2022 15:51:26 +0000 (17:51 +0200)] 
files: remove unused code

2 years agofiles: don't set NOSTORE in 'store all' case
Victor Julien [Mon, 22 Aug 2022 17:16:06 +0000 (19:16 +0200)] 
files: don't set NOSTORE in 'store all' case

2 years agosmtp: remove bad tests
Victor Julien [Sat, 5 Feb 2022 08:31:34 +0000 (09:31 +0100)] 
smtp: remove bad tests

2 years agoapp-layer: move files into transactions
Victor Julien [Sat, 5 Feb 2022 08:20:07 +0000 (09:20 +0100)] 
app-layer: move files into transactions

Update APIs to store files in transactions instead of the per flow state.

Goal is to avoid the overhead of matching up files and transactions in
cases where there are many of both.

Update all protocol implementations to support this.

Update file logging logic to account for having files in transactions. Instead
of it acting separately on file containers, it is now tied into the
transaction logging.

Update the filestore keyword to consider a match if filestore output not
enabled.

2 years agoapp-layer: trunc parser per direction
Victor Julien [Sat, 5 Feb 2022 07:53:58 +0000 (08:53 +0100)] 
app-layer: trunc parser per direction

2 years agoapp-layer: parser flags to u16
Victor Julien [Fri, 19 Aug 2022 08:49:41 +0000 (10:49 +0200)] 
app-layer: parser flags to u16

2 years agoapp-layer: specify direction in tx cleanup
Victor Julien [Fri, 19 Aug 2022 09:08:04 +0000 (11:08 +0200)] 
app-layer: specify direction in tx cleanup

In preparation of per tx files storage.

2 years agoapp-layer: introduce common AppLayerStateData API
Victor Julien [Mon, 26 Apr 2021 12:36:32 +0000 (14:36 +0200)] 
app-layer: introduce common AppLayerStateData API

Add per state structure for storing flags and other variables.

2 years agofile: minor debug updates
Victor Julien [Fri, 10 Jun 2022 06:02:03 +0000 (08:02 +0200)] 
file: minor debug updates

2 years agofile: clean up file flags handling
Victor Julien [Fri, 10 Jun 2022 06:01:15 +0000 (08:01 +0200)] 
file: clean up file flags handling

2 years agofiles: debug log flags
Victor Julien [Thu, 10 Jun 2021 19:06:54 +0000 (21:06 +0200)] 
files: debug log flags

2 years agolua: store id with tx ptr
Victor Julien [Thu, 10 Jun 2021 17:55:38 +0000 (19:55 +0200)] 
lua: store id with tx ptr

2 years agouserguide: Add rule file globbing option details 7948/head
jason taylor [Wed, 21 Sep 2022 20:26:32 +0000 (20:26 +0000)] 
userguide: Add rule file globbing option details

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agogithub-actions: bump codecov/codecov-action from 3.1.0 to 3.1.1
dependabot[bot] [Sat, 24 Sep 2022 05:47:57 +0000 (05:47 +0000)] 
github-actions: bump codecov/codecov-action from 3.1.0 to 3.1.1

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/81cd2dc8148241f03f5839d295e000b8f761e378...d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70)

---
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>
2 years agogithub-actions: bump ossf/scorecard-action from 2.0.3 to 2.0.4
dependabot[bot] [Wed, 28 Sep 2022 19:38:15 +0000 (19:38 +0000)] 
github-actions: bump ossf/scorecard-action from 2.0.3 to 2.0.4

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.3 to 2.0.4.
- [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/865b4092859256271290c77adbd10a43f4779972...e363bfca00e752f91de7b7d2a77340e2e523cb18)

---
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>
2 years agodecode-ipv4: adjust validation to RFC
Sascha Steinbiss [Thu, 22 Sep 2022 13:13:05 +0000 (15:13 +0200)] 
decode-ipv4: adjust validation to RFC

RFC1108 only specifies a minimum field length of 3, not
a fixed length of 11.

2 years agodecode-ipv4: implement extended security option
Sascha Steinbiss [Thu, 22 Sep 2022 13:10:47 +0000 (15:10 +0200)] 
decode-ipv4: implement extended security option

IP option 0x85 (extended security) is mentioned in the
documentation for the ipopts keyword but was not implemented.

2 years agoci: build with -Wimplicit-int-conversion
Philippe Antoine [Tue, 27 Sep 2022 14:01:28 +0000 (16:01 +0200)] 
ci: build with -Wimplicit-int-conversion

Seems to have got lost on the way in CFLAGS

2 years agossl: fix compiler warning
Philippe Antoine [Tue, 27 Sep 2022 13:47:06 +0000 (15:47 +0200)] 
ssl: fix compiler warning

implicit conversion loses integer precision: 'int' to 'uint16_t'
because C shifts << translates automatically to signed integers

2 years agorust: lock to time 0.3.13 to avoid MSRV bump to 1.59
Victor Julien [Fri, 26 Aug 2022 12:12:44 +0000 (14:12 +0200)] 
rust: lock to time 0.3.13 to avoid MSRV bump to 1.59

Indirect dependency through x509-parser.

2 years agorust: remove nom 5 dependency
Pierre Chifflier [Wed, 19 Jan 2022 14:56:50 +0000 (15:56 +0100)] 
rust: remove nom 5 dependency

2 years agorust/applayertemplate: convert to nom7
Pierre Chifflier [Wed, 19 Jan 2022 14:06:21 +0000 (15:06 +0100)] 
rust/applayertemplate: convert to nom7

2 years agorust/asn1: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 14:06:05 +0000 (15:06 +0100)] 
rust/asn1: convert parsers to nom7

2 years agorust/x509: finish transition to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:30:54 +0000 (14:30 +0100)] 
rust/x509: finish transition to nom7

2 years agorust/telnet: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:28:30 +0000 (14:28 +0100)] 
rust/telnet: convert parsers to nom7

2 years agorust/conf: convert parser to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:26:57 +0000 (14:26 +0100)] 
rust/conf: convert parser to nom7

2 years agorust/ssh: finish transition to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:21:46 +0000 (14:21 +0100)] 
rust/ssh: finish transition to nom7

2 years agorust/rdp: convert parsers to nom7
Pierre Chifflier [Wed, 19 Jan 2022 13:11:26 +0000 (14:11 +0100)] 
rust/rdp: convert parsers to nom7

2 years agorust/rdp: upgrade dependency on tls-parser
Pierre Chifflier [Wed, 12 Jan 2022 09:56:20 +0000 (10:56 +0100)] 
rust/rdp: upgrade dependency on tls-parser

2 years agorust: upgrade versions of BER/DER, Kerberos and SNMP parsers
Pierre Chifflier [Tue, 11 Jan 2022 14:50:55 +0000 (15:50 +0100)] 
rust: upgrade versions of BER/DER, Kerberos and SNMP parsers

2 years agorust: update x509-parser to 0.14.0
Jason Ish [Mon, 11 Apr 2022 17:22:06 +0000 (11:22 -0600)] 
rust: update x509-parser to 0.14.0

Resolves RustSec issues in time and chrono:
- https://rustsec.org/advisories/RUSTSEC-2020-0071
- https://rustsec.org/advisories/RUSTSEC-2020-0159

Ticket: #5259.

Ammended by Victor Julien to bump to 0.14 instead of 0.13.

2 years agorust/x509: update dependency on x509-parser
Pierre Chifflier [Mon, 1 Nov 2021 13:44:11 +0000 (14:44 +0100)] 
rust/x509: update dependency on x509-parser

2 years agostream: fix reachable assertion 7934/head
Victor Julien [Mon, 26 Sep 2022 15:14:39 +0000 (17:14 +0200)] 
stream: fix reachable assertion

Fix `Flow::thread_id` not always getting properly set up, leading to
a reachable assertion.

Bug #4582.

2 years agouserguide: add section about exception policies 7921/head
Juliana Fajardini [Thu, 15 Sep 2022 23:07:54 +0000 (20:07 -0300)] 
userguide: add section about exception policies

This describes briefly what the exception policies are, what is the
engine's behavior, what options are available and to which parts are
they implemented.

Task #5475
Task #5515

2 years agouserguide: minor rewording and typo fixes
Juliana Fajardini [Fri, 2 Sep 2022 17:27:15 +0000 (14:27 -0300)] 
userguide: minor rewording and typo fixes

Some of these were recently introduced, some were highlited after the
applayer sections got merged. Some paragraphs seem to have been changed
due to trying to respect character limits for lines. Also includes a
typo pointed out by one of our community members via Discord.

2 years agostream/tcp: typo fix
Juliana Fajardini [Fri, 16 Sep 2022 18:12:06 +0000 (15:12 -0300)] 
stream/tcp: typo fix

2 years agodetect: update ttl debug log messages
jason taylor [Wed, 21 Sep 2022 20:46:59 +0000 (20:46 +0000)] 
detect: update ttl debug log messages

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agodetect/stream_size: Rename detect.rs to stream_size.rs
Jeff Lucovsky [Thu, 25 Aug 2022 14:44:50 +0000 (10:44 -0400)] 
detect/stream_size: Rename detect.rs to stream_size.rs

This commit renames detect.rs to stream_size.rs to reflect its content.

2 years agodetect/iprep: Move iprep logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:39:34 +0000 (10:39 -0400)] 
detect/iprep: Move iprep logic into a separate module

2 years agodetect/uri: Move uri logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:32:19 +0000 (10:32 -0400)] 
detect/uri: Move uri logic into a separate module

2 years agodetect/uint: Move uint logic into a separate module
Jeff Lucovsky [Thu, 25 Aug 2022 14:27:00 +0000 (10:27 -0400)] 
detect/uint: Move uint logic into a separate module

This commit moves the uint logic into its own module.