Commit graph

586 commits

Author SHA1 Message Date
Sebastiaan van Stijn
3ab8decad7
Dockerfile: remove aufs-tools, as it's not available on bullseye
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-20 13:33:11 +02:00
Sebastiaan van Stijn
882fd19f39
Dockerfile: update to docker/dockerfile:1.3, and remove temporary fix
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-20 13:33:09 +02:00
Sebastiaan van Stijn
b1f7ffea9f
Update Go to 1.16.7
go1.16.7 (released 2021-08-05) includes a security fix to the net/http/httputil
package, as well as bug fixes to the compiler, the linker, the runtime, the go
command, and the net/http package. See the Go 1.16.7 milestone on the issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.7+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-07 18:14:58 +02:00
Sebastiaan van Stijn
fe6f1a4067
Bump go 1.16.6 (addresses CVE-2021-34558)
This addresses CVE-2021-34558: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34558

go1.16.6 (released 2021-07-12) includes a security fix to the crypto/tls package,
as well as bug fixes to the compiler, and the net and net/http packages. See the
Go 1.16.6 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-13 12:42:59 +02:00
Sebastiaan van Stijn
42d2048b9d
Dockerfile: update go-swagger to fix validation on Go1.16
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-02 22:17:59 +02:00
Frédéric Dalleau
e93132e273 Add s390x to cross platforms target
Update build script and buid environment for supporting s390x
Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
2021-06-24 18:52:55 +02:00
Frédéric Dalleau
3a208c0ff9 Add ppc64le to cross platforms target
debian uses ppc64el
go uses ppc64le
the cross compiler is powerpc64le
Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
2021-06-24 18:51:49 +02:00
Frédéric Dalleau
7168d98c43 Remove libseccomp dependency in runtime-dev-cross-true image
It turns out libseccomp is not used for building docker at all.
It is only used for building runc (and needs libseccomp > 2.4)

Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
2021-06-22 22:18:03 +02:00
Sebastiaan van Stijn
ae5ddd257c
Bump go 1.16.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-10 13:04:45 +02:00
Brian Goff
a77317882d
Merge pull request #42262 from cpuguy83/move_libnetwork
Move libnetwork
2021-06-03 12:06:31 -07:00
Brian Goff
86c8b8f1a0 Move proxy build into hack/make
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 22:14:06 +00:00
Kir Kolyshkin
c8e6ad1adc
Dockerfile: install criu from binary repo
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 14:38:20 +02:00
moby
31b2c3bbd9
hack/vendor: add check for vendored archive/tar
Also allow re-vendoring using `./hack/vendor.sh archive/tar`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-20 18:57:52 +02:00
Sebastiaan van Stijn
c35cefb489
Dockerfile: update yamllint to v1.26.1 to fix build
Installation of yamllint started failing, on non-amd64 builds, which could
be if the version we were using wasn't specific enough about a dependency
to install.

    copying Cython/Utility/CppSupport.cpp -> build/lib.linux-aarch64-3.7/Cython/Utility
    running build_ext
    building 'Cython.Plex.Scanners' extension
    creating build/temp.linux-aarch64-3.7
    creating build/temp.linux-aarch64-3.7/tmp
    creating build/temp.linux-aarch64-3.7/tmp/pip-install-jasgbmp7
    creating build/temp.linux-aarch64-3.7/tmp/pip-install-jasgbmp7/Cython
    creating build/temp.linux-aarch64-3.7/tmp/pip-install-jasgbmp7/Cython/Cython
    creating build/temp.linux-aarch64-3.7/tmp/pip-install-jasgbmp7/Cython/Cython/Plex
    aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.7m -c /tmp/pip-install-jasgbmp7/Cython/Cython/Plex/Scanners.c -o build/temp.linux-aarch64-3.7/tmp/pip-install-jasgbmp7/Cython/Cython/Plex/Scanners.o
         /tmp/pip-install-jasgbmp7/Cython/Cython/Plex/Scanners.c:21:10: fatal error: Python.h: No such file or directory
          #include "Python.h"
                   ^~~~~~~~~~
         compilation terminated.
         error: command 'aarch64-linux-gnu-gcc' failed with exit status 1

         ----------------------------------------
     Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jasgbmp7/Cython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-if5qclwe/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-_dtiuyfw --compile" failed with error code 1 in /tmp/pip-install-jasgbmp7/Cython/

      ----------------------------------------
    Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_dtiuyfw --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython" failed with error code 1 in None
    #22 ERROR: executor failed running [/bin/sh -c pip3 install yamllint==1.16.0]: exit code: 1

Trying if updating to the latest version fixes this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-15 21:30:10 +02:00
Sebastiaan van Stijn
1d4a273487
validate/toml: switch to github.com/pelletier/go-toml
The github.com/BurntSushi/toml project is no longer maintained,
and containerd is switching to this project instead, so start
moving our code as well.

This patch only changes the binary used during validation (tbh,
we could probably remove this validation step, but leaving that
for now).

I manually verified that the hack/verify/toml still works by adding a commit
that makes the MAINTAINERS file invalid;

        diff --git a/MAINTAINERS b/MAINTAINERS
        index b739e7e20c..81ababd8de 100644
        --- a/MAINTAINERS
        +++ b/MAINTAINERS
        @@ -23,7 +23,7 @@
                # a subsystem, they are responsible for doing so and holding the
                # subsystem maintainers accountable. If ownership is unclear, they are the de facto owners.

        -               people = [
        +               people =
                                "akihirosuda",
                                "anusha",
                                "coolljt0725",

Running `hack/verify/toml` was able to detect the broken format;

        hack/validate/toml
        (27, 4): keys cannot contain , characterThese files are not valid TOML:
         - MAINTAINERS

        Please reformat the above files as valid TOML

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-02 16:08:17 +02:00
Akihiro Suda
4735a0c84f
Merge pull request #42054 from jhuntwork/41704-update-libseccomp 2021-03-15 05:54:43 +09:00
Sebastiaan van Stijn
4648e8bc6f
Merge pull request #42067 from AkihiroSuda/vpnkit-arm64
Include VPNkit binary for arm64
2021-03-12 09:02:28 +01:00
Jeremy Huntwork
1600e851b5 Use buster backports to build with libseccomp-2.4.4
Fixes #41704

The latest released versions of the static binaries (20.10.3) are still unable
to use faccessat2 with musl-1.2.2 even though this was addressed in #41353 and
related issues. The underlying cause seems to be that the build system
here still uses the default version of libseccomp shipped with buster.
An updated version is available in buster backports:
https://packages.debian.org/buster-backports/libseccomp-dev

Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
2021-03-10 10:01:28 -05:00
Akihiro Suda
088e6ee790
Include VPNkit binary for arm64
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-25 18:16:00 +09:00
Sebastiaan van Stijn
083dbe9fcd
Dockerfile: switch to "stable" dockerfile front-end
The `RUN --mount` options have been promoted to the stable channel,
so we can switch from "experimental" to "stable".

Note that the syntax directive should no longer be needed now, but
it's good practice to add a syntax-directive, to allow building on
older versions of docker.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-23 09:48:14 +01:00
Sebastiaan van Stijn
1c0af18c6c
vendor: opencontainers/selinux v1.8.0, and remove selinux build-tag and stubs
full diff: https://github.com/opencontainers/selinux/compare/v1.7.0...v1.8.0

Remove "selinux" build tag

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-24 00:47:16 +01:00
Eric Mountain
1c5806cf57
Move use of debian:buster frozen image to debian:bullseye
Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
2020-12-19 17:59:36 +01:00
Eric Mountain
58a4c03fed
Add debian:bullseye to frozen images
Signed-off-by: Eric Mountain <eric.mountain@datadoghq.com>
2020-12-18 07:51:40 +01:00
Sebastiaan van Stijn
8a4671fb1f
Merge pull request #41556 from cpuguy83/41552_platform_regress
Don't set default platform on container create
2020-10-21 01:06:15 +02:00
Brian Goff
88c0271605 Don't set default platform on container create
This fixes a regression based on expectations of the runtime:

```
docker pull arm32v7/alpine
docker run arm32v7/alpine
```

Without this change, the `docker run` will fail due to platform
matching on non-arm32v7 systems, even though the image could run
(assuming the system is setup correctly).

This also emits a warning to make sure that the user is aware that a
platform that does not match the default platform of the system is being
run, for the cases like:

```
docker pull --platform armhf busybox
docker run busybox
```

Not typically an issue if the requests are done together like that, but
if the image was already there and someone did `docker run` without an
explicit `--platform`, they may very well be expecting to run a native
version of the image instead of the armhf one.

This warning does add some extra noise in the case of platform specific
images being run, such as `arm32v7/alpine`, but this can be supressed by
explicitly setting the platform.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-10-20 20:17:23 +00:00
Brian Goff
2036b277a5 Add TARGETARCH var to frozen images stage
This allows the arch that buildkit passes through to be used for the
frozen image downloader.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-29 15:42:03 -07:00
Brian Goff
dedf8528a5 Allow download-frozen-images to work without go
Currently we use the `go` command to read GOARCH and use the value for
matching manifests.

This change allows:

1. Specifying the arch through `TARGETARCH`
2. Falling back to `dpkg` if `go` is not available
3. Falling back to `uname -m` if `dpkg` is not available
4. A default value (amd64) if none of these commands is available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-28 19:10:16 +00:00
Sebastiaan van Stijn
2a6325e310
Bump Golang 1.13.15
full diff: https://github.com/golang/go/compare/go1.13.14...go1.13.15

go1.13.15 (released 2020/08/06) includes security fixes to the encoding/binary
package. See the Go 1.13.15 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.15+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-10 12:13:38 +02:00
Sebastiaan van Stijn
9c66a2f4e1
Bump Golang 1.13.14
full diff: https://github.com/golang/go/compare/go1.13.13...go1.13.14

go1.13.14 (released 2020/07/16) includes fixes to the compiler, vet, and the
database/sql, net/http, and reflect packages. See the Go 1.13.14 milestone on
the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.14+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-17 15:17:15 +02:00
Akihiro Suda
bc4f242e79
Bump Go 1.13.13
Includes security fixes to the `crypto/x509` and `net/http` packages.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.13+label%3ACherryPickApproved

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-15 14:21:41 +09:00
wanghuaiqing
228d74842f Upgrading the versions of images in Dockerfile.
In order to run tests at mips64el device.
Now official-images has supported the following images for mips64el.
buildpack-deps:stretch
buildpack-deps:buster
debian:stretch
debian:buster

But official-images does not support the following images for mips64el.
debian:jessie
buildpack-deps:jessie

Signed-off-by: wanghuaiqing <wanghuaiqing@loongson.cn>
2020-06-30 12:24:06 +08:00
Jintao Zhang
004fd7be92 Bump Golang 1.13.12
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-06-07 20:04:59 +08:00
Tibor Vass
171dcbbcf2
Merge pull request #40895 from thaJeztah/bump_criu
Dockerfile: bump CRIU 3.14
2020-05-28 11:22:09 -07:00
Brian Goff
07e6b84359
Merge pull request #40950 from AkihiroSuda/dockerd-rootless-setuptool.sh
add dockerd-rootless-setuptool.sh
2020-05-21 11:52:07 -07:00
Sebastiaan van Stijn
a342010823
Dockerfile: bump CRIU 3.14
full diff: https://github.com/checkpoint-restore/criu/compare/v3.13...v3.14

New features

- C/R of memfd memory mappings and file descriptors.
- Add time namespace support.
- Add the read pre-dump mode which uses process_vm_readv.
- Add --cgroup-yard option
- Add support of the cgroup v2 freezer.
- Add support of opened O_PATH fds.

Bugfixes

- Fix C/R ia32 processes on AMD
- Fix cross-compilation
- Many fixes here and there

Improvements

- Use clone3() with set_tid to restore processes
- Clean up compel headers.
- Use the new mount API

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-18 12:13:13 +02:00
Sebastiaan van Stijn
90758fb028
Bump Golang 1.13.11
full diff: https://github.com/golang/go/compare/go1.13.10...go1.13.11

go1.13.11 (released 2020/05/14) includes fixes to the compiler. See the Go 1.13.11
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.11+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-17 22:57:18 +02:00
Akihiro Suda
c696b95269 add dockerd-rootless-setuptool.sh
Usage: `dockerd-rootless-setuptool.sh install --force` .
See `--help` for further information.

Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-05-15 08:46:36 +09:00
Sebastiaan van Stijn
e184eac73a
Merge pull request #40380 from thaJeztah/dockerfile_improvements
Dockerfile: improve binary build stages
2020-05-08 15:00:35 +02:00
Akihiro Suda
cdf49f37ee
Merge pull request #40672 from tiborvass/19.03.8-forwardport-to-master
vendor: add local copy of archive/tar
2020-05-08 08:11:03 +09:00
Sebastiaan van Stijn
de7f0120fd
Dockerfile: mount install scripts instead of copying
These scripts are only used to build the binaries, and
the scripts themselves don't have to be persisted in an
image, so we can mount them instead of copying to the stage

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-07 21:36:37 +02:00
Sebastiaan van Stijn
d1a3a17c67
Dockerfile: remove "INSTALL_BINARY_NAME" envs
Using a variable here doesn't seem to add much, so inlining
the value instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-07 21:35:54 +02:00
Sebastiaan van Stijn
84d7b57eb7
Dockerfile: update syntax to 1.1.7-experimental
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 14:30:23 +02:00
Tonis Tiigi
7260adfff9 vendor: add local copy of archive/tar
This version avoids doing name lookups on creating tarball that
should be avoided in to not hit loading glibc shared libraries.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit aa6a9891b0)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-24 11:22:24 -07:00
Sebastiaan van Stijn
7cb13d4d85
Bump Golang 1.13.10
go1.13.10 (released 2020/04/08) includes fixes to the go command, the runtime,
os/exec, and time packages. See the Go 1.13.10 milestone on the issue tracker
for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.10+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.13.9...go1.13.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-09 21:58:09 +02:00
Sebastiaan van Stijn
6ee9a1ad29
Bump Golang 1.13.9
go1.13.9 (released 2020/03/19) includes fixes to the go command, tools, the
runtime, the toolchain, and the crypto/cypher package. See the Go 1.13.9
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.9+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.13.8...go1.13.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-04 00:44:25 +02:00
James Nesbitt
3dd0262773 build Dockerfile allows arg for base build FROM
Issue: https://github.com/moby/moby/issues/35729

- Dockerfile now has an ARG for fully specifying GOLANG base image used for build
- Base image defaults to current patter

* This allows testing of alternate GOLANG environments
* Required downstream (EE) for things like FIPS testing

Signed-off-by: James Nesbitt <jnesbitt@mirantis.com>
2020-03-30 12:27:52 -04:00
Brian Goff
37defbfd9b
Merge pull request #40633 from AkihiroSuda/update-vpnkit
update VPNKit
2020-03-13 15:45:19 -07:00
Akihiro Suda
93f3532f64 update VPNKit
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-12 17:20:58 +09:00
Akihiro Suda
5bf33adba2 hack: support $DOCKER_ROOTLESS for testing rootless
```
$ DOCKER_EXPERIMENTAL=1 DOCKER_ROOTLESS=1 TEST_SKIP_INTEGRATION_CLI=1 \
 make test-integration
```

test-integration-cli is unsupported currently.
Also, tests that spawn custom daemon (testutil/daemon) are skipped.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-10 05:49:45 +09:00
Brian Goff
05ec12b082 Fix make shell
a3292263a3 broke `make shell` which is
trying to build the `dev` Dockerfile stage which no longer exists after
the change.

This adds the stage back.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-05 23:39:30 -08:00
Akihiro Suda
e0c9966a51
Merge pull request #40607 from AkihiroSuda/shfmt2
validate: add shfmt
2020-03-04 13:55:40 +09:00
Akihiro Suda
a3292263a3 integration: use systemd when $DOCKER_SYSTEMD is set
Fix #40492

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-04 03:03:38 +09:00
Akihiro Suda
eb484fcb67 validate: add shfmt
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-03 12:25:51 +09:00
Brian Goff
7a76104b2e
Merge pull request #40583 from thaJeztah/criu_3.13
Update CRIU to v3.13 "Silicon Willet"
2020-02-27 11:22:19 -08:00
Sebastiaan van Stijn
f508db4833
Update CRIU to v3.13 "Silicon Willet"
full diff: https://github.com/checkpoint-restore/criu/compare/v3.12...v3.13

Here we have some bugfixes, huuuge *.py patch for coding style
and nice set of new features like 32bit for ARM, TLS for page
server and new mode for CGroups.

New features

- VDSO: arm32 support
- Add TLS support for page server communications
- "Ignore" mode for --manage-cgroups
- Restore SO_BROADCAST option for inet sockets

Bugfixes

- Auxiliary events were left in inotify queues
- Lazy-pages daemon didn't detect stack pages and surrounders properly and marked them as "lazy"
- Memory and resource leakage were detected by coverity, cppcheck and clang

Improvements

- Use gettimeofday() directly from vdso for restore timings
- Reformat all .py code into pep8 style

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 14:17:25 +01:00
Tianon Gravi
0ce3ab679c Add a TODO in the Dockerfile regarding nftables
Someday, we'll hopefully support nftables directly and will likely then need some kind of in-container runtime detection (perhaps based on loaded modules or something similar).  This updates the related `Dockerfile` comment accordingly (linking to the appropriate `nftables` tracking issue).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-02-25 15:31:07 -08:00
Sebastiaan van Stijn
3f7503f98a
Update Golang 1.13.8
full diff: https://github.com/golang/go/compare/go1.13.7...go1.13.8

go1.13.8 (released 2020/02/12) includes fixes to the runtime, the crypto/x509,
and net/http packages. See the Go 1.13.8 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-17 11:52:43 +01:00
Sebastiaan van Stijn
addc0c809f
Fix go-swagger to work with Go 1.14
The template used was broken with Go 1.14, which has some stricter
rules, introduced in https://golang.org/cl/206124

```
root@b5beaed18589:/go/src/github.com/docker/docker# ./hack/generate-swagger-api.sh
2020/02/07 15:12:01 trying to read config from /go/src/github.com/docker/docker/api/swagger-gen.yaml
2020/02/07 15:12:02 rendering 1 templates for model ErrorResponse
2020/02/07 15:12:02 name field ErrorResponse
2020/02/07 15:12:02 package field types
2020/02/07 15:12:02 creating "error_response.go" in "api/types" as definition
model: template: schematype:2:18: executing "schemaType" at <(len .AllOf) gt 0>: can't give argument to non-function len .AllOf
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-14 09:29:20 +01:00
Brian Goff
82879e9a9c Add vpnkit back to binary targets
This was removed after refactoring the Dockerfile in #40180

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-02-05 23:23:00 -08:00
Akihiro Suda
46ec8731fb
Merge pull request #40429 from thaJeztah/bump_golang_1.13.7
Update Golang 1.13.7, golang.org/x/crypto (CVE-2020-0601, CVE-2020-7919)
2020-02-03 18:09:20 +01:00
Brian Goff
5dffe74df2 Fix windows cross builds.
Windows still writes to the autogen directory, but the source code is
mounted in as read-only.
In order to do enable this without taking a massive hit in doing an rw
mount (for the source code) we mount a tmpfs into the build at the
autogen dir.
In order for this to work the directory must alreay exist, so we create
it before entering the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-01-30 15:43:23 -08:00
Sebastiaan van Stijn
878db479be
Update Golang 1.13.7 (CVE-2020-0601, CVE-2020-7919)
full diff: https://github.com/golang/go/compare/go1.13.6...go1.13.7

go1.13.7 (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.13.7+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>
2020-01-29 18:13:13 +01:00
Sebastiaan van Stijn
d68385b861
Update Golang 1.13.6
full diff: https://github.com/golang/go/compare/go1.13.5...go1.13.6

go1.13.6 (released 2020/01/09) includes fixes to the runtime and the net/http
package. See the Go 1.13.6 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-17 15:18:44 +01:00
Sebastiaan van Stijn
50f1e205e4
Dockerfile: use tmpfs for building registry, go-swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-10 15:31:14 +01:00
Sebastiaan van Stijn
95a4702943
Dockerfile: also build old registry on armhf
Building the old version of the registry is not supported
on arm64, but building on armhf is possible.

Before using a multi-arch Dockerfile, the registry was
built on armhf as well, but this got lost in the transition
in commit f1701a741d.

This commit re-enables building the old registry on armhf.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-10 15:31:12 +01:00
Sebastiaan van Stijn
bb0472bd23
Dockerfile: switch to iptables-legacy to match the host
CI runs on Ubuntu 16.04 machines, which use iptables (legacy), but
Debian buster uses nftables. Because of this, DNS resolution does not
work if the daemon configures iptables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-09 18:52:07 +01:00
Sebastiaan van Stijn
4e3ab9e9fb
Dockerfile: switch golang image to "buster" variant, and update btrfs packages
The btrfs-tools was a transitional package, and no longer exists:

> Package btrfs-tools
> stretch (oldstable) (admin): transitional dummy package
> 4.7.3-1: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x

It must be replaced either by `btrfs-progs` or `libbtrfs-dev` (which has just the development headers)

> Package: libbtrfs-dev (4.20.1-2)
> Checksumming Copy on Write Filesystem utilities (development headers)

Note that the `libbtrfs-dev` package is not available on Debian stretch
(only in stretch-backports)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-09 18:52:05 +01:00
Akihiro Suda
e6f6c35b79
Merge pull request #40331 from cpuguy83/fix_bundle_output_dir
Fix output targets getting double nested.
2020-01-01 01:56:39 +09:00
Brian Goff
9177ac322a Fix output targets getting double nested.
Targets are going to bundles/bundles instead of just bundles/. This is
because there is `bundles` in the actual built binaries as well as the
output dir being set to bundles.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-12-30 13:20:11 -08:00
Sebastiaan van Stijn
a218e9b7b0
Update Golang 1.13.5
go1.13.5 (released 2019/12/04) includes fixes to the go command, the runtime, the
linker, and the net/http package. See the Go 1.13.5 milestone on our issue tracker
for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-23 17:32:32 +01:00
Brian Goff
5f314c24fc Bind-mount context for Dockerfile build targets
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-12-02 10:21:46 -08:00
Brian Goff
ccb0b0a7cc binary targets do not need the dev environment
This makes the binary build targets use a minimal build env instead of
having to build all the stuff needed for the full dev enviornment.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-12-02 09:52:16 -08:00
Sebastiaan van Stijn
44d3901386
Merge pull request #40163 from tao12345666333/update-golang-1.13.4
Bump Golang 1.13.4
2019-11-13 15:37:03 -08:00
Jintao Zhang
cf86eeaf96 Bump Golang 1.13.4
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-11-01 10:42:19 +08:00
Brian Goff
c057825cf5 Pass VERSION variable to binary build targets.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-30 10:07:45 -07:00
Jintao Zhang
635584280b Bump Golang 1.13.3 (CVE-2019-17596)
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-10-18 10:23:09 +08:00
Sebastiaan van Stijn
93edf327dc
Dockerfile: align consecutive COPY lines
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 15:51:47 +02:00
Sebastiaan van Stijn
8edbe5dec2
Dockerfile: order COPY lines by change frequency
Ordering the COPY lines to optimize for layer sharing
when these dependencies are updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 15:51:45 +02:00
Sebastiaan van Stijn
ee0ef6c535
Dockerfile: sort packages alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 15:51:43 +02:00
Sebastiaan van Stijn
1cfcce5e21
Dockerfile: use build-arg for vpnkit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 15:49:20 +02:00
Sebastiaan van Stijn
a42b4144bc
Dockerfile: use spaces for indentation
Indenting with tabs can cause the formatting to go wonky,
because the first line of any command is "indented" with spaces,
but following lines are not, therefore they can be mis-aligned with
the first line.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-11 15:49:17 +02:00
Sebastiaan van Stijn
f5eb39f75a
Merge pull request #39919 from jmartin84/36412-build-arg-override-binary-commits
Use build args to override binary commits in dockerfile
2019-10-11 15:43:27 +02:00
Tibor Vass
d56adcf0ec
Merge pull request #40059 from cpuguy83/move_source_copy
Fix trick for `make BINDDIR=. shell` and `COPY .`
2019-10-10 13:38:23 -07:00
Justen Martin
095ca77f48
Use build args to override binary commits in dockerfile
Signed-off-by: Justen Martin <jmart@the-coder.com>
2019-10-10 14:52:57 -05:00
Brian Goff
1c82d11908 Fix trick for make BINDDIR=. shell and COPY .
This was inadvertently removed when updating the Dockerfile for buildkit
specific features.

Trick selects a different build target depending on if the source is
going to be bind-mounted in anyway, which prevents the need to copy the
whole source tree to the builder.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-10 11:47:23 -07:00
Tibor Vass
6f069f14e6
Merge pull request #40058 from cpuguy83/buildkit_dockerfile
Fix `make cross` target
2019-10-10 11:29:19 -07:00
Kir Kolyshkin
93f9b902af go-swagger: fix panic
This is an attempt to fix go-swagger panic under Golang 1.13.

Details:
 * https://github.com/go-openapi/jsonpointer/pull/4
 * https://github.com/go-swagger/go-swagger/pull/2059

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-10-08 11:29:59 -07:00
Brian Goff
e5bfaf19b1 Fix make cross target
When changing the various cross targets in the Dockerfile I neglected
some `;`.
Instead of dealing with that now this just sets `--platform` on the
cross specific targets which only work on linux/amd64 anyway.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-08 10:54:39 -07:00
Brian Goff
82c56755ea Buildkit-optimized dockerfile
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-03 14:07:00 -07:00
Sebastiaan van Stijn
8eb23cde95
bump golang 1.13.1 (CVE-2019-16276)
full diff: https://github.com/golang/go/compare/go1.13...go1.13.1

```
Hi gophers,

We have just released Go 1.13.1 and Go 1.12.10 to address a recently reported security issue. We recommend that all affected users update to one of these releases (if you're not sure which, choose Go 1.13.1).

net/http (through net/textproto) used to accept and normalize invalid HTTP/1.1 headers with a space before the colon, in violation of RFC 7230. If a Go server is used behind an uncommon reverse proxy that accepts and forwards but doesn't normalize such invalid headers, the reverse proxy and the server can interpret the headers differently. This can lead to filter bypasses or request smuggling, the latter if requests from separate clients are multiplexed onto the same upstream connection by the proxy. Such invalid headers are now rejected by Go servers, and passed without normalization to Go client applications.

The issue is CVE-2019-16276 and Go issue golang.org/issue/34540.

Thanks to Andrew Stucki, Adam Scarr (99designs.com), and Jan Masarik (masarik.sh) for discovering and reporting this issue.

Downloads are available at https://golang.org/dl for all supported platforms.

Alla prossima,
Filippo on behalf of the Go team
```

From the patch: 6e6f4aaf70

```
net/textproto: don't normalize headers with spaces before the colon

RFC 7230 is clear about headers with a space before the colon, like

X-Answer : 42

being invalid, but we've been accepting and normalizing them for compatibility
purposes since CL 5690059 in 2012.

On the client side, this is harmless and indeed most browsers behave the same
to this day. On the server side, this becomes a security issue when the
behavior doesn't match that of a reverse proxy sitting in front of the server.

For example, if a WAF accepts them without normalizing them, it might be
possible to bypass its filters, because the Go server would interpret the
header differently. Worse, if the reverse proxy coalesces requests onto a
single HTTP/1.1 connection to a Go server, the understanding of the request
boundaries can get out of sync between them, allowing an attacker to tack an
arbitrary method and path onto a request by other clients, including
authentication headers unknown to the attacker.

This was recently presented at multiple security conferences:
https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn

net/http servers already reject header keys with invalid characters.
Simply stop normalizing extra spaces in net/textproto, let it return them
unchanged like it does for other invalid headers, and let net/http enforce
RFC 7230, which is HTTP specific. This loses us normalization on the client
side, but there's no right answer on the client side anyway, and hiding the
issue sounds worse than letting the application decide.
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-27 14:26:12 +02:00
Tibor Vass
d49fa5354c
Merge pull request #39549 from thaJeztah/bump_go_1.13
Bump go 1.13.0
2019-09-19 16:10:07 -07:00
Sebastiaan van Stijn
85b89c9e50
Replace gometalinter with golangci-lint
Replacing gometalinter, because it has been deprecated,
and the repository was archived.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-18 12:57:57 +02:00
Sebastiaan van Stijn
38e4ae3bca
Bump Golang version 1.13.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-12 00:19:29 +02:00
Sebastiaan van Stijn
961119db21
Dockerfile: set GO111MODULE=off
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-12 00:19:26 +02:00
Sebastiaan van Stijn
a464a3d51f
Dockerfile: remove GOMETALINTER_OPTS
This `ENV` was added to the Dockerfile in b96093fa56,
when the repository used per-architecture Dockerfiles, and some architectures needed
a different configuration.

Now that we use a multi-arch Dockerfile, and CI uses a Jenkinsfile, we can remove
this `ENV` from the Dockerfile, and set it in CI instead if needed.

Also updated the wording and fixed linting issues in hack/validate/gometalinter

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-11 08:58:38 +02:00
Sebastiaan van Stijn
d185ca78ec
Replace libprotobuf-c0-dev with libprotobuf-c-dev
The `libprotobuf-c0-dev` virtual package is no longer available
in Debian Buster, but is provided by `libprotobuf-c-dev`, which
is available.

https://packages.debian.org/stretch/libprotobuf-c0-dev

> Virtual Package: libprotobuf-c0-dev
>
> This is a virtual package. See the Debian policy for a definition of virtual packages.
>
> Packages providing libprotobuf-c0-dev
> libprotobuf-c-dev
> Protocol Buffers C static library and headers (protobuf-c)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-26 14:37:38 +02:00
Sebastiaan van Stijn
ad70bf6866
Dockerfile: add python3-wheel back again (for yamllint)
Although the Dockerfile builds without it, adding wheel back
should save some time

```
00:45:28  #14 10.70 Building wheels for collected packages: pathspec, pyyaml
00:45:28  #14 10.70   Running setup.py bdist_wheel for pathspec: started
00:45:28  #14 10.88   Running setup.py bdist_wheel for pathspec: finished with status 'error'
00:45:28  #14 10.88   Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbotnxes/pathspec/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpg9pl4u6kpip-wheel- --python-tag cp35:
00:45:28  #14 10.88   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
00:45:28  #14 10.88      or: -c --help [cmd1 cmd2 ...]
00:45:28  #14 10.88      or: -c --help-commands
00:45:28  #14 10.88      or: -c cmd --help
00:45:28  #14 10.88
00:45:28  #14 10.88   error: invalid command 'bdist_wheel'
00:45:28  #14 10.88
00:45:28  #14 10.88   ----------------------------------------
00:45:28  #14 10.88   Failed building wheel for pathspec
00:45:28  #14 10.88   Running setup.py clean for pathspec
00:45:28  #14 11.05   Running setup.py bdist_wheel for pyyaml: started
00:45:28  #14 11.25   Running setup.py bdist_wheel for pyyaml: finished with status 'error'
00:45:28  #14 11.25   Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-mbotnxes/pyyaml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpyci_xi0bpip-wheel- --python-tag cp35:
00:45:28  #14 11.25   usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
00:45:28  #14 11.25      or: -c --help [cmd1 cmd2 ...]
00:45:28  #14 11.25      or: -c --help-commands
00:45:28  #14 11.25      or: -c cmd --help
00:45:28  #14 11.25
00:45:28  #14 11.25   error: invalid command 'bdist_wheel'
00:45:28  #14 11.25
00:45:28  #14 11.25   ----------------------------------------
00:45:28  #14 11.25   Failed building wheel for pyyaml
00:45:28  #14 11.25   Running setup.py clean for pyyaml
00:45:28  #14 11.44 Failed to build pathspec pyyaml
00:45:28  #14 11.45 Installing collected packages: pathspec, pyyaml, yamllint
00:45:28  #14 11.45   Running setup.py install for pathspec: started
00:45:29  #14 11.73     Running setup.py install for pathspec: finished with status 'done'
00:45:29  #14 11.73   Running setup.py install for pyyaml: started
00:45:29  #14 12.05     Running setup.py install for pyyaml: finished with status 'done'
00:45:29  #14 12.12 Successfully installed pathspec-0.5.9 pyyaml-5.1.2 yamllint-1.16.0
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 13:24:01 +02:00
Jintao Zhang
01d6a56699 Bump Golang 1.12.9
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-08-16 10:02:22 +08:00
Sebastiaan van Stijn
00ad0222ce
Dockerfile: update CRIU to v3.12
New features

- build CRIU with Android NDK
- C/R of
  - IP RAW sockets
  - lsm: dump and restore any SELinux process label
  - support restoring ghost files on readonly mounts

Bugfixes

 - Do not lock network if running in the host network namespace
- Fix RPC configuration file handling
- util: don't leak file descriptors to third-party tools
- small fixes here and there

Improvements

- travis: switch to the Ubuntu Xenial
- travis-ci: Enable ia32 tests
- Many improvements and bug fixes in the libcriu
  - Changes in the API and ABI (SONAME increased from 1 to 2)

full diff: https://github.com/checkpoint-restore/criu/compare/v3.11...v3.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 20:43:52 +02:00
Sebastiaan van Stijn
73b0e4c589
Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)
go1.12.8 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.12.8 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.8

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 02:27:05 +02:00