Skip to content

Backport8 8678 v1 - #16119

Closed
catenacyber wants to merge 2 commits into
OISF:main-8.0.xfrom
catenacyber:backport8-8678-v1
Closed

Backport8 8678 v1#16119
catenacyber wants to merge 2 commits into
OISF:main-8.0.xfrom
catenacyber:backport8-8678-v1

Conversation

@catenacyber

Copy link
Copy Markdown
Contributor

Denis Balashov added 2 commits August 26, 2026 14:33
Ticket: 8678

In FilePruneFile() `window * 3` was computed in uint32_t arithmetic.
The guard exists to ensure `file->size > window`, so on wrap around
`file->size - window` underflows and content_inspected is set to a
bogus value, breaking file inspection.

Make window uint64_t so the multiplication cannot wrap.

(cherry picked from commit f3910d5)
Ticket: 8678

With an inspect window of 0xAAAAAAAB the `window * 3` guard wrapped to 1
in uint32_t arithmetic, so it passed for a 64 byte file and
content_inspected was set to `file->size - window`, an underflow.

(cherry picked from commit 8e551f2)
@suricata-review-bot

Copy link
Copy Markdown

AI-generated review posted automatically by Suricata ai-review.

Verdict: approve

No high- or medium-severity findings.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.69%. Comparing base (098022a) to head (d92646c).

Additional details and impacted files
@@              Coverage Diff               @@
##           main-8.0.x   #16119      +/-   ##
==============================================
- Coverage       81.71%   81.69%   -0.02%     
==============================================
  Files            1016     1016              
  Lines          277201   277223      +22     
==============================================
- Hits           226509   226477      -32     
- Misses          50692    50746      +54     
Flag Coverage Δ
fuzzcorpus 63.88% <100.00%> (-0.01%) ⬇️
livemode 18.64% <0.00%> (-0.02%) ⬇️
netns 20.15% <0.00%> (-0.01%) ⬇️
pcap 44.52% <100.00%> (+0.02%) ⬆️
suricata-verify 65.21% <100.00%> (-0.04%) ⬇️
unittests 58.61% <100.00%> (+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.

@victorjulien victorjulien added this to the 8.0 milestone Aug 26, 2026
@suricata-qa

Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 33376

@victorjulien

Copy link
Copy Markdown
Member

Merged in #16123, thanks!

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.

4 participants