Skip to content

next/1572/80x/20261127/v1 - #16755

Draft
victorjulien wants to merge 15 commits into
OISF:main-8.0.xfrom
victorjulien:next/1572/80x/20261127/v1
Draft

victorjulien wants to merge 15 commits into
OISF:main-8.0.xfrom
victorjulien:next/1572/80x/20261127/v1

Conversation

@victorjulien

Copy link
Copy Markdown
Member

inashivb and others added 15 commits November 27, 2026 18:05
DCERPC REQUEST/RESPONSE records can have their stub data fragmented
across multiple PDUs. The flags that convey the state of the current PDU
are as follows:

PFC_FIRST_FRAG: first fragment of (fragmented) data
PFC_LAST_FRAG: last fragment of (fragmented) data
PFC_FIRST_FRAG && PFC_LAST_FRAG: no fragmentation

Consider a REQUEST/RESPONSE complete only when the PFC_LAST_FRAG flag is
found to be set.

Ticket: 9240
(cherry picked from commit 4e875c8)
Really count the fragments, and set it done when last was received

(cherry picked from commit 5bb9a0c)
Do not process on the current input whatever it is after already having
dealt with the header and maybe other PDUs in a multi PDU setup, get
current PDU from the correct offset.
This is minimized version of ed1bd86 removing formatting changes etc
and keeping only the real logic for the bug fix.

Bug 7546
Rust std library's saturating_add ensures safety against overflows by
capping the value at the max, use that instead.

(cherry picked from commit 1f762c1)
Remove the check for Flow.storage being NULL. With flex arrays, as long as the
flow is allocated, .storage will never be NULL. We do make sure the flow
is not NULL, and the storage functions are safe to the storage being
NULL.

Prevents NDPI from accessing this flow field to be less sensitive to ABI
changes with respect to data structure sizes.

Ticket: OISF#8632

Backport note: main-8.0.x still uses the un-prefixed FlowGetStorageById and
StorageGetById names, so the removed comment conflicted. The same checks are
removed and the 8.0 function names are kept.

(cherry picked from commit f739a8a)
Backport note: main-8.0.x has FlowSetStorageById rather than the SC-prefixed
SCFlowSetStorageById, so the call conflicted. The same return check and cleanup
are applied to the 8.0 function.

(cherry picked from commit 038d4a2)
Add accessor functions to allow NDPI and our plugin examples to access
flow fields in an opaque manner.

Provides accessors for:

- is ipv4
- is ipv6
- ip protocol
- to server packet count
- to destination packet count

Ticket: OISF#8632

Backport note: main-8.0.x has no src/flow-bindgen.h and no flow functions in
rust/sys, so the accessors are declared in src/flow.h next to the existing
un-prefixed flow accessors and the rust/sys bindings are dropped. Only the C
API is needed on this branch.

(cherry picked from commit c0de5bc)
To prevent direct access to the flow structure and be subject to changes
in its size.

Ticket: OISF#8632
(cherry picked from commit 06235a3)
To prevent direct access to the flow structure and be subject to changes
in its size.

Ticket: OISF#8632

Backport note: on main-8.0.x the flags and port accessors are still named
FlowGetFlags, FlowGetSourcePort and FlowGetDestinationPort, without the SC
prefix they have on main. Those 8.0 names are used here.

(cherry picked from commit f205d18)
Expose source and destination addresses as raw byte pointers, so FFI
callers do not need the internal FlowAddress layout.

Backport note: main-8.0.x has no src/flow-bindgen.h and no flow functions in
rust/sys, so the accessors are declared in src/flow.h and the rust/sys bindings
are dropped. Only the C API is needed on this branch.

(cherry picked from commit bedd65f)
Flowints are implemented as u32 and they allow subtraction as one of the
operations that can be performed on them without any check for
underflow. Saturate to 0 when the flowint is about to underflow.

Ticket: 9429
(cherry picked from commit 9291ae5)
Flowints are implemented as u32 and they allow addition as one of the
operations that can be performed on them without any check for
overflow. Saturate to U32_MAX when flowint is about to overflow.

Ticket: 9429
(cherry picked from commit 8405cad)
flowint behavior changed recently with it no longer wrapping around on
either of the boundaries hit.

Ticket: 9429

Backport note: Place the keyword change under 8.0.9 in the upgrade guide.

(cherry picked from commit 2d4a0fd)
le_slice_to_string() was the only user: it built a U16CString to
validate and convert UTF-16 input. String::from_utf16 does the same
conversion with the same error on invalid data, so the crate goes away.

Ticket: OISF#5256
Ticket: OISF#8724

Backport note: Remove only widestring from the stable Cargo manifest and
lockfile, retaining the other stable dependencies and versions.

(cherry picked from commit d7a4c61)

@suricata-review-bot suricata-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review.

Verdict: approve

Commit message typos:

  • Commit message typo — 337aeb191 — This is minimized version of ed1bd8624 → This is a minimized version of ed1bd8624

Redmine ticket not yet In Review: #5256 (In Progress). Please set it to In Review. Redmine ticket closed more than 30 days ago: #7546 (Closed 2026-02-06). Please check the ticket ID.

Automated at commit 31cb5c358da8 using Claude Code with claude-opus-5-5/xhigh. Run: db762aa31ea25e23.

@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.19%. Comparing base (8c13932) to head (31cb5c3).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-8.0.x   #16755      +/-   ##
==============================================
- Coverage       82.20%   82.19%   -0.02%     
==============================================
  Files            1020     1020              
  Lines          284688   284703      +15     
==============================================
- Hits           234028   234002      -26     
- Misses          50660    50701      +41     
Flag Coverage Δ
fuzzcorpus 63.66% <64.51%> (-0.01%) ⬇️
livemode 18.36% <0.00%> (+0.01%) ⬆️
netns 19.83% <0.00%> (-0.01%) ⬇️
pcap 45.21% <51.61%> (+<0.01%) ⬆️
suricata-verify 66.90% <74.19%> (-0.02%) ⬇️
unittests 59.26% <59.37%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jasonish jasonish left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early review, staging looks OK.

@suricata-qa

Copy link
Copy Markdown

WARNING:

field baseline test %
SURI_TLPR1_stats_chk
.app_layer.flow.ftp-data 703 675 96.02%

Pipeline = 36163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants