Commit Graph
697 Commits
Author SHA1 Message Date
Samuel Karp 395a319015 mod: bump github.com/containerd/nri@v0.6.1
Fixes https://github.com/containerd/containerd/issues/10085

Signed-off-by: Samuel Karp <samuelkarp@google.com>
(cherry picked from commit a153b2cd32)
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-04-18 16:18:15 -07:00
Evan Lezar 7a2f49f70f Bump tags.cncf.io/container-device-interface to v0.7.2
This includes migrating from cdi.GetRegistry() to cdi.Configure() and
using top-level cdi Refresh and InjectDevices functions as applicable.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-04-18 16:42:04 +02:00
Kirtana Ashok 8c76e79482 Use different containerd sock address in tests
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
(cherry picked from commit 5b6ae0f796)
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-04-09 20:26:35 -07:00
Sebastiaan van Stijn e6d91d843f vendor: github.com/golang/protobuf v1.5.4
commit 10c7f03b3b updated google.golang.org/protobuf
to v1.33.0, which addresses CVE-2024-24786, however a follow-up post on the
Golang security list issued a warning that the v1.33.0 update introduced a
breaking change, causing compatibility with github.com/golang/protobuf to be
broken;

> A small correction: This vulnerability applies when the UnmarshalOptions.DiscardUnknown
> option is set (as well as when unmarshaling into any message which contains a
> google.protobuf.Any). There is no UnmarshalUnknown option.
>
> In addition, version 1.33.0 of google.golang.org/protobuf inadvertently
> introduced an incompatibility with the older github.com/golang/protobuf
> module. (https://github.com/golang/protobuf/issues/1596) Users of the older
> module should update to github.com/golang/protobuf@v1.5.4.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 45e425ccce)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 10:25:31 +01:00
dependabot[bot] 2d136c5f5e build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 10c7f03b3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 10:24:23 +01:00
dependabot[bot] a1a7af7a39 build(deps): bump google.golang.org/protobuf from 1.31.0 to 1.32.0
Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 7fe038e4a5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-20 10:22:18 +01:00
Kirtana Ashok 753422ac11 Drop go 1.20 and build against 1.22
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
(cherry picked from commit 87aa9e8008)
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-03-04 18:13:55 +05:30
Kohei Tokunaga 6620d6bfd7 ci: bump up golangci-lint to v1.55.2
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
(cherry picked from commit 9fc407d8cf)
Signed-off-by: Akhil Mohan <akhil.mohan@broadcom.com>
2024-03-01 14:47:31 +05:30
Phil Estes 8e86a0b50d Merge pull request #9784 from henry118/release/1.7
[release/1.7] bug fix: make sure cri image is pinned when it is pulled outside cri
2024-02-09 17:39:10 +00:00
Henry Wang 26c057423c bug fix: make sure cri image is pinned when it is pulled outside cri
Signed-off-by: Henry Wang <henwang@amazon.com>
(cherry picked from commit 1eaf0c1f04)
2024-02-07 21:24:23 +00:00
Krisztian Litkey d3e9975563 go.{mod,sum}: update NRI dependency, re-vendor.
Pull in latest NRI fixing a potential fd double close error.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-02-07 19:25:42 +02:00
Evan Lezar 14628d4aaa Update container-device-interface to v0.6.2
This includes migrating from the github.com/container-orchestrated-devices
repo to tags.cncf.io.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2024-01-24 14:51:15 +01:00
Fu Wei 5a675f2f5f Merge pull request #9602 from thaJeztah/1.7_backport_no_execabs
[release/1.7 backport] switch back from golang.org/x/sys/execabs to os/exec (go1.19)
2024-01-08 20:37:23 +08:00
Sebastiaan van Stijn 9251072f78 remove github.com/opencontainers/runc dependency
This migrates uses of github.com/opencontainers/runc/libcontainer/user
to the new github.com/moby/sys/user module, which was extracted from
runc at commit [opencontainers/runc@a3a0ec48c4].

This is the initial release of the module, which is a straight copy, but
some changes may be made in the next release (such as fixing camel-casing
in some fields and functions (Uid -> UID).

[opencontainers/runc@a3a0ec48c4]: https://github.com/opencontainers/runc/commit/a3a0ec48c464fe6458d2ba067f6707c027e5384e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4b1bb1293e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 14:21:49 +01:00
Sebastiaan van Stijn 4e67213d4f vendor: github.com/cncf-tags/container-device-interface v0.6.1
Removes uses of the github.com/opencontainers/runc/libcontainer/devices
package.

full diff: https://github.com/cncf-tags/container-device-interface/compare/v0.6.0...v0.6.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05093d7c07)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 14:18:57 +01:00
Akihiro Suda e0ee0be0df go.mod: github.com/opencontainers/runtime-spec v1.1.0
https://github.com/opencontainers/runtime-spec/compare/v1.1.0-rc.2...v1.1.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 235a4452df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 14:17:19 +01:00
Akihiro Suda 02be2236a2 go.mod: github.com/.../container-device-interface v0.6.0
https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.4...v0.6.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 0498acefb9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 14:15:34 +01:00
Akihiro Suda 91f953bb47 go.mod: github.com/opencontainers/runtime-spec v1.1.0-rc.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 5e054ee631)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 14:15:29 +01:00
Sebastiaan van Stijn 2ad2a2e835 switch back from golang.org/x/sys/execabs to os/exec (go1.19)
This is effectively a revert of 2ac9968401, which
switched from os/exec to the golang.org/x/sys/execabs package to mitigate
security issues (mainly on Windows) with lookups resolving to binaries in the
current directory.

from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path

> ## PATH lookups
>
> Command and LookPath no longer allow results from a PATH search to be found
> relative to the current directory. This removes a common source of security
> problems but may also break existing programs that depend on using, say,
> exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in
> the current directory. See the os/exec package documentation for information
> about how best to update such programs.
>
> On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath
> environment variable, making it possible to disable the default implicit search
> of “.” in PATH lookups on Windows systems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2af6db672e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-05 10:09:39 +01:00
Paweł Gronowski 6b4b760c39 integration/import-export: Add WithSkipMissing tests
Also refactor tests to use the t.Run and run each test concurrently in a
separate namespace.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 0d3c3efe3b)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-01-04 12:16:21 +01:00
Akihiro Suda 428714e320 go.mod: dario.cat/mergo v1.0.0
https://github.com/imdario/mergo/compare/v0.3.13...v1.0.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 3c6ab04203)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-21 18:47:24 +01:00
Milas Bowman 807ddd658b fix(tracing): use latest version of semconv
All components need to use a consistent `semconv` version or OTel
will emit errors about "cannot merge resource due to conflicting Schema URL".

Switch to the appropriate semconv version, which requires dropping
usage of `httpconv`. Instead, the upstream HTTP client hooks are
used directly. (The lower-level functions are no longer exported by
OTel.)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
(cherry picked from commit ad3b806a4f)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-12-06 11:46:12 -08:00
Wei Fu 3284939626 integration: reproduce #9347
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-21 23:30:33 +00:00
Iceber Gu 8dc8618442 cri: fix using the pinned label to pin image
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
(cherry picked from commit 7f7ba31b64)
Signed-off-by: Iceber Gu <caiwei95@hotmail.com>
2023-11-16 14:52:35 +08:00
Kazuyoshi Kato d106a7cdbe Merge pull request #9301 from milas/otel-1.19-1.7
[release/1.7] vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
2023-11-10 15:22:04 -08:00
Kazuyoshi Kato 4bf224bfa0 Merge pull request #9336 from ruiwen-zhao/cri-warning
[release/1.7] Expose usage of cri-api v1alpha2
2023-11-08 23:04:28 -08:00
Wei Fu 5dbc258a81 integration: deflake TestIssue9103
Fixes: #9334

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit dac056fe74)
2023-11-08 23:23:31 +00:00
ruiwen-zhao d62cba40c8 Expose usage of cri-api v1alpha2
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2023-11-07 23:10:34 +00:00
Wei Fu 449912857d fix: shimv1 leak issue
```go
// Delete the initial process and container
func (s *Service) Delete(ctx context.Context, r *ptypes.Empty) (*shimapi.DeleteResponse, error) {
        p, err := s.getInitProcess()
        if err != nil {
                return nil, err
        }
        if err := p.Delete(ctx); err != nil {
                return nil, errdefs.ToGRPC(err)
        }

	// The client might canceled the request but the shim service still
	// moved on. The `delete(s.processes, s.id)` was executed
	// successfully. So the next Delete call will return `container
	// must be created` error. The client side should ignore this
	// issue.

        s.mu.Lock()
        delete(s.processes, s.id)
        s.mu.Unlock()
        s.platform.Close()
        return &shimapi.DeleteResponse{
                ExitStatus: uint32(p.ExitStatus()),
                ExitedAt:   protobuf.ToTimestamp(p.ExitedAt()),
                Pid:        uint32(p.Pid()),
        }, nil
}
```

introduced by #9003
fixes: #9309

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-11-07 22:21:37 +08:00
Kirtana Ashok 73f15bdb63 Update hcsshim tag to v0.11.4
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-11-02 17:13:36 -07:00
Milas Bowman bd9428ff71 vendor: upgrade OpenTelemetry to v1.19.0 / v0.45.0
Upgrade to the latest OpenTelemetry libraries; this will unblock
a lot of downstream projects in the ecosystem to upgrade, as some
of the parts here were pre-1.0/unstable.

See also:
 * containerd/containerd#9256

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-10-26 15:28:23 -04:00
Milas Bowman f36948cad7 vendor: gRPC v1.58.3
Upgrade gRPC in anticipation of upgrading OTel, which raises the
lower limit.

As gRPC upgrades have been known to cause issues, this is being
done pre-emptively. Additionally, it ensures we avoid v1.58.2,
which has a known CVE, but would otherwise be chosen by MVS from
`go mod`.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-10-24 22:26:08 -04:00
Sebastiaan van Stijn c67a531905 vendor: golang.org/x/net v0.17.0
full diff: https://github.com/golang/text/compare/v0.13.0...v0.17.0

This fixes the same CVE as go1.21.3 and go1.20.10;

- net/http: rapid stream resets can cause excessive work

  A malicious HTTP/2 client which rapidly creates requests and
  immediately resets them can cause excessive server resource consumption.
  While the total number of requests is bounded to the
  http2.Server.MaxConcurrentStreams setting, resetting an in-progress
  request allows the attacker to create a new request while the existing
  one is still executing.

  HTTP/2 servers now bound the number of simultaneously executing
  handler goroutines to the stream concurrency limit. New requests
  arriving when at the limit (which can only happen after the client
  has reset an existing, in-flight request) will be queued until a
  handler exits. If the request queue grows too large, the server
  will terminate the connection.

  This issue is also fixed in golang.org/x/net/http2 v0.17.0,
  for users manually configuring HTTP/2.

  The default stream concurrency limit is 250 streams (requests)
  per HTTP/2 connection. This value may be adjusted using the
  golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams
  setting and the ConfigureServer function.

  This is CVE-2023-39325 and Go issue https://go.dev/issue/63417.
  This is also tracked by CVE-2023-44487.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f7c9e99422)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 22:05:24 +02:00
Sebastiaan van Stijn 71f4b36ca7 vendor: golang.org/x/text v0.13.0
full diff: https://github.com/golang/text/compare/v0.11.0...v0.13.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c3652540c7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 22:03:52 +02:00
Sebastiaan van Stijn a7b3b70909 vendor: golang.org/x/sys v0.13.0
full diff: https://github.com/golang/sys/compare/v0.10.0...v0.13.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ff602c2133)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 22:03:46 +02:00
Phil Estes 8dd44e09e1 Merge pull request #9248 from thaJeztah/1.7_update_grpc_1.56.3
[release/1.7] vendor: google.golang.org/grpc v1.56.3
2023-10-19 13:45:35 -04:00
Qiutong Song cac1bab797 Add a new image label if it is docker schema 1
Signed-off-by: Qiutong Song <songqt01@gmail.com>
(cherry picked from commit 7712375630)
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2023-10-17 03:59:23 +00:00
Sebastiaan van Stijn 26736d6e1a vendor: google.golang.org/grpc v1.56.3
server: prohibit more than MaxConcurrentStreams handlers from running at once
(CVE-2023-44487).

In addition to this change, applications should ensure they do not leave running
tasks behind related to the RPC before returning from method handlers, or should
enforce appropriate limits on any such work.

- https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3
- https://github.com/googleapis/go-genproto/compare/7f2fa6fef1f4...daa745c078e1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:21:31 +02:00
Sebastiaan van Stijn 54a69a6e44 vendor: golang.org/x/oauth2 v0.7.0
full diff: https://github.com/golang/oauth2/compare/v0.4.0...v0.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:17:14 +02:00
Sebastiaan van Stijn ac15a7f5b9 vendor: google.golang.org/protobuf v1.30.0
full diff: https://github.com/protocolbuffers/protobuf-go/compare/v1.29.1...v1.30.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-16 21:16:28 +02:00
Wei Fu d0a1fedb5a *: add runc-fp as runc wrapper to inject failpoint
Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 11a7751af5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-10 16:51:46 +02:00
Marat Radchenko 0e2320398f Uncopypaste parsing of OCI Bundle spec file
Signed-off-by: Marat Radchenko <marat@slonopotamus.org>
(cherry picked from commit 9e34b8b441)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-10 12:06:55 +02:00
Kern Walster b3db314a58 Bump x/net to 0.13
This silences govulncheck detecting
https://pkg.go.dev/vuln/GO-2023-1988.

containerd only uses x/net for context and httpcontext which do not
render html.

Signed-off-by: Kern Walster <walster@amazon.com>
2023-10-02 19:59:30 +00:00
Sebastiaan van Stijn 5756f6064b [release/1.7] vendor: github.com/Microsoft/hcsshim v0.11.1
Fix closing stdin: fix an issue introduced in [v0.10.0-rc.3], which resulted
in the close request not being forwarded if stdin was nil.
The fix moves the nil check to after the modify request, to let the process
handle it.

full diff: https://github.com/Microsoft/hcsshim/compare/v0.11.0...v0.11.1

[v0.10.0-rc.3]: https://github.com/microsoft/hcsshim/commit/3e090b05a82c0e226e26c0d1e2ae89d336d7ff69

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-21 09:21:33 +02:00
Sebastiaan van Stijn cb201519f8 alias log package to github.com/containerd/log v0.1.0
This "soft" deprecates the package, but keeps the local uses of the package,
which can make backporting this to release-branches easier (we can
still move all uses in those branches as well though).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d69ae811d6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f1591cc9b9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-19 08:54:55 +02:00
Sebastiaan van Stijn a5024e6dd9 vendor: github.com/stretchr/testify v1.8.4
full diff: https://github.com/stretchr/testify/compare/v1.8.2...v1.8.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-19 08:52:09 +02:00
Sebastiaan van Stijn 7bd976af3f vendor: github.com/sirupsen/logrus v1.9.3
full diff: https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.3

v1.9.3

- Fix a potential denial of service vulnerability in logrus.Writer()
  that could be triggered by logging text longer than 64kb without newlines
- Fix panic in Writer

v1.9.2

Reverts "Fix a potential denial of service vulnerability in logrus.Writer()",
which introduced a regression.

v1.9.1

- Fix data race in hooks.test package
- Add instructions to use different log levels for local and syslog
- Fix a potential denial of service vulnerability in logrus.Writer()
  that could be triggered by logging text longer than 64kb without newlines
- Use text when shows the logrus output

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-19 08:52:09 +02:00
Samuel Karp 3ca015e556 nri: update mock plugin handlers
Signed-off-by: Samuel Karp <samuelkarp@google.com>
(cherry picked from commit 9656b8c0d0)
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-09-14 14:27:55 -07:00
Samuel Karp 4cd208c1f2 vendor: update github.com/containerd/nri@v0.4.0
Signed-off-by: Samuel Karp <samuelkarp@google.com>
(cherry picked from commit 6f9de91efc)
Signed-off-by: Samuel Karp <samuelkarp@google.com>
2023-09-14 14:27:40 -07:00
Kirtana Ashok ddffc7c9a1 Update hcsshim tag to v0.11.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2023-09-06 13:13:16 -07:00