Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector files capture might use incorrect offsets #3818

Open
AlonZivony opened this issue Jan 22, 2024 · 0 comments
Open

Vector files capture might use incorrect offsets #3818

AlonZivony opened this issue Jan 22, 2024 · 0 comments

Comments

@AlonZivony
Copy link
Collaborator

Description

In the code of the send_bin_helper function, I noticed that we add to the start offset of the chunk when reading io_vector the full size of the last vector written:

        bin_args->start_off += bin_args->full_size;

However, we also add to this offset while writing (except for the last chunk):

        bin_args->start_off += F_CHUNK_SIZE;

So, if I am not mistaken, the start offset of the next vector node will be 2*full_size - last_chunk_size.
We use this offset as the offset for the output file, so it will fill many blank areas in the output file between each vector node.

I haven't tested it yet on captures, only noticed it in the code.

Output of tracee version:

(paste your output here)

Output of uname -a:

(paste your output here)

Additional details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant