osquery icon indicating copy to clipboard operation
osquery copied to clipboard

Fix file carve table under debug builds.

Open apinter-figma opened this issue 3 years ago • 1 comments

The type assertion will fail after the initial update to the size since the calculated size is written as a string. This checks the type before loading.

Fixes #7756

apinter-figma avatar Sep 12 '22 20:09 apinter-figma

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: apinter-figma (3cdb7318c753cebabc992c0a31ebac91ce621b2f)

Reading https://github.com/osquery/osquery/issues/7756 it seems like a better approach would be to fix the transform function that isn't returning an int. Do you have any idea what's happening there?

directionless avatar Jun 20 '23 17:06 directionless

@apinter-figma I agree with @seph, I think it's better to have consistency.

As I far I see in the code the issue seems to be that updateCarveValue https://github.com/osquery/osquery/blob/01ed1f6b3458ec7147a7b1a06aea259ed0f906aa/osquery/carver/carver_utils.cpp#L33-L50 always takes values as strings and adds them to the document as is. So if size has to be updated, it becomes a string.

At the same time though we are defaulting size to an int (-1) in carvePaths: https://github.com/osquery/osquery/blob/01ed1f6b3458ec7147a7b1a06aea259ed0f906aa/osquery/carver/carver_utils.cpp#L68-L80

Smjert avatar Feb 29 '24 14:02 Smjert

#8297 is my attempt at solving this same issue.

zwass avatar Mar 20 '24 17:03 zwass

Closing for #8297

directionless avatar May 03 '24 12:05 directionless