Project

General

Profile

Actions

Bug #9514

open
AK AK

capture-bypass: entries of flows downgraded to local bypass are never removed

Bug #9514: capture-bypass: entries of flows downgraded to local bypass are never removed

Added by Adam Kiripolsky 2 days ago. Updated 2 days ago.

Status:
In Review
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

A capture-bypassed flow whose packets still reach Suricata (e.g., packets the capture method doesn't match, like the flow inside PPPoE, which the XDP filter doesn't parse) is downgraded to local bypass in FlowHandlePacketUpdate(). That happens when such a packet arrives more than flow-timeouts.<proto>.bypassed / 2 after lastts.
This results in the state of a capture-bypassed flow being set to FLOW_STATE_LOCAL_BYPASSED.

The bug is that the related capture-bypass entries (e.g., XDP map entries) are never removed and take up capacity of the device until Suricata restarts.

Proposed fix: Add a callback that removes bypass entries when the state of the flow downgrades to FLOW_STATE_LOCAL_BYPASSED.

AK Updated by Adam Kiripolsky 2 days ago Actions #1

  • Status changed from New to In Review
Actions

Also available in: PDF Atom