Skip to content

[25.0] vendor: github.com/containerd/containerd v1.7.27 #49909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: 25.0
Choose a base branch
from

Conversation

pendo324
Copy link

@pendo324 pendo324 commented May 1, 2025

- What I did

Upgraded the containerd dependency to v1.7.27 to mitigate GHSA-265r-hfxg-fhmg / CVE-2024-40635.

This isn't showing up in my govulncheck -mode binary dockerd scans, but it does show up in verbose mode:

govulncheck -show verbose -mode binary dockerd
(..truncated...)
=== Module Results ===

Vulnerability #1: GO-2025-3528
    containerd has an integer overflow in User ID handling in
    github.com/containerd/containerd
  More info: https://pkg.go.dev/vuln/GO-2025-3528
  Module: github.com/containerd/containerd
    Found in: github.com/containerd/containerd@v1.7.12
    Fixed in: github.com/containerd/containerd@v1.7.27

Vulnerability #2: GO-2024-3110
    runc can be confused to create empty files/directories on the host in
    github.com/opencontainers/runc
  More info: https://pkg.go.dev/vuln/GO-2024-3110
  Module: github.com/opencontainers/runc
    Found in: github.com/opencontainers/runc@v1.1.12
    Fixed in: github.com/opencontainers/runc@v1.1.14

This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.

I believe this part

This scan also found 0 vulnerabilities in packages you import and 2
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.

part of govulncheck's output is incorrect based on code analysis:

This reference to containerd.oci's WithUser function is called by execSetPlatformOpt which is called by ContainerExecStart

- How I did it

  1. upgraded containerd to v1.7.27 in the vendor.mod file
  2. ran ./hack/vendor.sh
  3. smoketest by running AUTO_GOPATH=1 hack/make.sh dynbinary dynbinary-proxy, which failed
  4. downgraded github.com/distribution/reference from the version containerd 1.7.27 requires (v0.6.0) to v0.5.0, to add back the removed deprecated function (open to alternatives, this was just the first "fix" that came to mind)

- How to verify it

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@pendo324
Copy link
Author

pendo324 commented May 6, 2025

Requires a rebase on #49804 to get tests to run. See pendo324#1 for tests running on a different branch which includes the changes in #49804

pendo324 and others added 8 commits May 7, 2025 17:17
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
…ed errs

Before:

    === FAIL: amd64.integration.image TestImagePullPlatformInvalid (0.01s)
        pull_test.go:37: assertion failed: expression is false: errdefs.IsInvalidParameter(err)

After:

    === RUN   TestImagePullPlatformInvalid
        pull_test.go:37: assertion failed: error is Error response from daemon: "foobar": unknown operating system or architecture: invalid argument (errdefs.errSystem), not errdefs.IsInvalidParameter

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a88cd68)
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
…d errs

- add some asserts for unhandled errors
- use consts for fixed values, and slightly re-format Dockerfile contentt
- inline one-line Dockerfiles
- fix some vars to be properly camel-cased
- improve assert for error-types;

Before:

    === RUN   TestBuildPlatformInvalid
        build_test.go:685: assertion failed: expression is false: errdefs.IsInvalidParameter(err)
    --- FAIL: TestBuildPlatformInvalid (0.01s)
    FAIL

After:

    === RUN   TestBuildPlatformInvalid
        build_test.go:689: assertion failed: error is Error response from daemon: "foobar": unknown operating system or architecture: invalid argument (errdefs.errSystem), not errdefs.IsInvalidParameter
    --- FAIL: TestBuildPlatformInvalid (0.01s)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 64a6cc3)
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
The userns package in libcontainer was integrated into the moby/sys/user
module at commit [3778ae603c706494fd1e2c2faf83b406e38d687d][1].

The userns package is used in many places, and currently either depends
on runc/libcontainer, or on containerd, both of which have a complex
dependency tree. This patch is part of a series of patches to unify the
implementations, and to migrate toward that implementation to simplify
the dependency tree.

[1]: opencontainers/runc@3778ae6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2ce811e)
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
Commit 2ce811e migrated the use of the
userns package to the github.com/moby/sys/user module.

After further discussion with maintainers, it was decided to move the
userns package to a separate module, as it has no direct relation with
"user" operations (other than having "user" in its name).

This patch migrates our code to use the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7b0ef10)
Signed-off-by: Justin Alvarez <alvajus@amazon.com>
…s to github.com/containerd/platforms

Signed-off-by: Justin Alvarez <alvajus@amazon.com>
…to github.com/containerd/errdefs

Signed-off-by: Justin Alvarez <alvajus@amazon.com>
…v2/runc/options to github.com/containerd/containerd/api/types/runc/options

Signed-off-by: Justin Alvarez <alvajus@amazon.com>
@pendo324 pendo324 force-pushed the update-containerd-v1.7.27 branch from 775047e to 7e2fc23 Compare May 7, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy