suricata icon indicating copy to clipboard operation
suricata copied to clipboard

app-layer: don't wrap around on port 65535

Open jasonish opened this issue 1 year ago • 4 comments

A port value of 65535 caused the port value to wrap-around to 0 resulting in an infinite loop.

Introduced with commit 53fc70a9a73cd157ed8235f6a73a8752f8f1396a.

jasonish avatar Aug 09 '22 18:08 jasonish

Codecov Report

Merging #7710 (39c522b) into master (debdff0) will decrease coverage by 0.02%. The diff coverage is 75.00%.

:exclamation: Current head 39c522b differs from pull request most recent head 29e79dd. Consider uploading reports for the commit 29e79dd to get more accurate results

@@            Coverage Diff             @@
##           master    #7710      +/-   ##
==========================================
- Coverage   75.99%   75.97%   -0.03%     
==========================================
  Files         660      660              
  Lines      185705   185706       +1     
==========================================
- Hits       141127   141085      -42     
- Misses      44578    44621      +43     
Flag Coverage Δ
fuzzcorpus 60.69% <75.00%> (+<0.01%) :arrow_up:
suricata-verify 52.51% <66.66%> (-0.06%) :arrow_down:
unittests 60.71% <66.66%> (+<0.01%) :arrow_up:

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

codecov[bot] avatar Aug 09 '22 18:08 codecov[bot]

Think it would be nice to use the kernel "fixes" mechanic here:

$ git fixes 53fc70a
Fixes: 53fc70a9a73c ("protodetect: fix int warnings")

where fixes is an alias:

[alias]
    fixes = log -1 --pretty='tformat:Fixes: %h (\"%s\")' --abbrev=12

victorjulien avatar Aug 09 '22 19:08 victorjulien

Think it would be nice to use the kernel "fixes" mechanic here:

$ git fixes 53fc70a
Fixes: 53fc70a9a73c ("protodetect: fix int warnings")

where fixes is an alias:

[alias]
    fixes = log -1 --pretty='tformat:Fixes: %h (\"%s\")' --abbrev=12

I don't follow.. Is there something new to add to commit messages?

jasonish avatar Aug 09 '22 20:08 jasonish

Think it would be nice to use the kernel "fixes" mechanic here:

$ git fixes 53fc70a
Fixes: 53fc70a9a73c ("protodetect: fix int warnings")

where fixes is an alias:

[alias]
    fixes = log -1 --pretty='tformat:Fixes: %h (\"%s\")' --abbrev=12

I don't follow.. Is there something new to add to commit messages?

Yeah in the kernel space they add such 'Fixes' lines to these types of commits.

victorjulien avatar Aug 09 '22 20:08 victorjulien

Merged in #7730, thanks!

victorjulien avatar Aug 18 '22 18:08 victorjulien