Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #240 from seemethere/bundle_me_up_1809
Browse files Browse the repository at this point in the history
[18.09-ce] [ENGSEC-30] CVE-2019-5736 apply fix via git bundle instead of patches
  • Loading branch information
andrewhsu authored Feb 6, 2019
2 parents a79fabb + 03dfb0b commit eb137ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME
FROM runtime-dev AS runc
ENV INSTALL_BINARY_NAME=runc
COPY hack/dockerfile/install/install.sh ./install.sh
COPY git-bundles /go/src/github.com/docker/docker/git-bundles
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./
RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME

Expand Down
Binary file added git-bundles/CVE-2019-5736.bundle
Binary file not shown.
17 changes: 16 additions & 1 deletion hack/dockerfile/install/runc.installer
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# version that is used. If you need to update runc, open a pull request in
# the containerd project first, and update both after that is merged.
RUNC_COMMIT=96ec2177ae841256168fcf76954f7177af9446eb
RUNC_OVERRIDE_COMMIT=09c8266bf2fcf9519a651b04ae54c967b9ab86ec
RUNC_BUNDLE=/go/src/github.com/docker/docker/git-bundles/CVE-2019-5736.bundle

install_runc() {
# If using RHEL7 kernels (3.10.0 el7), disable kmem accounting/limiting
Expand All @@ -19,12 +21,25 @@ install_runc() {
git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc"
cd "$GOPATH/src/github.com/opencontainers/runc"
git checkout -q "$RUNC_COMMIT"

if [ -f "$RUNC_BUNDLE" ];then
git bundle unbundle "$RUNC_BUNDLE"
git checkout -q "$RUNC_OVERRIDE_COMMIT"
if [ "$(git rev-parse HEAD)" != "$RUNC_OVERRIDE_COMMIT" ]; then
echo "ERROR: Commit with bundle does not match override commit"
echo " $(git rev-parse HEAD) != '$RUNC_OVERRIDE_COMMIT'"
exit 1
fi
RUNC_COMMIT=$RUNC_OVERRIDE_COMMIT
fi

if [ -z "$1" ]; then
target=static
else
target="$1"
fi
make BUILDTAGS="$RUNC_BUILDTAGS" "$target"
OVERRIDE_VERSION="1.0.0-rc6+dev.docker-18.09"
make BUILDTAGS="$RUNC_BUILDTAGS" COMMIT="$RUNC_COMMIT" VERSION="$OVERRIDE_VERSION" "$target"
mkdir -p ${PREFIX}
cp runc ${PREFIX}/runc
}

0 comments on commit eb137ff

Please # to comment.