Skip to content
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

chore(deps): update module github.com/docker/docker to v25 [security] (release-1.13) #314

Open
wants to merge 1 commit into
base: release-1.13
Choose a base branch
from

Conversation

phisco-renovate[bot]
Copy link

@phisco-renovate phisco-renovate bot commented Jul 26, 2024

This PR contains the following updates:

Package Type Update Change
github.com/docker/docker indirect major v24.0.4+incompatible -> v25.0.6+incompatible

GitHub Vulnerability Alerts

CVE-2024-41110

A security vulnerability has been detected in certain versions of Docker Engine, which could allow an attacker to bypass authorization plugins (AuthZ) under specific circumstances. The base likelihood of this being exploited is low. This advisory outlines the issue, identifies the affected versions, and provides remediation steps for impacted users.

Impact

Using a specially-crafted API request, an Engine API client could make the daemon forward the request or response to an authorization plugin without the body. In certain circumstances, the authorization plugin may allow a request which it would have otherwise denied if the body had been forwarded to it.

A security issue was discovered In 2018, where an attacker could bypass AuthZ plugins using a specially crafted API request. This could lead to unauthorized actions, including privilege escalation. Although this issue was fixed in Docker Engine v18.09.1 in January 2019, the fix was not carried forward to later major versions, resulting in a regression. Anyone who depends on authorization plugins that introspect the request and/or response body to make access control decisions is potentially impacted.

Docker EE v19.03.x and all versions of Mirantis Container Runtime are not vulnerable.

Vulnerability details

  • AuthZ bypass and privilege escalation: An attacker could exploit a bypass using an API request with Content-Length set to 0, causing the Docker daemon to forward the request without the body to the AuthZ plugin, which might approve the request incorrectly.
  • Initial fix: The issue was fixed in Docker Engine v18.09.1 January 2019..
  • Regression: The fix was not included in Docker Engine v19.03 or newer versions. This was identified in April 2024 and patches were released for the affected versions on July 23, 2024. The issue was assigned CVE-2024-41110.

Patches

  • docker-ce v27.1.1 containes patches to fix the vulnerability.
  • Patches have also been merged into the master, 19.0, 20.0, 23.0, 24.0, 25.0, 26.0, and 26.1 release branches.

Remediation steps

  • If you are running an affected version, update to the most recent patched version.
  • Mitigation if unable to update immediately:
    • Avoid using AuthZ plugins.
    • Restrict access to the Docker API to trusted parties, following the principle of least privilege.

References


/sys/devices/virtual/powercap accessible by default to containers

GHSA-jq35-85cj-fj4p

More information

Details

Intel's RAPL (Running Average Power Limit) feature, introduced by the Sandy Bridge microarchitecture, provides software insights into hardware energy consumption. To facilitate this, Intel introduced the powercap framework in Linux kernel 3.13, which reads values via relevant MSRs (model specific registers) and provides unprivileged userspace access via sysfs. As RAPL is an interface to access a hardware feature, it is only available when running on bare metal with the module compiled into the kernel.

By 2019, it was realized that in some cases unprivileged access to RAPL readings could be exploited as a power-based side-channel against security features including AES-NI (potentially inside a SGX enclave) and KASLR (kernel address space layout randomization). Also known as the PLATYPUS attack, Intel assigned CVE-2020-8694 and CVE-2020-8695, and AMD assigned CVE-2020-12912.

Several mitigations were applied; Intel reduced the sampling resolution via a microcode update, and the Linux kernel prevents access by non-root users since 5.10. However, this kernel-based mitigation does not apply to many container-based scenarios:

  • Unless using user namespaces, root inside a container has the same level of privilege as root outside the container, but with a slightly more narrow view of the system
  • sysfs is mounted inside containers read-only; however only read access is needed to carry out this attack on an unpatched CPU

While this is not a direct vulnerability in container runtimes, defense in depth and safe defaults are valuable and preferred, especially as this poses a risk to multi-tenant container environments running directly on affected hardware. This is provided by masking /sys/devices/virtual/powercap in the default mount configuration, and adding an additional set of rules to deny it in the default AppArmor profile.

While sysfs is not the only way to read from the RAPL subsystem, other ways of accessing it require additional capabilities such as CAP_SYS_RAWIO which is not available to containers by default, or perf paranoia level less than 1, which is a non-default kernel tunable.

References

Severity

Moderate

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Classic builder cache poisoning

CVE-2024-24557 / GHSA-xw73-rw38-6vjc / GO-2024-2512

More information

Details

The classic builder cache system is prone to cache poisoning if the image is built FROM scratch.
Also, changes to some instructions (most important being HEALTHCHECK and ONBUILD) would not cause a cache miss.

An attacker with the knowledge of the Dockerfile someone is using could poison their cache by making them pull a specially crafted image that would be considered as a valid cache candidate for some build steps.

For example, an attacker could create an image that is considered as a valid cache candidate for:

FROM scratch
MAINTAINER Pawel

when in fact the malicious image used as a cache would be an image built from a different Dockerfile.

In the second case, the attacker could for example substitute a different HEALTCHECK command.

Impact

23.0+ users are only affected if they explicitly opted out of Buildkit (DOCKER_BUILDKIT=0 environment variable) or are using the /build API endpoint (which uses the classic builder by default).

All users on versions older than 23.0 could be impacted. An example could be a CI with a shared cache, or just a regular Docker user pulling a malicious image due to misspelling/typosquatting.

Image build API endpoint (/build) and ImageBuild function from github.com/docker/docker/client is also affected as it the uses classic builder by default.

Patches

Patches are included in Moby releases:

  • v25.0.2
  • v24.0.9
  • v23.0.10
Workarounds
  • Use --no-cache or use Buildkit if possible (DOCKER_BUILDKIT=1, it's default on 23.0+ assuming that the buildx plugin is installed).
  • Use Version = types.BuilderBuildKit or NoCache = true in ImageBuildOptions for ImageBuild call.

Severity

  • CVSS Score: 6.9 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Classic builder cache poisoning in github.com/docker/docker

CVE-2024-24557 / GHSA-xw73-rw38-6vjc / GO-2024-2512

More information

Details

Classic builder cache poisoning in github.com/docker/docker

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Authz zero length regression

CVE-2024-41110 / GHSA-v23v-6jw2-98fq / GO-2024-3005

More information

Details

A security vulnerability has been detected in certain versions of Docker Engine, which could allow an attacker to bypass authorization plugins (AuthZ) under specific circumstances. The base likelihood of this being exploited is low. This advisory outlines the issue, identifies the affected versions, and provides remediation steps for impacted users.

Impact

Using a specially-crafted API request, an Engine API client could make the daemon forward the request or response to an authorization plugin without the body. In certain circumstances, the authorization plugin may allow a request which it would have otherwise denied if the body had been forwarded to it.

A security issue was discovered In 2018, where an attacker could bypass AuthZ plugins using a specially crafted API request. This could lead to unauthorized actions, including privilege escalation. Although this issue was fixed in Docker Engine v18.09.1 in January 2019, the fix was not carried forward to later major versions, resulting in a regression. Anyone who depends on authorization plugins that introspect the request and/or response body to make access control decisions is potentially impacted.

Docker EE v19.03.x and all versions of Mirantis Container Runtime are not vulnerable.

Vulnerability details
  • AuthZ bypass and privilege escalation: An attacker could exploit a bypass using an API request with Content-Length set to 0, causing the Docker daemon to forward the request without the body to the AuthZ plugin, which might approve the request incorrectly.
  • Initial fix: The issue was fixed in Docker Engine v18.09.1 January 2019..
  • Regression: The fix was not included in Docker Engine v19.03 or newer versions. This was identified in April 2024 and patches were released for the affected versions on July 23, 2024. The issue was assigned CVE-2024-41110.
Patches
  • docker-ce v27.1.1 containes patches to fix the vulnerability.
  • Patches have also been merged into the master, 19.0, 20.0, 23.0, 24.0, 25.0, 26.0, and 26.1 release branches.
Remediation steps
  • If you are running an affected version, update to the most recent patched version.
  • Mitigation if unable to update immediately:
    • Avoid using AuthZ plugins.
    • Restrict access to the Docker API to trusted parties, following the principle of least privilege.
References

Severity

  • CVSS Score: 9.9 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

References

This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).


