Commit Graph

311 Commits

Author SHA1 Message Date
bo.jiang
def477b07f Bump crun to 1.16
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
2024-09-02 16:46:20 +08:00
Kirtana Ashok
93abc2fdda Update hcsshim to v0.12.6
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-08-19 15:30:51 -07:00
Phil Estes
219df0e7a2
Merge pull request #10604 from thaJeztah/openssf_happiness
script/setup/install-dev-tools: update protoc-gen-go-ttrpc to v1.2.5, specify patch versions
2024-08-16 13:44:20 +00:00
Sebastiaan van Stijn
66817fccc3
script/setup/install-dev-tools: include patch version in versions
The OpenSSF scorecard is complaining about these two dependencies being
installed without a patch version specified;

    Warn: goCommand not pinned by hash: script/setup/install-dev-tools:27
    Warn: goCommand not pinned by hash: script/setup/install-dev-tools:28

While the error indicates it expects a hash, it looks like it's fine
with other modules in the same file, the difference being that those
specify a full version, including path version, e.g.;
919beb1cf7/script/setup/install-dev-tools (L26)

This patch updates `protoc-gen-go` and `protoc-gen-go-grpc` to the latest
patch release for the specified versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-16 10:54:17 +02:00
Sebastiaan van Stijn
cd4e24ef71
script/setup/install-dev-tools: update protoc-gen-go-ttrpc to v1.2.5
The current version was updated in 65031eadec,
and looks to be

- 1 commit ahead of v1.2.3; https://github.com/containerd/ttrpc/compare/v1.2.3...faba5896a9c4d7b65495cb9b2c02531feb1434d6
- slightly behind of v1.2.4; faba5896a9...v1.2.4

This patch upstreas it to the current (v1.2.5) version, aligning it with
the version used in `go.mod`;
faba5896a9...v1.2.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-16 10:53:37 +02:00
Akhil Mohan
fb8cd045b8
add go1.23.0
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 12:30:37 +05:30
Sebastiaan van Stijn
a100b055cb
update to go1.22.6
- https://github.com/golang/go/issues?q=milestone%3AGo1.22.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.22.5...go1.22.6

go1.22.6 (released 2024-08-06) includes fixes to the go command, the compiler,
the linker, the trace command, the covdata command, and the bytes, go/types,
and os/exec packages. See the Go 1.22.6 milestone on our issue tracker for
details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-09 17:02:18 +02:00
Sebastiaan van Stijn
349d2b5c15
script/setup/install-runc: fix runc using incorrect version
runc v1.1.13 introduced an option to customize the version (as printed by the
`--version` flag) through a `VERSION` Make variable / environment variable
(see [1]).

This variable collided with the `VERSION` environment variable used by
containerd for the same purpose, which lead to `runc` binaries built
using the version of containerd;

    runc --version
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    ...

This patch unsets the `VERSION` variable to bring prevent it from being
inherited and to bring back the previous behavior.

Before this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=1.7.20 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version 1.7.20
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

With this patch:

    docker build -t containerd-test -f contrib/Dockerfile.test .
    docker run -it --rm --env VERSION=1.7.20 containerd-test sh -c 'script/setup/install-runc && /usr/local/sbin/runc --version'
    # ....
    HEAD is now at 58aa9203 VERSION: release 1.1.13
    go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.1.13-0-g58aa9203 -X main.version=v1.1.13 " -o runc .
    install -D -m0755 runc /usr/local/sbin/runc
    /go/src/github.com/containerd/containerd
    runc version v1.1.13
    commit: v1.1.13-0-g58aa9203
    spec: 1.0.2-dev
    go: go1.22.5
    libseccomp: 2.5.4

[1]: 6f4d975c40

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-06 16:52:15 +02:00
Kazuyoshi Kato
b31d3fdcef
Merge pull request #10357 from ktock/script-setup-imgcrypt-version-1.1.11
script: bump up imgcrypt version to v1.2.0-rc1
2024-07-16 18:50:36 +00:00
Rodrigo Campos
7c4de28210 Update cri-tools to v1.30.1
This patch release includes just a fix to skip userns tests on host that
don't support the feature. See:

	https://github.com/kubernetes-sigs/cri-tools/releases/tag/v1.30.1

This is needed for CI to work fine when we update to runc 1.2 (not yet
released). It is also a blocker for the final runc release to make sure
it works in all known downstreams. This makes it work fine here :)

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-11 14:58:44 +02:00
Rodrigo Campos
e1adfaeb92 script/setup/config-containerd: Use slow_chown
slow_chown is safe to add on all kernels, and when running in old
kernels (as some CI distros on purpose are), we want the expensive
fallback.

Vagrant setup and others use this script to config containerd. This
fixes userns tests with runc 1.2.0-rc.2 when running with old kernels.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-10 17:26:31 +02:00
Rodrigo Campos
89a2cac377 scripts/critest.sh: Prepare for userns tests in runc
When runc 1.2.0 is released, it will expose support for userns and
therefore the critest suite will run those tests. The thing is, runc
needs to be able to traverse the path to mount the rootfs on itself.

Let's just mark the paths from the BDIR upwards with +x permissions, so
the tests run fine. Containerd already makes sure that the paths below
(the ones it creates) have the right permissions and for the right
group, etc.

I've tested with runc 1.2.0-rc.2 and CI fails without this path, with
this patch it works just fine.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2024-07-10 17:26:31 +02:00
Kohei Tokunaga
203cb303e0
script: bump up imgcrypt version to v1.2.0-rc1
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2024-07-08 19:25:39 +09:00
Akhil Mohan
56495b404d
update go version to 1.22.5
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-07-03 11:55:48 +05:30
Sebastiaan van Stijn
96352ad226
update runhcs binary to v0.12.4
commit 149ca6880a updated the hcsshim
module to v0.12.4, but did not add a commit to also update the runhcs
binary version.

full diff: https://github.com/microsoft/hcsshim/compare/v0.12.3...v0.12.4

These versions are decoupled since 15b13fb3ea
to allow updating the binary version without updating the module, in cases
where the module doesn't require updates.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-29 00:46:30 +02:00
Sebastiaan van Stijn
cc2cedae06
Revert "install-runc: pin Go to 1.21"
Now that we're on runc v1.1.13, we no longer need to pin the
go version fo runc to go1.21

This reverts commit fef78c1024.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-13 18:38:31 +02:00
Sebastiaan van Stijn
3c097352af
update runc binary to v1.1.13
full diff: https://github.com/opencontainers/runc/compare/v1.1.12...v1.1.13

Release notes:

* If building with Go 1.22.x, make sure to use 1.22.4 or a later version.

* Support go 1.22.4+.
* runc list: fix race with runc delete.
* Fix set nofile rlimit error.
* libct/cg/fs: fix setting rt_period vs rt_runtime.
* Fix a debug msg for user ns in nsexec.
* script/*: fix gpg usage wrt keyboxd.
* CI fixes and misc backports.
* Fix codespell warnings.

* Silence security false positives from golang/net.
* libcontainer: allow containers to make apps think fips is enabled/disabled for testing.
* allow overriding VERSION value in Makefile.
* Vagrantfile.fedora: bump Fedora to 39.
* ci/cirrus: rm centos stream 8.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-13 18:38:25 +02:00
Derek McGowan
1c123efb41
Update Go version to 1.22.4
Includes fix for a symlink race on remove.
Updates 1.21 to 1.21.11 for runc install which also includes the
symlink fix.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-04 15:46:09 -07:00
Austin Vazquez
25c2f690a8
Update toolchain to Go 1.22.3
Go 1.22.3 release includes bug fixes for the core net/http package.

Full release notes: https://go.dev/doc/devel/release#go1.22.minor

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-05-10 15:49:18 +00:00
Wei Fu
3b065cdddb
CI: skip test in arm64 CI
Co-authored-by: Wei Fu <fuweid89@gmail.com>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-07 21:24:28 +09:00
Akihiro Suda
6c3c5376fc
critools-version: v1.30.0
Pulls in kubernetes-sigs/cri-tools PR 1344 (`KEP-3857: Recursive Read-only (RRO) mounts`)
to test PR 9787

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-07 21:23:51 +09:00
Akihiro Suda
3fb84403b1
CI: bump up crun to 1.15
Changes:
- https://github.com/containers/crun/releases/tag/1.14.4
- https://github.com/containers/crun/releases/tag/1.15

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-05-04 14:12:23 +09:00
Akihiro Suda
2d5689434d
CI: use Go 1.22 by default
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 11:52:36 +09:00
Akihiro Suda
fef78c1024
install-runc: pin Go to 1.21
runc is incompatible with Go 1.22 on glibc-based distros
(opencontainers/runc issue 4233)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-04-30 11:52:32 +09:00
Sebastiaan van Stijn
13e6b2b686
update to go1.21.9, go1.22.2
go1.21.9 (released 2024-04-03) includes a security fix to the net/http
package, as well as bug fixes to the linker, and the go/types and
net/http packages. See the Go 1.21.9 milestone for more details;
https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved

These minor releases include 1 security fixes following the security policy:

- http2: close connections when receiving too many headers

Maintaining HPACK state requires that we parse and process all HEADERS
and CONTINUATION frames on a connection. When a request's headers exceed
MaxHeaderBytes, we don't allocate memory to store the excess headers but
we do parse them. This permits an attacker to cause an HTTP/2 endpoint
to read arbitrary amounts of header data, all associated with a request
which is going to be rejected. These headers can include Huffman-encoded
data which is significantly more expensive for the receiver to decode
than for an attacker to send.

Set a limit on the amount of excess header frames we will process before
closing a connection.

Thanks to Bartek Nowotarski (https://nowotarski.info/) for reporting this issue.

This is CVE-2023-45288 and Go issue https://go.dev/issue/65051.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.2

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.8...go1.21.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-22 19:43:32 +02:00
Kirtana Ashok
a6a82c1023 Update hcsshim to v0.12.3
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-04-19 15:26:47 -07:00
Akihiro Suda
7ecdebff93
update to go 1.21.8, 1.22.1
See https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-07 08:32:40 +09:00
Kirtana Ashok
d9409c4611 Update hcsshim to v0.12.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-04 16:55:07 -08:00
Maksym Pavlenko
65588b5238
Merge pull request #7609 from dmcgowan/generate-ttrpc-services
Generate proto services with go-ttrpc
2024-02-22 20:38:21 +00:00
Derek McGowan
65031eadec
Update protobuild to build ttrpc services
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-21 14:22:25 -08:00
Phil Estes
b93409cf72
Merge pull request #9848 from akhilerm/update-crun-version
ci: update crun version to 1.14.3
2024-02-21 18:53:08 +00:00
Akhil Mohan
bd48104159
ci: update crun version to 1.14.3
Changes:
https://github.com/containers/crun/compare/1.14...1.14.3

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-02-21 18:46:02 +05:30
Akihiro Suda
83ad4367d1
script/test/utils.sh: readiness_check: print daemon log
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-17 23:56:38 +09:00
Mike Brown
ac7febc93a moving up for new CRI changes
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2024-02-13 12:14:27 -06:00
Maksym Pavlenko
32bd8eff9e Move inline PS scripts into files
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-06 18:27:21 -08:00
Kirtana Ashok
64e96c7d47 Update hcsshim to v0.12.0-rc.3
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-05 10:42:36 -08:00
Akihiro Suda
cde08a4ff8
Merge pull request #9715 from AkihiroSuda/crun-1.14
CI: bump up crun to 1.14
2024-01-31 21:11:28 +00:00
Derek McGowan
82fb589ffb
Update runc binary to v1.1.12
Update the runc binary, which includes a fix for [CVE-2024-21626].

- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.12
- full diff: https://github.com/opencontainers/runc/compare/v1.1.11...v1.1.12

[CVE-2024-21626]: https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-01-31 09:31:59 -08:00
Akihiro Suda
d8460a702a
CI: bump up crun to 1.14
Changes:
- https://github.com/containers/crun/releases/tag/1.13
- https://github.com/containers/crun/releases/tag/1.14

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-31 05:16:16 +09:00
Phil Estes
cf9aec3185
Merge pull request #9619 from wojiushixiaobai/patch-imgcrypt
build(deps): bump github.com/containerd/imgcrypt to v1.1.9
2024-01-10 10:44:10 -05:00
Sebastiaan van Stijn
a5d9587061
update to go1.21.6, go1.20.13
go1.21.6 (released 2024-01-09) includes fixes to the compiler, the runtime, and
the crypto/tls, maps, and runtime/pprof packages. See the Go 1.21.6 milestone on
our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.5...go1.21.6

go1.20.13 (released 2024-01-09) includes fixes to the runtime and the crypto/tls
package. See the Go 1.20.13 milestone on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.20.13+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.20.12...go1.20.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-10 10:42:07 +01:00
吴小白
174efb1e02 update imgcrypt binary to v1.1.9
Signed-off-by: 吴小白 <296015668@qq.com>
2024-01-09 15:40:32 +08:00
Kay Yan
1ab4fac94b update runc binary to v1.1.11
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2024-01-02 13:36:03 +00:00
Amit Barve
daa1ea522b Add cimfs differ and snapshotter
Details about CimFs project are discussed in #8346

Signed-off-by: Amit Barve <ambarve@microsoft.com>
2023-12-20 09:29:08 -08:00
Wei Fu
cb5a48e645 *: enable ARM64 runner
There are many Kubernetes clusters running on ARM64. Enable ARM64 runner
is to commit to support ARM64 platform officially.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-07 23:55:36 +08:00
Phil Estes
a68efb1bad
Merge pull request #9351 from thaJeztah/update_golang_1.21.4
update to go1.21.5, go1.20.12
2023-12-07 10:39:24 -05:00
lengrongfu
22db60b6ba upgrade crun version from 1.9 to 1.12
Signed-off-by: lengrongfu <lenronfu@gmail.com>
2023-12-06 10:19:43 +08:00
Sebastiaan van Stijn
734219a21a
update to go1.21.5, go1.20.12
go1.21.5 (released 2023-12-05) includes security fixes to the go command,
and the net/http and path/filepath packages, as well as bug fixes to the
compiler, the go command, the runtime, and the crypto/rand, net, os, and
syscall packages. See the Go 1.21.5 milestone on our issue tracker for
details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.4...go1.21.5

from the security mailing:

[security] Go 1.21.5 and Go 1.20.12 are released

Hello gophers,

We have just released Go versions 1.21.5 and 1.20.12, minor point releases.

These minor releases include 3 security fixes following the security policy:

- net/http: limit chunked data overhead

  A malicious HTTP sender can use chunk extensions to cause a receiver
  reading from a request or response body to read many more bytes from
  the network than are in the body.

  A malicious HTTP client can further exploit this to cause a server to
  automatically read a large amount of data (up to about 1GiB) when a
  handler fails to read the entire body of a request.

  Chunk extensions are a little-used HTTP feature which permit including
  additional metadata in a request or response body sent using the chunked
  encoding. The net/http chunked encoding reader discards this metadata.
  A sender can exploit this by inserting a large metadata segment with
  each byte transferred. The chunk reader now produces an error if the
  ratio of real body to encoded bytes grows too small.

  Thanks to Bartek Nowotarski for reporting this issue.

  This is CVE-2023-39326 and Go issue https://go.dev/issue/64433.

- cmd/go: go get may unexpectedly fallback to insecure git

  Using go get to fetch a module with the ".git" suffix may unexpectedly
  fallback to the insecure "git://" protocol if the module is unavailable
  via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE
  is not set for said module. This only affects users who are not using
  the module proxy and are fetching modules directly (i.e. GOPROXY=off).

  Thanks to David Leadbeater for reporting this issue.

  This is CVE-2023-45285 and Go issue https://go.dev/issue/63845.

- path/filepath: retain trailing \ when cleaning paths like \\?\c:\

  Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the
  volume name in Windows paths starting with \\?\, resulting in
  filepath.Clean(\\?\c:\) returning \\?\c: rather than \\?\c:\ (among
  other effects). The previous behavior has been restored.

  This is an update to CVE-2023-45283 and Go issue https://go.dev/issue/64028.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:34:44 +01:00
Sebastiaan van Stijn
2122004525
update to go1.21.4, go1.20.11
go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker, the runtime, the compiler, and
the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone
on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.3...go1.21.4

from the security mailing:

[security] Go 1.21.4 and Go 1.20.11 are released

Hello gophers,

We have just released Go versions 1.21.4 and 1.20.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- path/filepath: recognize `\??\` as a Root Local Device path prefix.

  On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
  to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
  access arbitrary locations on the system. For example, the path `\??\c:\x`
  is equivalent to the more common path c:\x.

  The filepath package did not recognize paths with a `\??\` prefix as special.

  Clean could convert a rooted path such as `\a\..\??\b` into
  the root local device path `\??\b`. It will now convert this
  path into `.\??\b`.

  `IsAbs` did not report paths beginning with `\??\` as absolute.
  It now does so.

  VolumeName now reports the `\??\` prefix as a volume name.

  `Join(`\`, `??`, `b`)` could convert a seemingly innocent
  sequence of path elements into the root local device path
  `\??\b`. It will now convert this to `\.\??\b`.

  This is CVE-2023-45283 and https://go.dev/issue/63713.

- path/filepath: recognize device names with trailing spaces and superscripts

  The `IsLocal` function did not correctly detect reserved names in some cases:

  - reserved names followed by spaces, such as "COM1 ".
  - "COM" or "LPT" followed by a superscript 1, 2, or 3.

  `IsLocal` now correctly reports these names as non-local.

  This is CVE-2023-45284 and https://go.dev/issue/63713.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-05 23:31:28 +01:00
Sebastiaan van Stijn
274a162824
update runc binary to v1.1.10
- full diff: https://github.com/opencontainers/runc/compare/v1.1.9...v1.1.10
- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.10

This is the tenth (and most likely final) patch release in the 1.1.z
release branch of runc. It mainly fixes a few issues in cgroups, and a
umask-related issue in tmpcopyup.

- Add support for `hugetlb.<pagesize>.rsvd` limiting and accounting.
  Fixes the issue of postgres failing when hugepage limits are set.
- Fixed permissions of a newly created directories to not depend on the value
  of umask in tmpcopyup feature implementation.
- libcontainer: cgroup v1 GetStats now ignores missing `kmem.limit_in_bytes`
  (fixes the compatibility with Linux kernel 6.1+).
- Fix a semi-arbitrary cgroup write bug when given a malicious hugetlb
  configuration. This issue is not a security issue because it requires a
  malicious config.json, which is outside of our threat model.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-13 16:03:29 +01:00