image-spec icon indicating copy to clipboard operation
image-spec copied to clipboard

Size limit for Index's Array of Manifests

Open jzelinskie opened this issue 6 years ago • 5 comments

Similar to #780, there should be a fundamental limit for the manifests in an Index.

jzelinskie avatar Jun 13 '19 20:06 jzelinskie

Same comment on #780: should this be in the spec, or up to each registry operator to specify?

SteveLasker avatar Aug 12 '20 19:08 SteveLasker

Could it be generalized further to also limit the size of manifests and configs (i.e., blobs of unknown sizes)?

We've seen situations/attacks where a registry would continue streaming a manifest/config trying to bring down the client in hope they're writing to memory.

should this be in the spec, or up to each registry operator to specify?

I prefer the spec as this would simplify the lives of container engines (Podman, Docker, etc.) which practically already need to set some limits to protect from being DOSed.

vrothberg avatar Aug 13 '20 06:08 vrothberg

We've seen situations/attacks where a registry would continue streaming a manifest/config trying to bring down the client in hope they're writing to memory.

That shouldn't be a problem -- descriptors have the size of the blob embedded in them. If the source you're getting blobs from is streaming more bytes than that, just kill the connection and fail. That's the entire reason they're in the spec. And you can add an artificial limit to blob sizes in your client if that's what you need.

cyphar avatar Aug 13 '20 07:08 cyphar

@cyphar True, but on the flip side blobs are uploaded before the manifests and descriptors are pushed. Quay has its own defined limits on blob sizes (configurable for our end users), but it does show we've already had to put some reasonable limits into place.

josephschorr avatar Aug 13 '20 15:08 josephschorr

As I think this is all based on the same discussion as #780, can I suggest we track the discussion there, until we think there's a difference between the two? It's good to have two issues for final closure.

SteveLas avatar Aug 13 '20 15:08 SteveLas