Project

General

Profile

Actions

Bug #9446

open
VJ VJ

eve/frame: slide accounting error caused missed records

Bug #9446: eve/frame: slide accounting error caused missed records

Added by Victor Julien about 3 hours ago. Updated about 2 hours ago.

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

Description

FrameJson() (src/output-json-frame.c, lines 353-358 on main 5c7787ed6) decides whether a TCP frame is ready to log:

int64_t abs_offset = (int64_t)frame->offset + (int64_t)STREAM_BASE_OFFSET(stream);
int64_t win = STREAM_APP_PROGRESS(stream) - abs_offset;

if (!eof && ((frame->len == -1) || (win < frame->len)) && win < 2500) {
    ... skipping logging
    continue;
  • frame->offset is absolute: AppLayerFrameNewByPointer() stores the stream slice offset plus the pointer offset.
  • b43dc5a64 replaced frame->rel_offset by frame->offset on this line but kept the base addition. The other uses in the file were converted. For example, FrameJsonLogOneFrame() logs frame->offset as stream_offset (line 254).
  • So win is short by STREAM_BASE_OFFSET(stream). Nothing happens while the base is 0. Once the stream has released data, frames fail this check, and they are pruned without ever being logged.
  • Detection is not affected, so alerts reference frame ids that have no frame record.

Subtasks 1 (1 open — 0 closed)

Bug #9447: eve/frame: slide accounting error caused missed records (8.0.x backport)AssignedVictor JulienActions

Related issues 1 (1 open — 0 closed)

Related to Suricata - Bug #9444: detect/frame: in IDS mode, frame chunking doesn't workIn ReviewVictor JulienActions

VJ Updated by Victor Julien about 3 hours ago Actions #1

  • Related to Bug #9444: detect/frame: in IDS mode, frame chunking doesn't work added

OT Updated by OISF Ticketbot about 3 hours ago Actions #2

  • Subtask #9447 added

OT Updated by OISF Ticketbot about 3 hours ago Actions #3

  • Label deleted (Needs backport to 8.0)

VJ Updated by Victor Julien about 2 hours ago Actions #4

  • Status changed from In Progress to In Review
Actions

Also available in: PDF Atom