Commit Graph

3234 Commits

Author SHA1 Message Date
Akihiro Suda
c88c8a6547 Dockerfile: update RootlessKit to v2.3.6
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-18 11:03:52 +09:00
Sebastiaan van Stijn
81c170a696 Makefile: remove DOCKER_BUILD_GOGC
This option was added in 9672afa339 in 2016,
at which time tweaking GOGC showed a significant difference when building
the binary (`1m14.221s` vs `0m49.929s`).

Testing this Today doesn't show a real difference;

With GOGC=1000:

    rm -rf bundles/
    time hack/make.sh binary
    real	0m15.303s
    user	0m26.285s
    sys	0m6.383s

    real	0m4.931s
    user	0m3.103s
    sys	0m1.670s

    real	0m5.693s
    user	0m3.827s
    sys	0m2.384s

Without GOGC set;

    real	0m5.012s
    user	0m3.689s
    sys	0m1.549s

    real	0m5.298s
    user	0m3.997s
    sys	0m1.695s

    real	0m4.899s
    user	0m3.579s
    sys	0m1.423s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 18:02:37 +01:00
Paweł Gronowski
265bdc1a06 validate/module-replace: Ignore client diff if it only removes the replace rule
The check is supposed to detect if we're missing replace rules (mostly
for the actual code changes).

When dropping the replace rules we're also updating the client/go.mod to
use the yet-untagged `api` module version (but that's ok).

For context, an example client diff for a commit that drops replace
rules is:

```diff
index d032891256..04cb6f3bee 100644
--- client/go.mod
+++ client/go.mod
@@ -10,7 +10,7 @@ require (
        github.com/docker/go-connections v0.6.0
        github.com/docker/go-units v0.5.0
        github.com/google/go-cmp v0.7.0
-       github.com/moby/moby/api v1.52.0
+       github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e
        github.com/moby/term v0.5.2
        github.com/opencontainers/go-digest v1.0.0
        github.com/opencontainers/image-spec v1.1.1
@@ -32,5 +32,3 @@ require (
        go.opentelemetry.io/otel/metric v1.35.0 // indirect
        golang.org/x/sys v0.33.0 // indirect
 )
-
-replace github.com/moby/moby/api => ../api
diff --git client/go.sum client/go.sum
index 29b5ea6130..558c150354 100644
--- client/go.sum
+++ client/go.sum
@@ -29,6 +29,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
 github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
+github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e h1:OU/YmCsRJtfx4OhTt7DD8WANQ57eHSUkYrGFNnS5yxc=
+github.com/moby/moby/api v1.52.1-0.20251216183007-8316b79e045e/go.mod h1:8mb+ReTlisw4pS6BRzCMts5M49W5M7bKt1cJy/YbAqc=
 github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ=
 github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc=
 github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=' ']'
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-17 12:27:59 +01:00
Paweł Gronowski
8802be9eca hack: Restore rootlesskit and tini installers
Revert a part of 9e72c44dae

These are still used by packaging scripts.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-16 12:58:22 +01:00
Sebastiaan van Stijn
70298eb5b8 Merge pull request #51300 from rafaelcamelo31/50486_api_move_scripts
api: move scripts to generate and validate swagger to api module
2025-12-11 21:35:38 +01:00
Sebastiaan van Stijn
664c651a51 Merge pull request #51640 from AkihiroSuda/rm-dockerfile-install
rm -r hack/dockerfile/install
2025-12-11 21:08:15 +01:00
Rafael Camelo
0666108ebf api: move scripts to generate and validate swagger to api module
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

revert api/swagger.yaml to undo formatting

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor(api): update Dockerfile and Makefile with newline at the EOF and use current best practices

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor validations and swagger generation flow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

shfmt

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor generate-swagger-api.sh to use absolute path

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

add validate-api-swagger job for GitHub Actions

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

fix validate-api-swagger ci workflow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

update go version and redoc in api module

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-11 15:16:47 +01:00
Paweł Gronowski
a97b330c6c Makefile: Add simple dev loop
Add a `dev` target which adds a convenient developer loop which
rebuilds and reruns the daemon after a SIGINT is received.

It can be exited by sending SIGINT (Ctrl+C) a couple times.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-11 14:37:10 +01:00
Akihiro Suda
9e72c44dae rm -r hack/dockerfile/install
The directory was solely used by Dockerfile.simple.

For the "simple" mode, we can just directly apt-get the dependencies.

A part of issue 51637

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-03 18:33:55 +09:00
Paweł Gronowski
6f9d1ec3fb update to go1.25.5
These releases include 2 security fixes following the security policy:

- crypto/x509: excessive resource consumption in printing error string for host certificate validation

    Within HostnameError.Error(), when constructing an error string, there is no limit to the number of hosts that will be printed out.
    Furthermore, the error string is constructed by repeated string concatenation, leading to quadratic runtime.

    Therefore, a certificate provided by a malicious actor can result in excessive resource consumption.
    HostnameError.Error() now limits the number of hosts and utilizes strings.Builder when constructing an error string.

    Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

    This is CVE-2025-61729 and Go issue https://go.dev/issue/76445.

- crypto/x509: excluded subdomain constraint does not restrict wildcard SANs

    An excluded subdomain constraint in a certificate chain does not restrict the
    usage of wildcard SANs in the leaf certificate. For example a constraint that
    excludes the subdomain test.example.com does not prevent a leaf certificate from
    claiming the SAN *.example.com.

    This is CVE-2025-61727 and Go issue https://go.dev/issue/76442.

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

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-02 20:30:08 +01:00
Paweł Gronowski
5ecc72679d Merge pull request #51645 from thaJeztah/api_relax_replace_check
hack/validate/module-replace: relax check
2025-12-02 15:23:02 +00:00
Sebastiaan van Stijn
7687298e0a hack/validate/module-replace: relax check
Do not require replace rules to be added if there's no code-changes
in the module. Note that changes in api/swagger.yaml may result in
changes in generated code, but this should be checked separate from
the swagger itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-02 16:14:07 +01:00
Luciano Ciccariello
f97f234729 Dockerfile: update runc binary to v1.3.4
- release notes: https://github.com/opencontainers/runc/releases/tag/v1.4.0
- full diff: opencontainers/runc@v1.3.3...v1.4.0

This version bump aims to fix a regression in runc v1.3.3, which caused
/dev/shm to have inappropriate permissions exposed to containers:
* https://github.com/opencontainers/runc/issues/4971
* https://github.com/opencontainers/runc/pull/4976

Signed-off-by: Luciano Ciccariello <xeeynamo@hotmail.com>
2025-12-02 09:31:00 +00:00
Paweł Gronowski
46ca7f19cd validate/module-replace: Fix check
The bash array usage was wrong - change to a simpler check that just
compares if the diff is empty.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-27 15:58:26 +01:00
Rob Murray
7e14b4d931 Update docker-py in test-docker-py
Pick up fixes for:
- test_create_with_ipv6_address
- test_connect_with_ipv6_address

65f7f0c..df3f8e2

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 14:14:00 +00:00
Sebastiaan van Stijn
4a57a8cd7c Merge pull request #51504 from vvoland/hack-check-module-replace
hack/validate: Check if replace rules are needed
2025-11-13 15:17:11 +01:00
Paweł Gronowski
5cf1fb3954 hack/validate: Check if replace rules are needed
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-12 21:43:24 +01:00
Paweł Gronowski
0f597561e8 hack/test/unit: Fix api and client module testing without replace rules
Running sub-package tests from the root module without readding the
replace rules wasn't running the tests from the local in-tree versions
of these submodules.

Fix by cd-ing into their directories before running tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-12 21:38:59 +01:00
Sebastiaan van Stijn
b74e6fefba Merge pull request #51469 from thaJeztah/daemon_rm_deadcode
remove some dead code
2025-11-11 15:01:02 +01:00
Sebastiaan van Stijn
7c29edf1b4 hack: remove cpexp package
This looks to have been accidentally committed in
1b1608f2cd

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-11 09:37:43 +01:00
Austin Vazquez
365e588d0f Dockerfile: update containerd binary to v2.2.0 (static binaries and CI only)
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-10 21:06:12 -05:00
Paweł Gronowski
922cd97491 update to go1.25.4
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-06 14:15:23 +01:00
Austin Vazquez
c351539358 Dockerfile: test containerd v2.1.5 (linux), v2.0.7 (windows)
Update the version of containerd used in CI and for static binaries
to v2.1.5 (linux) and v2.0.7 (windows)

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 19:11:57 -06:00
Austin Vazquez
fabdccbe10 api/types: move disk usage structs to per type packages
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 11:20:15 -06:00
Paweł Gronowski
97524fa4d4 Merge pull request #51397 from vvoland/vendor-buildkit
vendor: github.com/moby/buildkit v0.25.2
2025-11-05 14:13:55 +01:00
Sebastiaan van Stijn
b075a393b1 Merge pull request #51235 from austinvazquez/refactor-client-system
api/types/system: deprecate `DiskUsage.*` fields and add type specific fields
2025-11-05 14:02:50 +01:00
Paweł Gronowski
39f2dbffa1 vendor: github.com/moby/buildkit v0.25.2
full diff: https://github.com/moby/buildkit/compare/v0.25.1...v0.25.2

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-05 13:09:29 +01:00
Paweł Gronowski
35f6a78082 Dockerfile: update runc binary to v1.3.3
Update the version used in CI and for the static binaries.

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

This release contains fixes for three high-severity security
vulnerabilities in runc (CVE-2025-31133, CVE-2025-52565, and
CVE-2025-52881). All three vulnerabilities ultimately allow (through
different methods) for full container breakouts by bypassing runc's
restrictions for writing to arbitrary /proc files.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-05 10:57:28 +01:00
Austin Vazquez
a69abdd90d api/types/system: add type specific usage fields to DiskUsage
This change adds type specific fields to `GET /system/df` endpoint with high level information of disk usage. This change also introduces `verbose` query to the endpoint so that detailed information is by default excluded unless queried to reduce memory consumption. The previous top level `DiskUsage` fields (`Images`, `Containers`, `Volumes` and `BuildCache`) are now deprecated and kept for backwards compatibility.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-03 16:34:26 -06:00
Paweł Gronowski
1e56b87f7f hack/vendor: Make dropreplace vendor latest version
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-31 17:24:21 +01:00
Sebastiaan van Stijn
6aea8c2591 Dockerfile: update integration-cli CLI to v25.0.5
Now that we're raising the minimum API version, we can also update
the CLI used in our integration-cli tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 09:22:40 +01:00
Paweł Gronowski
7a97e1cb40 Merge pull request #51334 from thaJeztah/rename_auth
api/types/registry: rename AuthenticateOKBody to AuthResponse
2025-10-29 23:51:39 +01:00
Sebastiaan van Stijn
0eba2989e0 api/types/registry: rename AuthenticateOKBody to AuthResponse
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 18:06:29 +01:00
Sebastiaan van Stijn
90e7232c8e Dockerfile: update runc binary to v1.3.2
Update the version used in CI and for the static binaries.

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 14:38:17 +01:00
Austin Vazquez
bae45f766d api/types/network: define ConnectRequest and DisconnectRequest
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-29 11:44:18 +01:00
Sebastiaan van Stijn
68e1a8805b Dockerfile: test against containerd v2.1.4
Update the version of containerd used in CI and for static binaries
to v2.1.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 08:55:48 -05:00
Sebastiaan van Stijn
35acf347eb hack: disable go telemetry in integration tests
commit 081987b647 updated the Dockerfile
to disable go's telemetry in our dev / test-environment; as collecting
this data doesn't serve much purpose.

However, the configuration to disable telemetry is tied to the user's
home-directory (HOME); and disabling telemetry writs a config-file to the
user's home-directory (`~/.config/go/telemetry/mode`). While go provides
env-vars about the mode and location (`GOTELEMETRY` and `GOTELEMETRYDIR`),
those env-vars are read-only and cannot be used to either disable telemetry
or to set the location;

> Information about telemetry configuration is also available via read-only Go environment variables:
>
>  go env GOTELEMETRY reports the telemetry mode.
> go env GOTELEMETRYDIR reports the directory holding telemetry configuration and data.

Some steps in our CI set up a different home-directory, which is not configured
to disable telemetry, which means that CI currently leaves behind a bunch of
files related to this;

    make TEST_FILTER=TestPruneDontDeleteUsedDangling test-integration
    tree -a bundles/test-integration/fake-HOME/
    bundles/test-integration/fake-HOME/
    └── .config
        └── go
            └── telemetry
                ├── local
                │   ├── asm@go1.25.3-go1.25.3-linux-arm64-2025-10-21.v1.count
                │   ├── compile@go1.25.3-go1.25.3-linux-arm64-2025-10-21.v1.count
                │   ├── go@go1.25.3-go1.25.3-linux-arm64-2025-10-21.v1.count
                │   ├── link@go1.25.3-go1.25.3-linux-arm64-2025-10-21.v1.count
                │   ├── test2json@go1.25.3-go1.25.3-linux-arm64-2025-10-21.v1.count
                │   ├── upload.token
                │   └── weekends
                └── upload

    6 directories, 7 files

This patch disables go telemetry also for this home-directory to prevent
those files from being created, and to prevent go from producing the
telemetry.

With this patch, only the file to disable telemetry is produced:

    make TEST_FILTER=TestPruneDontDeleteUsedDangling test-integration
    tree -a bundles/test-integration/fake-HOME/
    bundles/test-integration/fake-HOME/
    └── .config
        └── go
            └── telemetry
                └── mode

    4 directories, 1 file

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 12:17:30 +02:00
Austin Vazquez
42ba5466c7 api: rename volumes.CreateOptions to volumes.CreateRequest
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-20 13:23:41 -05:00
Sebastiaan van Stijn
acda47637c ci: update docker-py to main (v7.2.0-dev)
full diff: https://github.com/docker/docker-py/compare/7.1.0...65f7f0c772577beb5e2cd6daac4e5ca806ccc4af

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-17 18:46:44 +02:00
Sebastiaan van Stijn
c5abafb459 Merge pull request #51186 from thaJeztah/deprecate_api_v1.43
daemon: raise default minimum API version to v1.44
2025-10-16 17:40:54 +02:00
Paweł Gronowski
acfe4e8613 gha: add support for docker-v* tags
ci(bin-image): strip prefix for bin-image tags

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-16 14:26:10 +02:00
Sebastiaan van Stijn
2c59be7011 daemon: raise default minimum API version to v1.44
- relates to 96b29f5a1f
- similar to 08e4e88482

The daemon currently provides support for API versions all the way back
to v1.24, which is the version of the API that shipped with docker 1.12.0
(released in 2016).

Such old versions of the client are rare, and supporting older API versions
has accumulated significant amounts of code to remain backward-compatible
(which is largely untested, and a "best-effort" at most).

This patch updates the minimum API version to v1.44, matching the minimum
version of the client, and matching the API version of docker v25.0, which
is the oldest supported version (through Mirantis MCR).

The intent is to start deprecating older API versions when daemons implementing
them reach EOL. This patch does not yet remove backward-compatibility code
for older API versions, and the DOCKER_MIN_API_VERSION environment variable
allows overriding the minimum version (to allow restoring the behavior from
before this patch), however, API versions below v1.44 should be considered
"best effort", and we may remove compatibility code to provide "degraded"
support.

With this patch the daemon defaults to API v1.44 as minimum:

    docker version
    Client:
     Version:           28.5.0
     API version:       1.51
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.44)
    ....

Trying to use an older version of the API produces an error:

    DOCKER_API_VERSION=1.43 docker version
    Client:
     Version:           28.5.0
     API version:       1.43 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default
    Error response from daemon: client version 1.43 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version

To restore the previous minimum, users can start the daemon with the
DOCKER_MIN_API_VERSION environment variable set:

    DOCKER_MIN_API_VERSION=1.24 dockerd

API 1.24 is the oldest supported API version;

    docker version
    Client:
     Version:           28.5.0
     API version:       1.24 (downgraded from 1.51)
     Go version:        go1.24.7
     Git commit:        887030f
     Built:             Thu Oct  2 14:54:39 2025
     OS/Arch:           linux/arm64
     Context:           default

    Server:
     Engine:
      Version:          dev
      API version:      1.52 (minimum version 1.24)
    ....

When using the `DOCKER_MIN_API_VERSION` with a version of the API that
is not supported, an error is produced when starting the daemon;

    DOCKER_MIN_API_VERSION=1.23 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: 1.23

    DOCKER_MIN_API_VERSION=1.99 dockerd --validate
    invalid DOCKER_MIN_API_VERSION: maximum supported API version is 1.52: 1.99

Specifying a malformed API version also produces the same error;

    DOCKER_MIN_API_VERSION=hello dockerd --validate
    invalid DOCKER_MIN_API_VERSION: minimum supported API version is 1.24: hello

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-14 23:42:12 +02:00
Paweł Gronowski
1aa73144f2 update to go1.25.3
This release addresses breakage caused by a security patch included in
Go 1.25.2 and 1.24.8, which enforced overly restrictive validation on
the parsing of X.509 certificates. We've removed those restrictions
while maintaining the security fix that the initial release addressed.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-14 09:11:27 +02:00
Sebastiaan van Stijn
28018a51d8 update to go1.25.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-11 20:14:22 +02:00
Austin Vazquez
258f340a46 Merge pull request #51136 from tonistiigi/update-buildkit-v0.25.1
vendor: update buildkit to v0.25.1
2025-10-07 17:59:35 -07:00
Tonis Tiigi
1b1608f2cd hack: add patch to buildkit tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-07 16:51:15 -07:00
Paweł Gronowski
0aed907a86 update to go1.24.8
This minor release includes 10 security fixes following the security policy:

- net/mail: excessive CPU consumption in ParseAddress

    The ParseAddress function constructed domain-literal address components through repeated string concatenation. When parsing large domain-literal components, this could cause excessive CPU consumption.

    Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

    This is CVE-2025-61725 and Go issue https://go.dev/issue/75680.

- crypto/x509: quadratic complexity when checking name constraints

    Due to the design of the name constraint checking algorithm, the processing time
    of some inputs scales non-linearly with respect to the size of the certificate.

    This affects programs which validate arbitrary certificate chains.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58187 and Go issue https://go.dev/issue/75681.

- crypto/tls: ALPN negotiation errors can contain arbitrary text

    The crypto/tls conn.Handshake method returns an error on the server-side when
    ALPN negotation fails which can contain arbitrary attacker controlled
    information provided by the client-side of the connection which is not escaped.

    This affects programs which log these errors without any additional form of
    sanitization, and may allow injection of attacker controlled information into
    logs.

    Thanks to National Cyber Security Centre Finland for reporting this issue.

    This is CVE-2025-58189 and Go issue https://go.dev/issue/75652.

- encoding/pem: quadratic complexity when parsing some invalid inputs

    Due to the design of the PEM parsing function, the processing time for some
    inputs scales non-linearly with respect to the size of the input.

    This affects programs which parse untrusted PEM inputs.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-61723 and Go issue https://go.dev/issue/75676.

- net/url: insufficient validation of bracketed IPv6 hostnames

    The Parse function permitted values other than IPv6 addresses to be included in square brackets within the host component of a URL. RFC 3986 permits IPv6 addresses to be included within the host component, enclosed within square brackets. For example: "http://[::1]/". IPv4 addresses and hostnames must not appear within square brackets. Parse did not enforce this requirement.

    Thanks to Enze Wang, Jingcheng Yang and Zehui Miao of Tsinghua University for reporting this issue.

    This is CVE-2025-47912 and Go issue https://go.dev/issue/75678.

- encoding/asn1: pre-allocating memory when parsing DER payload can cause memory exhaustion

    When parsing DER payloads, memories were being allocated prior to fully validating the payloads.
    This permits an attacker to craft a big empty DER payload to cause memory exhaustion in functions such as asn1.Unmarshal, x509.ParseCertificateRequest, and ocsp.ParseResponse.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58185 and Go issue https://go.dev/issue/75671.

- net/http: lack of limit when parsing cookies can cause memory exhaustion

    Despite HTTP headers having a default limit of 1 MB, the number of cookies that can be parsed did not have a limit.
    By sending a lot of very small cookies such as "a=;", an attacker can make an HTTP server allocate a large amount of structs, causing large memory consumption.

    net/http now limits the number of cookies accepted to 3000, which can be adjusted using the httpcookiemaxnum GODEBUG option.

    Thanks to jub0bs for reporting this issue.

    This is CVE-2025-58186 and Go issue https://go.dev/issue/75672.

- crypto/x509: panic when validating certificates with DSA public keys

    Validating certificate chains which contain DSA public keys can cause programs
    to panic, due to a interface cast that assumes they implement the Equal method.

    This affects programs which validate arbitrary certificate chains.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-58188 and Go issue https://go.dev/issue/75675.

- archive/tar: unbounded allocation when parsing GNU sparse map

    tar.Reader did not set a maximum size on the number of sparse region data blocks in GNU tar pax 1.0 sparse files. A maliciously-crafted archive containing a large number of sparse regions could cause a Reader to read an unbounded amount of data from the archive into memory. When reading from a compressed source, a small compressed input could result in large allocations.

    Thanks to Harshit Gupta (Mr HAX) - https://www.linkedin.com/in/iam-harshit-gupta/ for reporting this issue.

    This is CVE-2025-58183 and Go issue https://go.dev/issue/75677.

- net/textproto: excessive CPU consumption in Reader.ReadResponse

    The Reader.ReadResponse function constructed a response string through
    repeated string concatenation of lines. When the number of lines in a response is large,
    this could cause excessive CPU consumption.

    Thanks to Jakub Ciolek for reporting this issue.

    This is CVE-2025-61724 and Go issue https://go.dev/issue/75716.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-07 15:49:36 -05:00
Austin Vazquez
f6e1bf2808 Rework Go mod tidy/vendor checks
This change reworks the Go mod tidy/vendor checks to run for all tracked Go modules by the project and fail for any uncommitted changes.

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-06 14:43:30 -05:00
Sebastiaan van Stijn
e5a66cb6d6 Merge pull request #51093 from austinvazquez/add-check-for-missing-go-sum
Add existence check for go.mod and go.sum files
2025-10-04 00:00:22 +02:00
Cory Snider
a90adb6dc1 api/types/network: use netip types as appropriate
And generate the ServiceInfo struct from the Swagger spec.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-10-03 21:39:14 +02:00