Skip to content

File carves are not accurately reporting errors #8117

@zhumo

Description

@zhumo

Fleet version: 4.16

Operating system: N/A

Web browser: N/A


🧑‍💻  Expected behavior

When a file carve fails, Fleet should accurately report a failure. It should confirm that the file exists in the storage destination.

💥  Actual behavior

A file carve was set up with incorrect settings. When a file carve runs, however, the query still reports success.

This may only occur with the S3 carving backend. But please verify it for Fleet carving backend as well.

More info

Internal only: https://docs.google.com/document/d/15Y_86nzS4-9SklXnLpcYBrGYTxbvMHwgrozoZRxfjWA/edit?usp=sharing
^ Notes with detailed report in Oct 6, 2022 section

The key reproduction steps:

  1. Set --carver_block_size (osquery flag) to a value that is smaller than the minimum block size for s3 multipart uploads (5MB). Customer set --carver_block_size=2000000.
  2. Try to carve a file that is larger than carver_block_size.
  3. Fleet will get an error from S3 when it tries to upload the 2MiB block but it still ends up showing a 100% completion status for the carve.

Whoever develops this fix will likely need access to an AWS sandbox subaccount for testing.

We don't need to support carving when the carver block size is smaller than the S3 minimum size, we just need to accurately return an error status so that we don't mistakenly give the user the impression the carve succeeded.

Metadata

Metadata

Assignees

Labels

#legacy-platform-groupLegacy: platform groupbugSomething isn't working as documented

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions