Skip to content

Pull with digest revision falls back to v1 registry #12879

@nakedible-p

Description

@nakedible-p

Pulling via digest (e.g. docker pull registry@sha256:cafebabe...) has the added security verification that the pulled image (or manifest) must match the digest explicitly - having the benefit that if the digest is obtained via secure means, the registry can be untrusted as everything fetched is verified against the digest.

However, that behavior is limited to v2 registries. The current client will happily fall back to v1 registry and attempt to fetch a tag named sha256:cafebabe.... The normal registry code will not serve such an image, but a malicious registry might. This might allow a man-in-the-middle attacker to subvert the security of pulling with digest.

In short, there is no sense in falling back to v1 registry if the pull is being done with the digest format - the intention of the user is to get a verified image.

Alternatively - a command line option to disable v1 registry support altogether, or something similar, would also plug this security hole.

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