Project

General

Profile

Actions

Bug #4383

closed

fileinfo "stored: false" even if the file is kept on disk

Added by Jeff Lucovsky 8 months ago. Updated 20 days ago.

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

Description

Hi,

We believe we found a reproducible bug in the file store code.
Basically, what happens is that some streams contain files that are correctly extracted, dumped on disk, marked as closed (not truncated), and moved from tmp/ to the filestore while the fileinfo eve-log indicates that the file was not stored. We have been observing this for a while now, and were recently able to reproduce it in lab, on Suricata 4.1.8 and Suricata 5.0.3.

This is problematic, especially if one is doing automated analysis of the extracted files and not using `write-fileinfo: yes`, because it means that the file might remain "unknown" and never be automatically analyzed.

The suricata config is nothing fancy; we kept the default config from the Ubuntu package, with file-store v2 enabled, and a very basic filemagic rule:

```
alert http any any -> any any (msg: "FILEMAGIC PDF document"; filemagic:"PDF document"; filestore:both,file; noalert; sid:1100008; rev:1;)
```

The bug can be reproduced with the attached pcap file. This is not an isolated case; we were able to reproduce it with several other streams that have similar flow profile. Specifically, after the initial handshake, the file is pushed in its entirety, without any acknowledgment, then all acknowledgment segments are sent and the connection is closed abruptly with a RST. While this way of doing TCP is dirty efficient, it remains valid.

Please reach out to us if you need any more details regarding this issue.

Thank you.

Florian Maury for ArmatureTech DevTeam


Files

pdf_http_467659.pcap (12.3 KB) pdf_http_467659.pcap Armature Technologies, 05/18/2020 01:12 PM

Related issues

Copied from Bug #3703: fileinfo "stored: false" even if the file is kept on diskClosedVictor JulienActions
Actions #1

Updated by Jeff Lucovsky 8 months ago

  • Copied from Bug #3703: fileinfo "stored: false" even if the file is kept on disk added
Actions #2

Updated by Victor Julien 5 months ago

  • Target version changed from 6.0.3 to 6.0.4
Actions #3

Updated by Shivani Bhardwaj about 1 month ago

  • Status changed from Assigned to In Progress
Actions #4

Updated by Shivani Bhardwaj about 1 month ago

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

Updated by Victor Julien 20 days ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF