Project

General

Profile

Actions

Bug #5978

closed
JL VJ

stream/reassembly: memcap exception policy incorrectly applied

Bug #5978: stream/reassembly: memcap exception policy incorrectly applied

Added by Jamie Lavigne almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

We are seeing two related behaviors that are occurring even when we are not exceeding the stream reassembly memcap limit:

- The stream reassembly memcap exception policy can be applied despite not reaching the memcap
- We see the stats counter called segment_memcap_drop incrementing despite not reaching the memcap

We need Suricata to independently verify, but from my reading it appears that some non memory-related error handling within the stream reassembly can also be incorrectly counted as out-of-memory errors. The exception policy contains a comment [1] noting that all failures here are caused by a memcap hit, but I have found what look like two possible cases ([2] and [3]) where other unrelated error handling deeper down can cause this to happen. There may be other cases as well.

[1] https://github.com/OISF/suricata/blob/master-6.0.x/src/stream-tcp-reassemble.c#L1903-L1905
[2] https://github.com/OISF/suricata/blob/master-6.0.x/src/stream-tcp-list.c#L173
[3] https://github.com/OISF/suricata/blob/master-6.0.x/src/util-streaming-buffer.c#L703


Related issues 1 (0 open1 closed)

Related to Suricata - Bug #6003: stream/reassembly: memcap exception policy incorrectly applied (6.0.x backport)RejectedActions

VJ Updated by Victor Julien almost 3 years ago Actions #1

  • Subject changed from The stream reassembly memcap exception policy appears to be incorrectly applied to stream/reassembly: memcap exception policy incorrectly applied
  • Target version changed from TBD to 7.0.0-rc2

OT Updated by OISF Ticketbot almost 3 years ago Actions #2

  • Subtask #6003 added

OT Updated by OISF Ticketbot almost 3 years ago Actions #3

  • Label deleted (Needs backport to 6.0)

VJ Updated by Victor Julien almost 3 years ago Actions #4

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Victor Julien

JF Updated by Juliana Fajardini Reichow almost 3 years ago Actions #6

  • Status changed from Assigned to In Progress

VJ Updated by Victor Julien almost 3 years ago Actions #7

  • Status changed from In Progress to Resolved

VJ Updated by Victor Julien over 2 years ago Actions #8

  • Subtask deleted (#6003)

VJ Updated by Victor Julien over 2 years ago Actions #9

  • Related to Bug #6003: stream/reassembly: memcap exception policy incorrectly applied (6.0.x backport) added

VJ Updated by Victor Julien over 2 years ago Actions #10

  • Status changed from Resolved to Closed
  • Priority changed from High to Normal
Actions

Also available in: PDF Atom