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

Update vulnerable dependencies to v25.0.6+incompatible [SECURITY] #1288

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pulumi-renovate[bot]
Copy link

This PR contains the following updates:

Package Type Update Change
github.com/docker/docker require patch v25.0.2+incompatible -> v25.0.6+incompatible
github.com/moby/moby require patch v25.0.4+incompatible -> v25.0.6+incompatible

GitHub Vulnerability Alerts

CVE-2024-29018

Moby is an open source container framework originally developed by Docker Inc. as Docker. It is a key component of Docker Engine, Docker Desktop, and other distributions of container tooling or runtimes. As a batteries-included container runtime, Moby comes with a built-in networking implementation that enables communication between containers, and between containers and external resources.

Moby's networking implementation allows for creating and using many networks, each with their own subnet and gateway. This feature is frequently referred to as custom networks, as each network can have a different driver, set of parameters, and thus behaviors. When creating a network, the --internal flag is used to designate a network as internal. The internal attribute in a docker-compose.yml file may also be used to mark a network internal, and other API clients may specify the internal parameter as well.

When containers with networking are created, they are assigned unique network interfaces and IP addresses (typically from a non-routable RFC 1918 subnet). The root network namespace (hereafter referred to as the 'host') serves as a router for non-internal networks, with a gateway IP that provides SNAT/DNAT to/from container IPs.

Containers on an internal network may communicate between each other, but are precluded from communicating with any networks the host has access to (LAN or WAN) as no default route is configured, and firewall rules are set up to drop all outgoing traffic. Communication with the gateway IP address (and thus appropriately configured host services) is possible, and the host may communicate with any container IP directly.

In addition to configuring the Linux kernel's various networking features to enable container networking, dockerd directly provides some services to container networks. Principal among these is serving as a resolver, enabling service discovery (looking up other containers on the network by name), and resolution of names from an upstream resolver.

