Skip to content

[rfc] adding version and mediatype information to image config? #1275

@cyphar

Description

@cyphar

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions