Skip to content

Fix corpus archiving#2117

Open
q9982 wants to merge 1 commit into
google:masterfrom
q9982:fix/tar-extract-fix
Open

Fix corpus archiving#2117
q9982 wants to merge 1 commit into
google:masterfrom
q9982:fix/tar-extract-fix

Conversation

@q9982
Copy link
Copy Markdown

@q9982 q9982 commented May 17, 2026

Fix corpus archiving to avoid tarfile.ReadError: unexpected end of data during experiments when files change while the tar archive is being created.

Corpus files can still change while the runner is creating a tar archive. Adding them directly from disk can therefore write a tar header for one size and then read a different amount of data, producing a truncated tar member.

Stage regular files in a temporary file before writing them to the tar archive. Non-regular entries only need their tar header, so avoid reading file contents for them.

…ata` during experiments when files change while the tar archive is being created.

Corpus files can still change while the runner is creating a tar
archive. Adding them directly from disk can therefore write a tar header
for one size and then read a different amount of data, producing a
truncated tar member.

Stage regular files in a temporary file before writing them to the tar
archive. Non-regular entries only need their tar header, so avoid
reading file contents for them.
@q9982
Copy link
Copy Markdown
Author

q9982 commented May 17, 2026

We have reproduced the issue using a deliberately designed fuzzer; see q9982@f889f7a

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant