mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
acca30055a
full diff: https://github.com/golang/go/compare/go1.12.15...go1.12.16 go1.12.16 (released 2020/01/28) includes two security fixes. One mitigates the CVE-2020-0601 certificate verification bypass on Windows. The other affects only 32-bit architectures. https://github.com/golang/go/issues?q=milestone%3AGo1.12.16+label%3ACherryPickApproved - X.509 certificate validation bypass on Windows 10 A Windows vulnerability allows attackers to spoof valid certificate chains when the system root store is in use. These releases include a mitigation for Go applications, but it’s strongly recommended that affected users install the Windows security update to protect their system. This issue is CVE-2020-0601 and Go issue golang.org/issue/36834. - Panic in crypto/x509 certificate parsing and golang.org/x/crypto/cryptobyte On 32-bit architectures, a malformed input to crypto/x509 or the ASN.1 parsing functions of golang.org/x/crypto/cryptobyte can lead to a panic. The malformed certificate can be delivered via a crypto/tls connection to a client, or to a server that accepts client certificates. net/http clients can be made to crash by an HTTPS server, while net/http servers that accept client certificates will recover the panic and are unaffected. Thanks to Project Wycheproof for providing the test cases that led to the discovery of this issue. The issue is CVE-2020-7919 and Go issue golang.org/issue/36837. This is also fixed in version v0.0.0-20200124225646-8b5121be2f68 of golang.org/x/crypto/cryptobyte. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
84 lines
3.1 KiB
Text
84 lines
3.1 KiB
Text
ARG GO_VERSION=1.12.16
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS base
|
|
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
btrfs-progs-dev \
|
|
build-base \
|
|
curl \
|
|
lvm2-dev \
|
|
jq
|
|
|
|
RUN mkdir -p /build/
|
|
RUN mkdir -p /go/src/github.com/docker/docker/
|
|
WORKDIR /go/src/github.com/docker/docker/
|
|
|
|
FROM base AS frozen-images
|
|
# Get useful and necessary Hub images so we can "docker load" locally instead of pulling
|
|
COPY contrib/download-frozen-image-v2.sh /
|
|
RUN /download-frozen-image-v2.sh /build \
|
|
buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \
|
|
busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \
|
|
busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \
|
|
debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \
|
|
hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c
|
|
# See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list)
|
|
|
|
FROM base AS dockercli
|
|
ENV INSTALL_BINARY_NAME=dockercli
|
|
COPY hack/dockerfile/install/install.sh ./install.sh
|
|
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
|
|
RUN PREFIX=/build ./install.sh $INSTALL_BINARY_NAME
|
|
|
|
# Build DockerSuite.TestBuild* dependency
|
|
FROM base AS contrib
|
|
COPY contrib/syscall-test /build/syscall-test
|
|
COPY contrib/httpserver/Dockerfile /build/httpserver/Dockerfile
|
|
COPY contrib/httpserver contrib/httpserver
|
|
RUN CGO_ENABLED=0 go build -buildmode=pie -o /build/httpserver/httpserver github.com/docker/docker/contrib/httpserver
|
|
|
|
# Build the integration tests and copy the resulting binaries to /build/tests
|
|
FROM base AS builder
|
|
|
|
# Set tag and add sources
|
|
COPY . .
|
|
# Copy test sources tests that use assert can print errors
|
|
RUN mkdir -p /build${PWD} && find integration integration-cli -name \*_test.go -exec cp --parents '{}' /build${PWD} \;
|
|
# Build and install test binaries
|
|
ARG DOCKER_GITCOMMIT=undefined
|
|
RUN hack/make.sh build-integration-test-binary
|
|
RUN mkdir -p /build/tests && find . -name test.main -exec cp --parents '{}' /build/tests \;
|
|
|
|
## Generate testing image
|
|
FROM alpine:3.9 as runner
|
|
|
|
ENV DOCKER_REMOTE_DAEMON=1
|
|
ENV DOCKER_INTEGRATION_DAEMON_DEST=/
|
|
ENTRYPOINT ["/scripts/run.sh"]
|
|
|
|
# Add an unprivileged user to be used for tests which need it
|
|
RUN addgroup docker && adduser -D -G docker unprivilegeduser -s /bin/ash
|
|
|
|
# GNU tar is used for generating the emptyfs image
|
|
RUN apk --no-cache add \
|
|
bash \
|
|
ca-certificates \
|
|
g++ \
|
|
git \
|
|
iptables \
|
|
pigz \
|
|
tar \
|
|
xz
|
|
|
|
COPY hack/test/e2e-run.sh /scripts/run.sh
|
|
COPY hack/make/.ensure-emptyfs /scripts/ensure-emptyfs.sh
|
|
|
|
COPY integration/testdata /tests/integration/testdata
|
|
COPY integration/build/testdata /tests/integration/build/testdata
|
|
COPY integration-cli/fixtures /tests/integration-cli/fixtures
|
|
|
|
COPY --from=frozen-images /build/ /docker-frozen-images
|
|
COPY --from=dockercli /build/ /usr/bin/
|
|
COPY --from=contrib /build/ /tests/contrib/
|
|
COPY --from=builder /build/ /
|