Commit Graph

361 Commits

Author SHA1 Message Date
Kazuyoshi Kato
da60996042
Merge pull request #6881 from my-git9/kubedocurl
Update k8 docurl in file
2022-05-02 10:12:10 -07:00
xin.li
55401ac9c0 Update k8 docurl in file
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-05-01 12:13:16 +08:00
Akihiro Suda
4b412b8003
seccomp: support riscv64
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-05-01 02:52:55 +09:00
Kazuyoshi Kato
1a095e18ba Rename Size_ to Size
Previouslty "Size" was reserved by protoc-gen-gogoctrd and user-generated
"Size" was automatically renamed to "Size_" to avoid conflicts.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:53 +00:00
Kazuyoshi Kato
95dde4959d Embed "Unimplemented" structs as proto recommended
Embedding these structs will be mandatory after migratring off from
gogo/protobuf (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-20 17:14:23 +00:00
Kazuyoshi Kato
237ef0de9b Remove all gogoproto extensions
This commit removes the following gogoproto extensions;

- gogoproto.nullable
- gogoproto.customename
- gogoproto.unmarshaller_all
- gogoproto.stringer_all
- gogoproto.sizer_all
- gogoproto.marshaler_all
- gogoproto.goproto_unregonized_all
- gogoproto.goproto_stringer_all
- gogoproto.goproto_getters_all

None of them are supported by Google's toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-20 07:23:28 +00:00
Kazuyoshi Kato
88c0c7201e Consolidate gogo/protobuf dependencies under our own protobuf package
This would make gogo/protobuf migration easier.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 15:53:36 +00:00
Kazuyoshi Kato
80b825ca2c Remove gogoproto.stdtime
This commit removes gogoproto.stdtime, since it is not supported by
Google's official toolchain
(see https://github.com/containerd/containerd/issues/6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 13:39:30 +00:00
Fu Wei
26a3ab446b
Merge pull request #6819 from kzys/native-fuzz-filter
Fuzz filter package with Go 1.18's fuzzer
2022-04-19 21:25:13 +08:00
Phil Estes
476b9c78a3
Merge pull request #6810 from henry118/ptrace
allow ptrace(2) by default for kernel >= 4.8
2022-04-19 14:23:53 +01:00
Sebastiaan van Stijn
dbdf50cc09
update golang to 1.18.1, 1.17.9
go1.18.1 (released 2022-04-12) includes security fixes to the crypto/elliptic,
crypto/x509, and encoding/pem packages, as well as bug fixes to the compiler,
linker, runtime, the go command, vet, and the bytes, crypto/x509, and go/types
packages. See the Go 1.18.1 milestone on the issue tracker for details:

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

Includes fixes for:

- CVE-2022-24675 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24675)
- CVE-2022-27536 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27536)
- CVE-2022-28327 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-28327)

go1.17.9 (released 2022-04-12) includes security fixes to the crypto/elliptic
and encoding/pem packages, as well as bug fixes to the linker and runtime. See
the Go 1.17.9 milestone on the issue tracker for details:

Includes fixes for:

- CVE-2022-24675 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24675)
- CVE-2022-28327 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-28327)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-19 09:39:10 +02:00
Kazuyoshi Kato
b497e64143 Fuzz filter package with Go 1.18's fuzzer
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-18 20:49:29 +00:00
Henry Wang
94faa70df4 allow ptrace(2) by default for kernel >= 4.8
Signed-off-by: Henry Wang <henwang@amazon.com>
2022-04-18 20:45:29 +00:00
Maksym Pavlenko
871b6b6a9f Use testify
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-04-01 18:17:58 -07:00
Phil Estes
00d951e16a
Merge pull request #6751 from nobellium1997/arm-support-gce-configure
Adding multi-arch support for the configure.sh script
2022-04-01 15:58:30 -04:00
Nobel Barakat
4bdac2b43b Adding multi-arch support for the configure.sh script
This script is used by various tests to install and configure
containerd. However, right now it's hardcoded to only support x86
and not other architectures like arm. This change will now check the
architecture of the machine the script is running on and will pull
the correct artifacts accordingly from the correct artifact store
(GCS vs Github).

Signed-off-by: Nobel Barakat <nobelbarakat@google.com>
2022-04-01 19:10:13 +00:00
Akihiro Suda
d0bd65d3c7
Remove unmaintained contrib/linuxkit
The last commit on https://github.com/linuxkit/kubernetes was on Nov 2018.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 18:16:21 +09:00
Kazuyoshi Kato
067611fdea Remove enumvalue_customname, goproto_enum_prefix and enum_customname
This commit removes gogoproto.enumvalue_customname,
gogoproto.goproto_enum_prefix and gogoproto.enum_customname.

All of them make proto-generated Go code more idiomatic, but we already
don't use these enums in our external-surfacing types and they are anyway
not supported by Google's official toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-21 19:48:16 +00:00
Kazuyoshi Kato
a19ad9bb6f Use Go 1.18 to build and test containerd
Go 1.18 is released. Go 1.16 is no longer supported by the Go team.
golangci-lint is updated since 1.44.2 doesn't support Go 1.18.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:48:25 +00:00
Kazuyoshi Kato
375a217e79
Merge pull request #6423 from AdamKorcz/fuzz17
Fuzzing: refactor metadata fuzzers
2022-03-11 10:19:55 -08:00
Sebastiaan van Stijn
e0a6f9c7d0
update to go 1.16.15, 1.17.8 to address CVE-2022-24921
Addresses [CVE-2022-24921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24921)

go 1.16.15
--------------------

go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and to the net package.
See the Go 1.16.15 milestone on the issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.16.14...go1.16.15

go 1.17.8
--------------------

go1.17.8 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and the crypto/x509,
and net packages. See the Go 1.17.8 milestone on the issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.17.7...go1.17.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-04 16:53:51 +01:00
Sebastiaan van Stijn
f261498e0e
Update Go to 1.16.14, 1.17.7
Includes security fixes for crypto/elliptic (CVE-2022-23806), math/big (CVE-2022-23772),
and cmd/go (CVE-2022-23773).

go1.17.7 (released 2022-02-10) includes security fixes to the crypto/elliptic,
math/big packages and to the go command, as well as bug fixes to the compiler,
linker, runtime, the go command, and the debug/macho, debug/pe, and net/http/httptest
packages. See the Go 1.17.7 milestone on our issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.17.6...go1.17.7

Update Go to 1.17.6

go1.17.6 (released 2022-01-06) includes fixes to the compiler, linker, runtime,
and the crypto/x509, net/http, and reflect packages. See the Go 1.17.6 milestone
on our issue tracker for details:

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 16:28:23 +01:00
David Porter
6e3cc28a66 Wait for containerd installation in GCE scripts
Prior to running the `kube-node-installation.service`, the containerd
installation should be complete as the k8s installation may have
dependencies on containerd and related binaries (e.g ctr). Add
wants/after systemd directives to ensure
`kube-node-installation.service` will only start after containerd
installation completes.

Signed-off-by: David Porter <porterdavid@google.com>
2022-02-10 16:01:13 -08:00
Akihiro Suda
34f7173491
seccomp: kernel 5.16 (futex_waitv)
Allow `futex_waitv` by default.
See https://www.phoronix.com/scan.php?page=news_item&px=FUTEX2-futex-waiv-More-Archs

Note: libseccomp does not cover kernel 5.16 at this moment:
51b50f95e1/src/syscalls.csv

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-01 09:08:06 +09:00
Akihiro Suda
8632bdcb7b
seccomp: kernel 5.15 (process_mrelease)
Allow `process_mrelease` by default.

See https://lwn.net/Articles/864184/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-01 09:08:05 +09:00
Akihiro Suda
c013db6965
seccomp: kernel 5.14 (quotactl_fd, memfd_secret)
- Allow `quotactl_fd` when `CAP_SYS_ADMIN` is granted.
  See https://lwn.net/Articles/859679/

- Allow `memfd_secret` by default.
  See https://lwn.net/Articles/865256/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-01 09:08:01 +09:00
Akihiro Suda
17a2831f70
seccomp: kernel 5.13 (landlock_{add_rule,create_ruleset,restrict_self})
Allow the following syscalls by default:
- `landlock_add_rule`
- `landlock_create_ruleset`
- `landlock_restrict_self`

See https://landlock.io/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-01 09:07:33 +09:00
Akihiro Suda
1329ea3716
seccomp: kernel 5.12 (mount_setattr)
Allow `mount_setattr` when `CAP_SYS_ADMIN` is granted.

See https://man7.org/linux/man-pages/man2/mount_setattr.2.html

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-02-01 09:06:41 +09:00
Michael Crosby
52b8ca5545
Merge pull request #6411 from nmeum/swapcontext
seccomp: add support for "swapcontext" syscall in default policy
2022-01-31 16:11:55 -05:00
AdamKorcz
86d52fc265 Fuzzing: refactor metadata fuzzers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-01-11 21:23:46 +00:00
Derek McGowan
8aca314ddb
Update error message for apparmor parser
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-01-07 12:31:02 -08:00
Sören Tempel
adee2c7974 seccomp: add support for "swapcontext" syscall in default policy
This system call is only available on 32- and 64-bit PowerPC, it is used
by modern programming language implementations to implement coroutine
features through userspace context switches.

moby [1] and systemd nspawn [2] already whitelist this system call so it
makes sense to whitelist it in containerd as well.

[1]: https://github.com/moby/moby/pull/43092
[2]: https://github.com/systemd/systemd/pull/9487

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
2022-01-07 18:05:59 +01:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Sebastiaan van Stijn
0e472420bf
Update Go to 1.17.5
go1.17.5 (released 2021-12-09) includes security fixes to the syscall and net/http
packages. See the Go 1.17.5 milestone on the issue tracker for details:

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

Update Go to 1.17.4
--------------------

go1.17.4 (released 2021-12-02) includes fixes to the compiler, linker, runtime,
and the go/types, net/http, and time packages. See the Go 1.17.4 milestone on
the issue tracker for details:

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-12 01:25:02 +01:00
Sebastiaan van Stijn
869ccc01c1
Update Go to 1.17.3
go1.17.3 (released 2021-11-04) includes security fixes to the archive/zip and
debug/macho packages, as well as bug fixes to the compiler, linker, runtime, the
go command, the misc/wasm directory, and to the net/http and syscall packages.
See the Go 1.17.3 milestone on our issue tracker for details.

From the announcement e-mail:

[security] Go 1.17.3 and Go 1.16.10 are released

We have just released Go versions 1.17.3 and 1.16.10, minor point releases.
These minor releases include two security fixes following the security policy:

- archive/zip: don't panic on (*Reader).Open
  Reader.Open (the API implementing io/fs.FS introduced in Go 1.16) can be made
  to panic by an attacker providing either a crafted ZIP archive containing
  completely invalid names or an empty filename argument.
  Thank you to Colin Arnott, SiteHost and Noah Santschi-Cooney, Sourcegraph Code
  Intelligence Team for reporting this issue. This is CVE-2021-41772 and Go issue
  golang.org/issue/48085.
- debug/macho: invalid dynamic symbol table command can cause panic
  Malformed binaries parsed using Open or OpenFat can cause a panic when calling
  ImportedSymbols, due to an out-of-bounds slice operation.
  Thanks to Burak Çarıkçı - Yunus Yıldırım (CT-Zer0 Crypttech) for reporting this
  issue. This is CVE-2021-41771 and Go issue golang.org/issue/48990.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-05 12:46:33 +01:00
Derek McGowan
0478e04ae8
Merge pull request #6171 from EGuesnet/Dockerfile_mkdir
Add mkdir on Dockerfile
2021-11-03 12:52:10 -07:00
Étienne Guesnet
82cb0a63e1 Add mkdir on Dockerfile
Signed-off-by: Étienne Guesnet <etienne.guesnet@atos.net>
2021-11-02 09:55:50 +01:00
zounengren
a217b5ac8f bump CNI to spec v1.0.0
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-22 10:58:40 +08:00
zounengren
1f1cad3912 io/ioutil package has been deprecated in Go 1.16 that replaces io/ioutil functions
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-10-13 09:18:31 +08:00
Sebastiaan van Stijn
de1a39bf32
Update Go to 1.17.2
go1.17.2 (released 2021-10-07) includes a security fix to the linker and misc/wasm
directory, as well as bug fixes to the compiler, the runtime, the go command, and
to the time and text/template packages. See the Go 1.17.2 milestone on our issue
tracker for details:

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-08 15:26:34 +02:00
zounengren
3a713811be run gofmt with Go 1.17
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-10-07 20:16:59 +08:00
Derek McGowan
d193dc2b8a
Merge pull request #5915 from AdamKorcz/fuzz12
Fuzzing: Add fuzzers + small modifications
2021-10-04 10:32:05 -07:00
Derek McGowan
63b7e5771e
Merge pull request #5973 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
2021-10-01 10:52:06 -07:00
Derek McGowan
a06a0990ec
Merge pull request #6074 from mikebrow/cleanup
cleanup k8s ansible yaml (carry for #5713)
2021-09-29 13:40:31 -07:00
jayonlau
f6b7e07fd3 cleanup k8s ansible yaml (carry for https://github.com/jayonlau <jayonlau@gmail.com>)
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-09-29 14:25:32 -05:00
Eng Zer Jun
50da673592
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-09-21 09:50:38 +08:00
AdamKorcz
65f6a896c3 Fuzzing: Add 4 fuzzers + small modifications
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-09-17 11:47:28 +01:00
Akihiro Suda
55923daa9f
seccomp: support "clone3" (return ENOSYS unless SYS_ADMIN is granted)
clone3 is explicitly requested to give ENOSYS instead of the default EPERM, when CAP_SYS_ADMIN is unset.
See moby/moby PR 42681 (thanks to berrange).

Without this commit, rawhide image does not work:
```console
$ sudo ctr run --rm --net-host --seccomp registry.fedoraproject.org/fedora:rawhide foo /usr/bin/curl google.com
curl: (6) getaddrinfo() thread failed to start
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-09-15 14:44:45 +09:00
Phil Estes
73dbbf5bfa
Update to Go 1.17.1
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-09-14 09:12:00 -04:00
Fu Wei
d9f921e4f0
Merge pull request #5906 from thaJeztah/replace_os_exec 2021-09-11 10:38:53 +08:00
AdamKorcz
96ec0b6f34 content fuzzer: Clean up tempdir
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-09-04 13:41:11 +01:00
Adelina Tuvenie
6d3d34b85d Update Pause image in tests & config
With the introduction of Windows Server 2022, some images have been updated
to support WS2022 in their manifest list. This commit updates the test images
accordingly.

Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-08-31 19:42:57 +03:00
Sebastiaan van Stijn
2ac9968401
replace uses of os/exec with golang.org/x/sys/execabs
Go 1.15.7 contained a security fix for CVE-2021-3115, which allowed arbitrary
code to be executed at build time when using cgo on Windows. This issue also
affects Unix users who have “.” listed explicitly in their PATH and are running
“go get” outside of a module or with module mode disabled.

This issue is not limited to the go command itself, and can also affect binaries
that use `os.Command`, `os.LookPath`, etc.

From the related blogpost (ttps://blog.golang.org/path-security):

> Are your own programs affected?
>
> If you use exec.LookPath or exec.Command in your own programs, you only need to
> be concerned if you (or your users) run your program in a directory with untrusted
> contents. If so, then a subprocess could be started using an executable from dot
> instead of from a system directory. (Again, using an executable from dot happens
> always on Windows and only with uncommon PATH settings on Unix.)
>
> If you are concerned, then we’ve published the more restricted variant of os/exec
> as golang.org/x/sys/execabs. You can use it in your program by simply replacing

This patch replaces all uses of `os/exec` with `golang.org/x/sys/execabs`. While
some uses of `os/exec` should not be problematic (e.g. part of tests), it is
probably good to be consistent, in case code gets moved around.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-25 18:11:09 +02:00
Akihiro Suda
d3aa7ee9f0
Run go fmt with Go 1.17
The new `go fmt` adds `//go:build` lines (https://golang.org/doc/go1.17#tools).

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-22 09:31:50 +09:00
Phil Estes
70d122b290
Merge pull request #5889 from estesp/update-go-1.17
Update to Go 1.17
2021-08-20 10:57:36 -04:00
Derek McGowan
fda782a7b9
Merge pull request #5886 from AdamKorcz/fuzz11
Fuzzing: Add fuzzer
2021-08-17 09:41:50 -07:00
Phil Estes
f8602c3725
Update to Go 1.17
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-08-17 12:27:39 -04:00
AdamKorcz
c9b1b2fd5b Fuzzing: Add fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-17 00:08:59 +01:00
Aditi Sharma
9e1b57ca01 Add env for SystemdCgroup driver
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2021-08-16 17:27:55 +05:30
AdamKorcz
538d93d2fc Fuzzing: Add 4 fuzzers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-12 15:34:12 +01:00
Phil Estes
159c0f04e5
Merge pull request #5840 from AdamKorcz/fuzz9
Fuzzing: Add experimental version of container fuzzer
2021-08-11 11:45:49 -04:00
AdamKorcz
5e49ec27dc Use http.Get to download binaries instead of exec.Command
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-10 12:48:33 +01:00
zounengren
30b832e494 archive docs and point to new location
fix #https://github.com/containerd/cri/issues/1624

Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-08-10 15:54:06 +08:00
AdamKorcz
11a90c7ff4 Fuzzing: Add experimental version of container fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-09 11:18:25 +01:00
Sebastiaan van Stijn
42a28ad2ca
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:07:50 +02:00
AdamKorcz
c3c276ae1c Fuzzing: Fix for OSS-fuzz issue 36825
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-04 12:50:36 +01:00
AdamKorcz
41a04246f4 Fuzzing: Add two more fuzzers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-03 12:23:38 +01:00
AdamKorcz
2c699cc350 Fuzzing: Remove panics of container_fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-08-02 11:28:05 +01:00
AdamKorcz
acecd66031 Change protoc link
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-07-30 10:06:47 +01:00
AdamKorcz
cc88f8e0ae Split fuzzer to two fuzzers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-07-27 15:32:22 +01:00
AdamKorcz
6294235d81 Fuzzing: Add container fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-07-23 13:01:29 +01:00
AdamKorcz
2556aac675 Fuzzing: Add archive fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-07-22 16:39:27 +01:00
Fu Wei
a137b64f50
Merge pull request #5687 from AdamKorcz/fuzz3 2021-07-22 07:28:48 +08:00
AdamKorcz
0789a0c02b Add docker fetch fuzzer
Signed-off-by: AdamKorcz <adam@adalogics.com>
2021-07-20 16:33:03 +01:00
Phil Estes
b809212b18
Merge pull request #5750 from thaJeztah/cleanup_test_dockerfile
Refactor / optimize contrib/Dockerfile.test
2021-07-20 10:33:55 -04:00
Aditi Sharma
150e07b648 Use systemd cgroup driver for cgroupv2 tests
Set systemdCgroup for cgroupv2 Kuberentes e2e tests

Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2021-07-19 10:01:29 +00:00
Sebastiaan van Stijn
9537bc2654
Dockerfile.test: build containerd in separate stage
Looking at how this image is used, I think we don't even need the
source in the final image, so we can build containerd in a separate
stage, and copy the binaries.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:27:07 +02:00
Sebastiaan van Stijn
36be5ef3a2
Dockerfile.test: add GOLANG_IMAGE build arg to allow overriding
This allows the base image itself to be overridden with an alternative image.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:19:44 +02:00
Sebastiaan van Stijn
8faacfca16
Dockerfile.test: clean up apt indexes after installing
Not critical for intermediate stages, but a minor optimization to
reduce the image cache. Ideally, this would use cache-mounts for this,
but those may not be supported by podman, so taking the traditional
approach.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:19:43 +02:00
Sebastiaan van Stijn
9f7e6335c4
Dockerfile.test: build critools in a separate stage
Building critools only requires the install script and the critools-version
file (to determin the version to build). Moving it to a separate stage
prevents rebuilding it if unrelated changes are made in the code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:19:40 +02:00
Sebastiaan van Stijn
7ec8e2d369
Dockerfile.test: build cni in a separate stage
Building cni only requires the install script, and the go.mod (to determin
the version to install). Moving it to a separate stage prevents it from
being rebuilt if unrelated changes were made in the codebase.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:19:34 +02:00
Sebastiaan van Stijn
f9f423c078
Dockerfile.test: standard directory to collect build aftifacts
This allows for easier copying artifacts from stages, by just copying
the directory content to the stage where it's used. These stages are
not used to be run individually so do not have to be "runnable".
Each stage is "responsible" for colllecting all aftifacts in the directory,
so that "consumer" stages do not have to be aware of what needs to be copied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:08:47 +02:00
Sebastiaan van Stijn
e9f26eb877
Dockerfile.test: split dev stage, and optimize order
This makes the following changes:

- The containerd/config.toml, and docker-entrypoint.sh only occasionally change,
  so copy them before copying the source code to allow them to be cached.
- The cri-in-userns stage does not need files from proto3, so do not copy them
- The dev environment does need the file from the proto3 stage, so copy them there.
- Change the order of stages. Our CI uses `podman build` which (I think) does not
  skips stages that are not used for the specified target (like BuildKit does).
  So I moved stages that are not used for the `cri-in-userns` after that stage.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 17:08:04 +02:00
Sebastiaan van Stijn
25fada0cc7
Dockerfile.test: skip curl, gcc, git and make install
These are already installed by default in the golang image.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 14:06:11 +02:00
Akihiro Suda
e72046f86b
Update Go to 1.16.6
Release notes: https://golang.org/doc/devel/release#go1.16

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-13 14:05:37 +09:00
Akihiro Suda
aefabe5462
Dockerfile.test: add "cri-in-userns" (aka rootless) test stage
The `cri-in-userns` stage is for testing "CRI-in-UserNS", which should be used in conjunction with "Kubelet-in-UserNS":
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2033-kubelet-in-userns-aka-rootless

This feature is mostly expected to be used for `kind` and `minikube`.

Requires Rootless Docker/Podman/nerdctl with cgroup v2 delegation: https://rootlesscontaine.rs/getting-started/common/cgroup2/
(Rootless Docker/Podman/nerdctl prepares the UserNS, so we do not need to create UserNS by ourselves)

Usage:
```
podman build --target cri-in-userns -t cri-in-userns -f contrib/Dockerfile.test .
podman run -it --rm --privileged cri-in-userns
```

The stage is tested on CI with Rootless Podman on Fedora 34 on Vagrant.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-09 14:50:04 +09:00
ktock
9c01fe20d3 Allow to pass --no-cgroup option to nvidia-container-cli
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2021-06-14 23:58:22 +09:00
Davanum Srinivas
de6db4038c
Update vendored runc to v1.0.0.0-rc94
Note that this is the code in containerd that uses runc (as almost
a library). Please see the other commit for the update to runc binary
itself.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-10 13:12:48 -04:00
Jintao Zhang
79d800b9b0 Update Go to 1.16.4
fix [#45710](https://github.com/golang/go/issues/45710) and CVE-2021-31525.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2021-05-07 07:07:09 +08:00
Sebastiaan van Stijn
fbe1e140f2
Update Go to 1.16.3
go1.16.3 (released 2021/04/01) includes fixes to the compiler, linker, runtime,
the go command, and the testing and time packages. See the Go 1.16.3 milestone
on our issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.16.2...go1.16.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-19 13:10:18 +02:00
pacoxu
ffff688663 upgrade pause image to 3.5 for non-root
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-03-16 23:20:35 +08:00
Phil Estes
a1138182d5
Merge pull request #5180 from dmcgowan/lint-enforce-comments
Fix exported comments enforcer in CI
2021-03-15 10:50:06 -04:00
Derek McGowan
35eeb24a17
Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Phil Estes
8cbef0fade
Update to Go 1.16.2
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-12 09:59:01 -05:00
Mike Brown
ce8e8e8907
Merge pull request #5036 from thaJeztah/split_runc_binary
Separate runc binary version from libcontainer version, and remove obsolete build-tags
2021-03-11 09:24:30 -06:00
Phil Estes
c55492f8de
Update to Go 1.16.1
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-11 09:03:09 -05:00
Sebastiaan van Stijn
79a51cd16a
move runc version to a separate file for easier consumption
This moves the runc version to build to scripts/setup/runc-version,
which makes it easier for packagers to find the default version
to use.

The RUNC_VERSION environment variable can still be used to override
the version, which can be used (e.g.) to test against different versions
in our CI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 14:28:29 +01:00
Sebastiaan van Stijn
8325ba5d36
Separate runc binary version from libcontainer version
Now that the dependency on runc (libcontaienr) code has been reduced
considerably, it is probbaly ok to cut the version dependency between
libcontainer and the runc binary that is supported.

This patch separates the runc binary version from the version of
libcontainer that is defined in go.mod, and updates the documentation
accordingly.

The RUNC_COMMIT variable in the install-runc script is renamed to
RUNC_VERSION to encourage using tagged versions, and the Dockerfile
in contrib is updated to allow building with a custom version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 13:41:12 +01:00
Akihiro Suda
9ec2778950
Merge pull request #4467 from cyphar/apparmor-update-profile
apparmor: handle signal mediation
2021-03-09 10:55:01 +09:00
Mike Brown
6d68490ef6
Merge pull request #5014 from Iceber/update-pause-version
move to v3.4.1 for the pause image
2021-03-08 15:48:03 -06:00