Skip to content

Conversation

@victorjulien
Copy link
Member

Lukas Sismis and others added 6 commits January 28, 2026 12:38
To explain a bit more the TOCTOU issue found, we can consider
a case where Suricata starts to prune, yet externally somebody also
starts erasing cache files.
Right after Suricata checks the file age with the stat function,
somebody may delete or update the file of our interest.

Suricata aging decision doesn't reflect the actual state of the file.
This commit additionally adds a check for noent failure of the unlink operation
(considered as a success). The code can still delete a file that is recently
updated but was considered stale.

In the documentation-following deployments this should not happen anyway as
one cache folder should only be used by a single Suricata instance (and within
Suricata instance only one thread handles cache eviction).
Additionally, the `stat` and `unlink` command are immediatelly followed, making
this scenario extra unlikely.

Additional comment in the code explains problems of using fstat and potential
issues on Windows.

Ticket: 8243
Some drivers (e.g. BNXT) fail to report stats after the device is
stopped. Move stats collection (DPDKDumpCounters and PrintDPDKPortXstats)
to run before rte_eth_dev_stop() in HandleShutdown.

Also change PrintDPDKPortXstats error handling from FatalError to
graceful return since stats collection failures during shutdown
should not crash the application.

The commit removes ThreadExitPrintStats callback as the function had no
useful features after the stats were moved.

Ticket: 8251
bindgen needed SCSigMatchSilentErrorEnabled on the way
Will allow for generic callbacks, that can be used from rust
Introduces helper SCDetectRegisterBufferLowerMd5Callbacks
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 89.86784% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.14%. Comparing base (7627756) to head (2cf9a32).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14712      +/-   ##
==========================================
+ Coverage   82.13%   82.14%   +0.01%     
==========================================
  Files        1011     1007       -4     
  Lines      263295   263194     -101     
==========================================
- Hits       216258   216210      -48     
+ Misses      47037    46984      -53     
Flag Coverage Δ
fuzzcorpus 60.19% <89.83%> (-0.02%) ⬇️
livemode 18.87% <48.66%> (+0.17%) ⬆️
pcap 44.60% <53.47%> (+0.01%) ⬆️
suricata-verify 65.36% <92.51%> (+0.05%) ⬆️
unittests 59.36% <52.10%> (+0.02%) ⬆️

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.

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.

Staging OK
No SV ok
CI ok, waiting for QA

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline = 29331

@victorjulien victorjulien merged commit 2cf9a32 into OISF:main Jan 29, 2026
61 checks passed
@victorjulien victorjulien deleted the next/1194/20260129/v1 branch January 29, 2026 09:47
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.

3 participants