Moby authz zero length regression in github.com/moby/moby

CVE-2024-41110 / GHSA-v23v-6jw2-98fq / GO-2024-3005

More information

Details

Moby authz zero length regression in github.com/moby/moby

Severity

Unknown

References

This data is provided by OSV and the Go Vulnerability Database (CC-BY 4.0).


Release Notes

docker/docker (github.com/docker/docker)

v25.0.6+incompatible

Compare Source

v25.0.5+incompatible

Compare Source

v25.0.4+incompatible

Compare Source

v25.0.3+incompatible

Compare Source

v25.0.2+incompatible

Compare Source

v25.0.1+incompatible

Compare Source

v25.0.0+incompatible

Compare Source

v24.0.9+incompatible

Compare Source

v24.0.8+incompatible

Compare Source

v24.0.7+incompatible

Compare Source

v24.0.6+incompatible

Compare Source

v24.0.5+incompatible

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@phisco-renovate
Copy link
Author

phisco-renovate bot commented Jul 26, 2024

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -d -t ./...
go: downloading golang.org/x/sys v0.10.0
go: downloading github.com/fatih/color v1.15.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1
go: downloading github.com/hashicorp/go-retryablehttp v0.7.1
go: downloading github.com/mattn/go-isatty v0.0.17
go: downloading github.com/felixge/httpsnoop v1.0.3
go: downloading github.com/distribution/reference v0.6.0
go: downloading go.opentelemetry.io v0.1.0
go: downloading go.opentelemetry.io/otel/metric v1.28.0
go: downloading go.opentelemetry.io/otel v1.28.0
go: github.com/crossplane/crossplane/test/e2e/funcs imports
	github.com/google/go-containerregistry/pkg/v1/daemon imports
	github.com/docker/docker/client imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/metric/global: cannot find module providing package go.opentelemetry.io/otel/metric/global
go: github.com/crossplane/crossplane/test/e2e/funcs imports
	github.com/google/go-containerregistry/pkg/v1/daemon imports
	github.com/docker/docker/client imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/metric/instrument/syncfloat64: cannot find module providing package go.opentelemetry.io/otel/metric/instrument/syncfloat64
go: github.com/crossplane/crossplane/test/e2e/funcs imports
	github.com/google/go-containerregistry/pkg/v1/daemon imports
	github.com/docker/docker/client imports
	go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp imports
	go.opentelemetry.io/otel/metric/instrument/syncint64: cannot find module providing package go.opentelemetry.io/otel/metric/instrument/syncint64

File name: go.mod
Command failed: install-tool golang $(grep -oP "^toolchain go\K.+" go.mod)

File name: go.mod
Command failed: make generate
go: downloading golang.org/x/sys v0.10.0
go: downloading github.com/fatih/color v1.15.0
go: downloading github.com/hashicorp/go-retryablehttp v0.7.1
go: downloading github.com/mattn/go-isatty v0.0.17
github.com/docker/docker@v25.0.6+incompatible: missing go.sum entry for go.mod file; to add it:
	go mod download github.com/docker/docker
github.com/docker/docker@v25.0.6+incompatible: missing go.sum entry for go.mod file; to add it:
	go mod download github.com/docker/docker
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa07b8f]

goroutine 154 [running]:
go/types.(*Checker).handleBailout(0xc001977a00, 0xc0007b5d40)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/check.go:367 +0x88
panic({0xbbe580?, 0x12a74b0?})
	/opt/containerbase/tools/golang/1.22.5/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0xdb81d8, 0x12afc80})
	/opt/containerbase/tools/golang/1.22.5/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/sizes.go:333
go/types.representableConst.func1({0xdb81d8?, 0x12afc80?})
	/opt/containerbase/tools/golang/1.22.5/src/go/types/const.go:76 +0x9e
