distribution/registry
Stephen J Day 55ea440428
registry/{storage,handlers}: limit content sizes
Under certain circumstances, the use of `StorageDriver.GetContent` can
result in unbounded memory allocations. In particualr, this happens when
accessing a layer through the manifests endpoint.

This problem is mitigated by setting a 4MB limit when using to access
content that may have been accepted from a user. In practice, this means
setting the limit with the use of `BlobProvider.Get` by wrapping
`StorageDriver.GetContent` in a helper that uses `StorageDriver.Reader`
with a `limitReader` that returns an error.

When mitigating this security issue, we also noticed that the size of
manifests uploaded to the registry is also unlimited. We apply similar
logic to the request body of payloads that are full buffered.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-07-06 17:13:39 -07:00
..
api Remove support for X-Forwarded-Port 2017-03-20 16:13:33 -07:00
auth Add test for auth token with "*" action 2017-01-06 16:08:32 -08:00
client Update registry to use WithName for creating Named values 2017-01-18 13:56:56 -08:00
handlers registry/{storage,handlers}: limit content sizes 2017-07-06 17:13:39 -07:00
listener [Server] Listen and serve on a unix socket 2015-05-11 16:00:14 +03:00
middleware Add support for blobAccessController middleware 2016-05-19 14:02:15 +02:00
proxy Update registry to use WithName for creating Named values 2017-01-18 13:56:56 -08:00
storage registry/{storage,handlers}: limit content sizes 2017-07-06 17:13:39 -07:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry_test.go Allow registry clients to connect via http2 2016-08-13 22:07:42 -04:00
registry.go Update logrus vendor 2017-01-05 11:40:18 -08:00
root.go Remove signature store from registry. Return a generated signature for manifest 2016-05-27 13:19:26 -07:00