-
Notifications
You must be signed in to change notification settings - Fork 99
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
images created using umoci/layer can include layers that are invalid tar files #436
Comments
Is |
Yeah so it looks like the tar file is getting truncated during generation (and then the image itself doesn't fail the many bits of internal validation we do). Very interesting. Are there any errors when generating the image? It's interesting that there's no error during extraction with umoci -- I guess that means that Go doesn't validate that the data read from an archive entry is the right length... That's a bit concerning... |
@cyphar I went back to look at the build logs for the image in question and don't see any errors, but it's possible that there were warnings that weren't propagated to the right logs or something. If there were an hard errors we wouldn't have completed the build, though. what's the best way to follow up here? I'm looking into how easy it is to just share the image. if I can reproduce the issue, is there additional logging I could turn on to help? |
I just realised that umoci doesn't have corrected However, because all of the errors are produced in a goroutine, I have seen cases in tests where the If you are having this issue then you should be able to see a warning like |
@mikemccracken Can you try to see if you can reproduce the issue with #437? If you still can reproduce it, check if the build log has any new warnings (I've added new warnings around each |
@cyphar thanks, I will give this a try this week. |
We have hit a situation where images built using stacker ( see https://github.com/project-stacker/stacker/blob/master/overlay/pack.go#L279 ) appear to be fine - they can be unpacked and run by runc, and umoci can extract them just fine - but the individual blobs are not all valid .tar.gz files.
here's the error seen in such a case:
the use case here is that security scanners that expect to be able to untar individual image layers are not able to do so, and our images get flagged as failing.
Ideally we would never produce invalid tarballs, but failing that I'd like help understanding how this happens and how to be sure that the images aren't actually corrupt somehow.
I've attached a log from
umoci --log=debug unpack
of the image. here's the full log: umoci-unpack-debug.log.gzthe last few files that are unpacked are:
if I untar the blob that contains these files, it stops with the EOF error above part-way through writing
var/log/dpkg.log
- it is clearly truncated - in this diff the-
lines are from the tar-generated tree:umoci-unpack-debug.log.gz
The text was updated successfully, but these errors were encountered: