Project

General

Profile

Actions

Bug #5199

open

Setting flow memcap too low tries to allocate the whole system memory

Added by Lukas Sismis over 3 years ago. Updated 18 days ago.

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

Description

If I set flow.memcap low (10mb) then Suri starts to hog memory. Not stopping from doing so can result in a complete system crash/freeze. It seems like it bypasses some check and memory allocation gets into an infinite loop. For demonstration purposes, I am attaching a YAML file.
I've tried it with AF-PACKET capture mode but I believe this is not connected with any capture mode and thus it will be present in whatever capture mode.


Files

suricata.yaml (74.6 KB) suricata.yaml Lukas Sismis, 03/21/2022 10:06 AM

Subtasks 2 (2 open0 closed)

Bug #7926: Setting flow memcap too low tries to allocate the whole system memory (8.0.x backport)AssignedLukas SismisActions
Bug #7927: Setting flow memcap too low tries to allocate the whole system memory (7.0.x backport)AssignedLukas SismisActions
Actions #1

Updated by Philippe Antoine about 1 month ago

Is this still the case in 8 ?
Could you describe more step by step how to reproduce ?

Actions #2

Updated by Philippe Antoine about 1 month ago

  • Status changed from New to Feedback
Actions #3

Updated by Lukas Sismis 18 days ago

  • Status changed from Feedback to Assigned
  • Assignee changed from OISF Dev to Lukas Sismis
  • Target version changed from TBD to 9.0.0-beta1
  • Affected Versions 6.0.19, 8.0.1, 7.0.13, 9.0.0-beta1 added
  • Label Needs backport to 7.0, Needs backport to 8.0 added

yes, it is still present, will evaluate more.

Actions #4

Updated by OISF Ticketbot 18 days ago

  • Subtask #7926 added
Actions #5

Updated by OISF Ticketbot 18 days ago

  • Label deleted (Needs backport to 8.0)
Actions #6

Updated by OISF Ticketbot 18 days ago

  • Subtask #7927 added
Actions #7

Updated by OISF Ticketbot 18 days ago

  • Label deleted (Needs backport to 7.0)
Actions #8

Updated by Lukas Sismis 18 days ago

Could you describe more step by step how to reproduce ?

Just set flow memcap to 10mb, prealloc to 100k, and it starts consuming memory infinitely.

./src/suricata -c suricata.yaml -S /dev/null -l /tmp/ --af-packet=lo
Actions

Also available in: Atom PDF