-
Notifications
You must be signed in to change notification settings - Fork 745
Description
While looking at porting the validation code from oci-image-tools to umoci, I noticed that application/vnd.oci.image.config.v1+json
does not contain a schemaVersion
tag nor mediaType
(a-la CVE-2021-41190).
While you can derive this from the manifest pointing to it (and there's no real point to just pointing directly to an image configuration) it really would be nice for validation to be able to be done purely by looking at the blob itself. Not to mention that not having the version be self-describing seems like it's an opening for CVE-2021-41190-style issues where two systems might interpret the version differently (though I somewhat doubt this would happen).
The backwards compatibility path is kind of obvious -- if schemaVersion
is empty, you assume that it's the same version as the manifest pointing to it. Historically this wasn't done because we wanted to maintain compatibility with Docker's image config format, but I suspect adding this at this stage is probably not the big of a deal?