When a DNS request for a name that does not correspond to a container is received, the request is forwarded to the configured upstream resolver (by default, the host's configured resolver). This request is made from the container network namespace: the level of access and routing of traffic is the same as if the request was made by the container itself.

As a consequence of this design, containers solely attached to internal network(s) will be unable to resolve names using the upstream resolver, as the container itself is unable to communicate with that nameserver. Only the names of containers also attached to the internal network are able to be resolved.

Many systems will run a local forwarding DNS resolver, typically present on a loopback address (127.0.0.0/8), such as systemd-resolved or dnsmasq. Common loopback address examples include 127.0.0.1 or 127.0.0.53. As the host and any containers have separate loopback devices, a consequence of the design described above is that containers are unable to resolve names from the host's configured resolver, as they cannot reach these addresses on the host loopback device.

To bridge this gap, and to allow containers to properly resolve names even when a local forwarding resolver is used on a loopback address, dockerd will detect this scenario and instead forward DNS requests from the host/root network namespace. The loopback resolver will then forward the requests to its configured upstream resolvers, as expected.

Impact

Because dockerd will forward DNS requests to the host loopback device, bypassing the container network namespace's normal routing semantics entirely, internal networks can unexpectedly forward DNS requests to an external nameserver.

By registering a domain for which they control the authoritative nameservers, an attacker could arrange for a compromised container to exfiltrate data by encoding it in DNS queries that will eventually be answered by their nameservers. For example, if the domain evil.example was registered, the authoritative nameserver(s) for that domain could (eventually and indirectly) receive a request for this-is-a-secret.evil.example.

Docker Desktop is not affected, as Docker Desktop always runs an internal resolver on a RFC 1918 address.

Patches

Moby releases 26.0.0-rc3, 25.0.5 (released) and 23.0.11 (to be released) are patched to prevent forwarding DNS requests from internal networks.

Workarounds

  • Run containers intended to be solely attached to internal networks with a custom upstream address (--dns argument to docker run, or API equivalent), which will force all upstream DNS queries to be resolved from the container network namespace.

Background

  • yair zak originally reported this issue to the Docker security team.
  • PR https://redirect.github.com/moby/moby/pull/46609 was opened in public to fix this issue, as it was not originally considered to have a security implication.
  • The official documentation claims that "the --internal flag that will completely isolate containers on a network from any communications external to that network," which necessitated this advisory and CVE.

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


Data exfiltration from internal networks in github.com/docker/docker

CVE-2024-29018 / GHSA-mq39-4gv4-mvpx / GO-2024-2659

More information

Details

dockerd forwards DNS requests to the host loopback device, bypassing the container network namespace's normal routing semantics, networks marked as 'internal' can unexpectedly forward DNS requests to an external nameserver. By registering a domain for which they control the authoritative nameservers, an attacker could arrange for a compromised container to exfiltrate data by encoding it in DNS queries that will eventually be answered by their nameservers.

Severity

Unknown

References

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


Moby's external DNS requests from 'internal' networks could lead to data exfiltration

CVE-2024-29018 / GHSA-mq39-4gv4-mvpx / GO-2024-2659

More information

Details

Moby is an open source container framework originally developed by Docker Inc. as Docker. It is a key component of Docker Engine, Docker Desktop, and other distributions of container tooling or runtimes. As a batteries-included container runtime, Moby comes with a built-in networking implementation that enables communication between containers, and between containers and external resources.

Moby's networking implementation allows for creating and using many networks, each with their own subnet and gateway. This feature is frequently referred to as custom networks, as each network can have a different driver, set of parameters, and thus behaviors. When creating a network, the --internal flag is used to designate a network as internal. The internal attribute in a docker-compose.yml file may also be used to mark a network internal, and other API clients may specify the internal parameter as well.

When containers with networking are created, they are assigned unique network interfaces and IP addresses (typically from a non-routable RFC 1918 subnet). The root network namespace (hereafter referred to as the 'host') serves as a router for non-internal networks, with a gateway IP that provides SNAT/DNAT to/from container IPs.

Containers on an internal network may communicate between each other, but are precluded from communicating with any networks the host has access to (LAN or WAN) as no default route is configured, and firewall rules are set up to drop all outgoing traffic. Communication with the gateway IP address (and thus appropriately configured host services) is possible, and the host may communicate with any container IP directly.

In addition to configuring the Linux kernel's various networking features to enable container networking, dockerd directly provides some services to container networks. Principal among these is serving as a resolver, enabling service discovery (looking up other containers on the network by name), and resolution of names from an upstream resolver.

When a DNS request for a name that does not correspond to a container is received, the request is forwarded to the configured upstream resolver (by default, the host's configured resolver). This request is made from the container network namespace: the level of access and routing of traffic is the same as if the request was made by the container itself.

As a consequence of this design, containers solely attached to internal network(s) will be unable to resolve names using the upstream resolver, as the container itself is unable to communicate with that nameserver. Only the names of containers also attached to the internal network are able to be resolved.

Many systems will run a local forwarding DNS resolver, typically present on a loopback address (127.0.0.0/8), such as systemd-resolved or dnsmasq. Common loopback address examples include 127.0.0.1 or 127.0.0.53. As the host and any containers have separate loopback devices, a consequence of the design described above is that containers are unable to resolve names from the host's configured resolver, as they cannot reach these addresses on the host loopback device.

To bridge this gap, and to allow containers to properly resolve names even when a local forwarding resolver is used on a loopback address, dockerd will detect this scenario and instead forward DNS requests from the host/root network namespace. The loopback resolver will then forward the requests to its configured upstream resolvers, as expected.

Impact

Because dockerd will forward DNS requests to the host loopback device, bypassing the container network namespace's normal routing semantics entirely, internal networks can unexpectedly forward DNS requests to an external nameserver.

By registering a domain for which they control the authoritative nameservers, an attacker could arrange for a compromised container to exfiltrate data by encoding it in DNS queries that will eventually be answered by their nameservers. For example, if the domain evil.example was registered, the authoritative nameserver(s) for that domain could (eventually and indirectly) receive a request for this-is-a-secret.evil.example.

Docker Desktop is not affected, as Docker Desktop always runs an internal resolver on a RFC 1918 address.

Patches

Moby releases 26.0.0-rc3, 25.0.5 (released) and 23.0.11 (to be released) are patched to prevent forwarding DNS requests from internal networks.

Workarounds
  • Run containers intended to be solely attached to internal networks with a custom upstream address (--dns argument to docker run, or API equivalent), which will force all upstream DNS queries to be resolved from the container network namespace.
Background
  • yair zak originally reported this issue to the Docker security team.
  • PR https://redirect.github.com/moby/moby/pull/46609 was opened in public to fix this issue, as it was not originally considered to have a security implication.
  • The official documentation claims that "the --internal flag that will completely isolate containers on a network from any communications external to that network," which necessitated this advisory and CVE.

Severity

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

References

This data is provided by OSV and the GitHub Advisory 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

moby/moby (github.com/moby/moby)

v25.0.6+incompatible

Compare Source

v25.0.5+incompatible

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - "before 4am on Monday" (UTC).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

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


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

This PR has been generated by Renovate Bot.

@pulumi-renovate pulumi-renovate bot added dependencies Pull requests that update a dependency file impact/no-changelog-required This issue doesn't require a CHANGELOG update labels Nov 27, 2024
@pulumi-renovate pulumi-renovate bot enabled auto-merge (rebase) November 27, 2024 18:51
@pulumi-renovate
Copy link
Author

pulumi-renovate bot commented Nov 27, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact 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: provider/go.sum
Command failed: go get -d -t ./...
go: -d flag is deprecated. -d=true is a no-op
go: downloading github.com/pulumi/pulumi/sdk/v3 v3.140.0
go: downloading github.com/pulumi/pulumi-terraform-bridge/v3 v3.96.0
go: downloading github.com/docker/cli v25.0.3+incompatible
go: downloading github.com/docker/distribution v2.8.2+incompatible
go: downloading github.com/docker/docker v25.0.6+incompatible
go: downloading github.com/moby/buildkit v0.13.0-beta3.0.20240205165705-d6e142600ee5
go: downloading github.com/moby/moby v25.0.6+incompatible
go: downloading github.com/pulumi/pulumi/pkg/v3 v3.140.0
go: downloading github.com/tonistiigi/fsutil v0.0.0-20230825212630-f09800878302
go: downloading github.com/docker/docker-credential-helpers v0.8.0
go: downloading github.com/pulumi/pulumi-java/pkg v0.17.0
go: downloading github.com/pulumi/pulumi-yaml v1.11.2
go: downloading github.com/pulumi/schema-tools v0.1.2
go: downloading github.com/teekennedy/goldmark-markdown v0.3.0
go: downloading github.com/yuin/goldmark v1.7.4
go: downloading github.com/opencontainers/image-spec v1.1.0-rc5
go: downloading github.com/moby/sys/user v0.1.0
go: downloading github.com/containerd/containerd v1.7.12
go: downloading github.com/klauspost/compress v1.17.4
go: downloading github.com/moby/sys/sequential v0.5.0
go: downloading github.com/distribution/reference v0.5.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0
go: downloading go.opentelemetry.io/otel/trace v1.24.0
go: downloading github.com/gogo/googleapis v1.4.1
go: downloading go.opentelemetry.io/otel v1.24.0
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0
go: downloading github.com/gofrs/flock v0.8.1
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
go: downloading github.com/hashicorp/terraform-plugin-go v0.25.0
go: downloading github.com/hashicorp/terraform-plugin-log v0.9.0
go: downloading github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20240520223432-0c0bf0d65f10
go: downloading github.com/mitchellh/go-testing-interface v1.14.1
go: downloading github.com/pulumi/terraform-diff-reader v0.0.2
go: downloading github.com/zclconf/go-cty v1.14.2
go: downloading github.com/moby/sys/symlink v0.2.0
go: downloading github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93
go: downloading github.com/ettle/strcase v0.1.1
go: downloading go.opentelemetry.io/otel/metric v1.24.0
go: downloading github.com/containerd/typeurl/v2 v2.1.1
go: downloading github.com/vmihailenco/msgpack v4.0.4+incompatible
go: downloading github.com/vmihailenco/msgpack/v5 v5.4.1
go: downloading github.com/hashicorp/go-uuid v1.0.3
go: downloading github.com/hashicorp/logutils v1.0.0
go: downloading go.uber.org/atomic v1.10.0
go: downloading github.com/hashicorp/terraform-svchost v0.1.1
go: downloading github.com/hashicorp/go-getter v1.7.5
go: downloading github.com/hashicorp/go-version v1.6.0
go: downloading github.com/mitchellh/cli v1.1.5
go: downloading github.com/mitchellh/hashstructure v1.0.0
go: downloading github.com/ProtonMail/go-crypto v1.1.0-alpha.0
go: downloading github.com/go-logr/logr v1.4.1
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
go: downloading go.opentelemetry.io/otel/sdk v1.22.0
go: downloading github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531
go: downloading google.golang.org/appengine v1.6.8
go: downloading github.com/vmihailenco/tagparser/v2 v2.0.0
go: downloading github.com/armon/go-radix v1.0.0
go: downloading github.com/bgentry/speakeasy v0.1.0
go: downloading github.com/posener/complete v1.2.3
go: downloading github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: downloading github.com/hashicorp/go-safetemp v1.0.0
go: downloading github.com/ulikunitz/xz v0.5.10
go: downloading github.com/moby/sys/signal v0.7.0
go: downloading go.opentelemetry.io/proto/otlp v1.0.0
go: downloading github.com/gorilla/mux v1.8.0
go: downloading github.com/huandu/xstrings v1.3.3
go: downloading github.com/Microsoft/hcsshim v0.11.4
go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0
go: downloading github.com/prometheus/client_golang v1.16.0
go: downloading github.com/prometheus/client_model v0.4.0
go: downloading github.com/prometheus/common v0.42.0
go: downloading github.com/prometheus/procfs v0.10.1
go: github.com/pulumi/pulumi-docker/provider/v4 imports
	github.com/terraform-providers/terraform-provider-docker/shim: cannot find module providing package github.com/terraform-providers/terraform-provider-docker/shim
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants