Skip to content

next/1204/20260204/v1#14750

Merged
victorjulien merged 16 commits intoOISF:mainfrom
victorjulien:next/1204/20260204/v1
Feb 4, 2026
Merged

next/1204/20260204/v1#14750
victorjulien merged 16 commits intoOISF:mainfrom
victorjulien:next/1204/20260204/v1

Conversation

jlucovsky and others added 16 commits February 4, 2026 10:47
Issue: 6693

Add bitmask support to byte_jump
- Parse
- Calculate shift count
- Apply to value before applying multiplier
- Order items in DetectBytejumpData to reduce holes.

Snort:
See https://github.com/chenkc/snort2.9/blob/master/snort-2.9.11.1/src/detection-plugins/sp_byte_jump.c#L780
Issue: 6693

Clarify how the bitmask value is used for byte_jump

Snort compatibility says:
- The bitmask value is applied to the extracted value before the
  multiplier is applied.
- The result of the bitmask operation is to be right shifted by the
  number of trailing 0's in the bitmask value.
refs OISF#3065

* Fix to support the date format below
=> tls_cert_notafter:[<|>]YYYY
refs OISF#3065

* add explanation on omitted values
The parser could receive an input that consists of arbitrary data post
gap. This is handled in the beginning of the fn handle_input_data.
However, the rest of the calculation does not take into account the
bytes that were consumed at this stage. Fix the indices and calculations
to consider a new DCERPC fragment beginning post these consumed bytes.
So far, the fraglen defined in the header was used inconsistently in
certain places to define bounds on input length. Make it consistent by
making sure that only a slice up until fraglen is passed around as that
is the maximum length the fragment should have.
With the help of Applayer::incomplete API, the case when the
stream_slice passed to the parser is smaller than the header defined
fraglen is already handled.

Bug 7546
Unittests test_parse_bind_pdu_infinite_loop and
test_parse_bindack_pdu_infinite_loop seem to have artificially made up
header which does not hold up to the strict calculations enforced by the
parser now. Their headers mark the fraglens as 64 and 72 respectively
which are not enough to hold the kind of bind(ack) items that are expected.
It worked so far as the parser passed the entire input slice around but
with the bugfix for issue 7546, the input passed around is strictly
restricted to the fraglen parsed in the header.

Bug 7546
…ds doc

Redmine ticket: OISF#8261

According to [1], the within pointer (if combined with distance)
includes the distance pointer, which is not clearly visible in the
graphic.

Fixed this in a new graphic by some GIMP arts.

PS: Special thanks to one of our team members Annika C. for initially
spotting this!

[1] https://forum.suricata.io/t/is-within-affected-by-distance/1688
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

NOTE: This PR may contain new authors.

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

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

Good staging, good SV, waiting for CI+QA

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 96.48562% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.15%. Comparing base (c1d6958) to head (69eb567).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14750      +/-   ##
==========================================
- Coverage   82.17%   82.15%   -0.02%     
==========================================
  Files        1008     1003       -5     
  Lines      263938   263643     -295     
==========================================
- Hits       216878   216586     -292     
+ Misses      47060    47057       -3     
Flag Coverage Δ
fuzzcorpus 60.19% <87.44%> (-0.01%) ⬇️
livemode 18.71% <37.65%> (-0.02%) ⬇️
netns 18.53% <37.65%> (-0.03%) ⬇️
pcap 44.60% <56.90%> (-0.04%) ⬇️
suricata-verify 65.45% <87.44%> (+0.10%) ⬆️
unittests 59.23% <75.71%> (-0.13%) ⬇️

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.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline = 29411

@victorjulien victorjulien merged commit 69eb567 into OISF:main Feb 4, 2026
62 checks passed
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.

8 participants