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

Handle empty layers in dmverity-vhd #2317

Closed
wants to merge 1 commit into from

Conversation

DomAyre
Copy link
Contributor

@DomAyre DomAyre commented Nov 11, 2024

We see a bug where getting hashes for an image which includes a layer that does nothing (such as chmod-ing files which already have those permissions) causes a layer hash which is a blank string.

The root cause is that when checking for layers in the image, we treat TarReader.Next() returning an io.EOF as not a tar file rather than a valid but empty tar file, therefore we don't attempt to generate a hash for it

@DomAyre DomAyre requested a review from a team as a code owner November 11, 2024 11:42
Copy link
Contributor

@helsaawy helsaawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the empty layer case, is the layer a 0-byte tar file, or a tar file with empty headers?

@anmaxvl
Copy link
Contributor

anmaxvl commented Nov 11, 2024

@DomAyre, we moved out the binary to a separate repo: https://github.com/microsoft/integrity-vhd. we'll be removing dmverity-vhd from this repo later.

@anmaxvl anmaxvl closed this Nov 11, 2024
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.

3 participants