go/types.representableConst({0xdbe530, 0x127ac80}, 0xc001977a00, 0x12afc80, 0x0)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/const.go:92 +0x192
go/types.(*Checker).arrayLength(0xc001977a00, {0xdbc7d8, 0xc001ab5ec0?})
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:510 +0x2d3
go/types.(*Checker).typInternal(0xc001977a00, {0xdbadf8, 0xc001ab3bc0}, 0x0)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:299 +0x49d
go/types.(*Checker).definedType(0xc001977a00, {0xdbadf8, 0xc001ab3bc0}, 0xc?)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).varType(0xc001977a00, {0xdbadf8, 0xc001ab3bc0})
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:145 +0x25
go/types.(*Checker).structType(0xc001977a00, 0xc001ad32c0, 0xc001ad32c0?)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/struct.go:113 +0x19f
go/types.(*Checker).typInternal(0xc001977a00, {0xdbad68, 0xc001ab89c0}, 0xc001ad1ea0)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:316 +0x1345
go/types.(*Checker).definedType(0xc001977a00, {0xdbad68, 0xc001ab89c0}, 0xc8786d?)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).typeDecl(0xc001977a00, 0xc001ad1ea0, 0xc001ac05c0, 0x0)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/decl.go:615 +0x44d
go/types.(*Checker).objDecl(0xc001977a00, {0xdc3a80, 0xc001ad1ea0}, 0x0)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/decl.go:197 +0xa7f
go/types.(*Checker).packageObjects(0xc001977a00)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/resolver.go:681 +0x425
go/types.(*Checker).checkFiles(0xc001977a00, {0xc001a83c20, 0x3, 0x3})
	/opt/containerbase/tools/golang/1.22.5/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/opt/containerbase/tools/golang/1.22.5/src/go/types/check.go:372
sigs.k8s.io/controller-tools/pkg/loader.(*loader).typeCheck(0xc000291440, 0xc000616bc0)
	/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.1/pkg/loader/loader.go:286 +0x36a
sigs.k8s.io/controller-tools/pkg/loader.(*Package).NeedTypesInfo(0xc000616bc0)
	/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.1/pkg/loader/loader.go:99 +0x39
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check(0xc00081b140, 0xc000616bc0)
	/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.1/pkg/loader/refs.go:268 +0x2b7
sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check.func1(0x0?)
	/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.1/pkg/loader/refs.go:262 +0x53
created by sigs.k8s.io/controller-tools/pkg/loader.(*TypeChecker).check in goroutine 109
	/home/ubuntu/go/pkg/mod/sigs.k8s.io/controller-tools@v0.12.1/pkg/loader/refs.go:260 +0x1c5
exit status 2
apis/generate.go:45: running "go": exit status 1
github.com/docker/docker@v25.0.6+incompatible: missing go.sum entry for go.mod file; to add it:
	go mod download github.com/docker/docker
make[1]: *** [build/makelib/golang.mk:240: go.generate] Error 1
make: *** [build/makelib/common.mk:434: generate] Error 2

@phisco-renovate phisco-renovate bot changed the title chore(deps): update module github.com/docker/docker to v24.0.9+incompatible [security] (release-1.13) chore(deps): update module github.com/docker/docker to v25 [security] (release-1.13) Jul 30, 2024
@phisco-renovate phisco-renovate bot force-pushed the renovate/release-1.13-go-github.com-docker-docker-vulnerability branch from 6f59d31 to 4a9b26c Compare July 31, 2024 08:23
@phisco-renovate phisco-renovate bot changed the title chore(deps): update module github.com/docker/docker to v25 [security] (release-1.13) chore(deps): update module github.com/docker/docker to v26 [security] (release-1.13) Jul 31, 2024
@phisco-renovate phisco-renovate bot force-pushed the renovate/release-1.13-go-github.com-docker-docker-vulnerability branch from 4a9b26c to 5fbb211 Compare August 2, 2024 08:24
@phisco-renovate phisco-renovate bot changed the title chore(deps): update module github.com/docker/docker to v26 [security] (release-1.13) chore(deps): update module github.com/docker/docker to v25 [security] (release-1.13) Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants