Skip to content

ftp: too-many-transactions event#15339

Open
jlucovsky wants to merge 4 commits intoOISF:mainfrom
jlucovsky:8489/3
Open

ftp: too-many-transactions event#15339
jlucovsky wants to merge 4 commits intoOISF:mainfrom
jlucovsky:8489/3

Conversation

@jlucovsky
Copy link
Copy Markdown
Contributor

Continuation of #15292

Raise an event when app-layer.protocols.ftp.max-tx is reached.

Link to ticket: https://redmine.openinfosecfoundation.org/issues/8489

Describe changes:

  • Raise too_many_transaction event when max-tx is exceeded
  • Continue with the flow when the event is raised by modeling SMB handling of the same situation and marking the oldest active TX with the event and then falling through and creating a new TX.

Updates:

Provide values to any of the below to override the defaults.

  • To use a Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

SV_BRANCH=OISF/suricata-verify#3041

jlucovsky and others added 4 commits May 8, 2026 10:26
Other parsers (SMB, POP3, ENIP) already raise a too_many_transactions
event when a flow exceeds its per-flow transaction limit. FTP had
the limit wired up through app-layer.protocols.ftp.max-tx but just
dropped the excess transaction on the floor with a "FTP does not set
events yet..." TODO, so no event was raised when the limit was
reached.

Add the FtpEventTooManyTransactions variant, a stock rule at
sid 2232002, and raise the event from FTPTransactionCreate when the
live-tx count goes past ftp_config_maxtx.

Issue: 8489
The first version of the event set done=true on state->curr_tx and
returned NULL when the limit hit. curr_tx is usually the active
command just received — marking it done mid-request throws off
response matching, and subsequent commands in the flow stop getting
logged.

SMB behavior is mirrored here:
Walk the tx list, find the oldest tx that isn't done, mark
it done and tag it with the event, then fall through and
create the new tx so the flow parsing continues. One stale tx gets
reaped per overflow so memory stays bounded.

Issue: 8489
Add missing FTP configuration value to suricata.yaml.in showing the
default value.

Issue: 8489
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

NOTE: This PR may contain new authors.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.64%. Comparing base (8968b1c) to head (4a25805).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15339      +/-   ##
==========================================
- Coverage   82.66%   82.64%   -0.03%     
==========================================
  Files         995      995              
  Lines      271046   271054       +8     
==========================================
- Hits       224069   224009      -60     
- Misses      46977    47045      +68     
Flag Coverage Δ
fuzzcorpus 61.05% <0.00%> (-0.02%) ⬇️
livemode 18.41% <0.00%> (+0.03%) ⬆️
netns 22.58% <0.00%> (-0.05%) ⬇️
pcap 45.19% <0.00%> (-0.04%) ⬇️
suricata-verify 66.39% <100.00%> (-0.02%) ⬇️
unittests 58.57% <0.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.

@suricata-qa
Copy link
Copy Markdown

Information: QA ran without warnings.

Pipeline = 31294

@victorjulien victorjulien added this to the 9.0 milestone May 8, 2026
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