Project

General

Profile

Actions

Bug #7106

closed

packet: app-layer-events incorrectly used on recycled packets

Added by Juliana Fajardini Reichow 5 months ago. Updated 4 months ago.

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

Subtasks 1 (0 open1 closed)

Bug #7107: packet: app-layer-events incorrectly used on recycled packets (7.0.x backport)ClosedVictor JulienActions

Related issues 2 (0 open2 closed)

Related to Suricata - Optimization #6728: detect: prefilter for events (decode, stream, app-layer, etc...)ClosedPhilippe AntoineActions
Related to Suricata - Bug #6291: Performance degradation on Suricata devices with a small number of rulesClosedCole DishingtonActions
Actions #1

Updated by OISF Ticketbot 5 months ago

  • Subtask #7107 added
Actions #2

Updated by OISF Ticketbot 5 months ago

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

Updated by Jeff Lucovsky 5 months ago

The app_layer_event packet field is allocated once and never freed. There are existing checks on whether the value is NULL. Thus, if a packet ever had this set, then the use of the same packet (via recycling), will also have it erroneously set.

When a packet is recycled, the app_layer_event memory should be freed and the pointer set to NULL.

Actions #4

Updated by Jeff Lucovsky 5 months ago

  • Status changed from New to In Review
Actions #5

Updated by Philippe Antoine 5 months ago

  • Related to Optimization #6728: detect: prefilter for events (decode, stream, app-layer, etc...) added
Actions #6

Updated by Victor Julien 5 months ago

I don't think the problem is that its not freed, as this is intentional. The problem is that some code assumes that it is freed.

Actions #7

Updated by Philippe Antoine 4 months ago

  • Related to Bug #6291: Performance degradation on Suricata devices with a small number of rules added
Actions #8

Updated by Jeff Lucovsky 4 months ago

  • Subject changed from packet: app-layer-events not freed upon packet reset to packet: app-layer-events incorrectly used on recycled packets
Actions #9

Updated by Jeff Lucovsky 4 months ago

  • Status changed from In Review to In Progress
  • Assignee changed from Jeff Lucovsky to Philippe Antoine
Actions #10

Updated by Philippe Antoine 4 months ago

  • Status changed from In Progress to In Review
Actions #11

Updated by Juliana Fajardini Reichow 4 months ago

Victor Julien wrote in #note-6:

I don't think the problem is that its not freed, as this is intentional. The problem is that some code assumes that it is freed.

oh. I had understood this differently. My bad.

Actions #12

Updated by Philippe Antoine 4 months ago

  • Status changed from In Review to Resolved
Actions #13

Updated by Victor Julien 4 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF