Commit Graph

55133 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
701f2fdade client: improve mocking responses
Make the mocked responses match the API closer;

- Add headers as returned by the daemon's VersionMiddleware
- By default handle "/_ping" requests to allow the client to
  perform API-version negotiation as part of tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:27 +01:00
Sebastiaan van Stijn
ef588715b6 client: add mockPingResponse utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:26 +01:00
Sebastiaan van Stijn
acb5c5a390 client: mockResponse: prevent sharing body reader
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:26 +01:00
Sebastiaan van Stijn
45c9f460b8 client: checkResponseErr: don't read body for HEAD requests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:26 +01:00
Sebastiaan van Stijn
77858fab6e client: ensureBody: also ensure the request is preserved
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:26 +01:00
Sebastiaan van Stijn
e51a4306e2 client: ensureReaderClosed: small optimizations
Skip draining for HEAD requests and empty responses.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:26 +01:00
Sebastiaan van Stijn
89bd3150e1 client: client.ping(): use fresh request for HEAD -> GET
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-27 12:05:25 +01:00
Paweł Gronowski
c0c280ecf7 Merge pull request #51598 from thaJeztah/bump_zfs3
vendor: github.com/mistifyio/go-zfs/v3 v3.1.0
2025-11-26 21:46:38 +01:00
Paweł Gronowski
ea3011134b Merge pull request #51597 from vvoland/update-selinux
vendor: github.com/opencontainers/selinux v1.13.1
2025-11-26 21:43:45 +01:00
Sebastiaan van Stijn
2b8b692d3d Merge pull request #51600 from thaJeztah/no_empty_warnings
client: ServiceCreate,ServiceUpdate: don't add empty warnings
2025-11-26 21:14:48 +01:00
Sebastiaan van Stijn
de1f0ee351 Merge pull request #51595 from thaJeztah/bump_crypto
vendor: golang.org/x/crypto v0.45.0
2025-11-26 21:13:38 +01:00
Sebastiaan van Stijn
75520d1f5b client: resolveContainerSpecImage, resolvePluginSpecRemote: early returns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 19:24:27 +01:00
Sebastiaan van Stijn
366ea9e9af client: ServiceCreate,ServiceUpdate: don't add empty warnings
This code was refactored in cd08b79c02, which
forgot to add a check for empty warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 19:20:45 +01:00
Sebastiaan van Stijn
e94ed33de1 vendor: github.com/mistifyio/go-zfs/v3 v3.1.0
full diff: https://github.com/mistifyio/go-zfs/compare/v3.0.1...v3.1.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 17:45:58 +01:00
Paweł Gronowski
0389d3b13e vendor: github.com/opencontainers/selinux v1.13.1
full diff: https://github.com/opencontainers/selinux/compare/v1.13.0...v1.13.1

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-26 17:36:40 +01:00
Sebastiaan van Stijn
bda87b7de8 vendor: golang.org/x/crypto v0.45.0
full diff: https://github.com/golang/crypto/compare/v0.44.0...v0.45.0

Hello gophers,

We have tagged version v0.45.0 of golang.org/x/crypto in order to address two
security issues.

This version fixes a vulnerability in the golang.org/x/crypto/ssh package and a
vulnerability in the golang.org/x/crypto/ssh/agent package which could cause
programs to consume unbounded memory or panic respectively.

SSH servers parsing GSSAPI authentication requests don't validate the number of
mechanisms specified in the request, allowing an attacker to cause unbounded
memory consumption.

Thanks to Jakub Ciolek for reporting this issue.

This is CVE-2025-58181 and Go issue https://go.dev/issue/76363.

SSH Agent servers do not validate the size of messages when processing new
identity requests, which may cause the program to panic if the message is
malformed due to an out of bounds read.

Thanks to Jakub Ciolek for reporting this issue.

This is CVE-2025-47914 and Go issue https://go.dev/issue/76364.

Cheers, Go Security team

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 17:33:39 +01:00
Paweł Gronowski
c592d02dfc Merge pull request #51594 from thaJeztah/bump_x_deps
vendor: update various golang.org/x/xxx dependencies
2025-11-26 17:28:55 +01:00
Rob Murray
baf59d62d6 Merge pull request #51592 from robmry/sbleave_gw_config_error
Suppress errors from gateway re-config when disconnecting a network
2025-11-26 16:07:41 +00:00
Paweł Gronowski
b68e277ae8 Merge pull request #50903 from dmcgowan/c8d-fix-window-migration-panic
Fix panic on Windows when containerd is not enabled and snapshotter is
2025-11-26 15:58:31 +01:00
Rob Murray
163cc95aea Add TestGatewayErrorOnNetDisconnect
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-26 14:45:18 +00:00
Rob Murray
8f2aa3e0f5 Network disconnect: log rather than error on gateway update
During a network disconnect, log rather than returning an error
if it's not possible to set up a new gateway.

This restores the behaviour from before commit 53390f8 ("Put
clearNetworkResources() inline in its only caller"). It's not
ideal, but by the time new gateways are selected the old
endpoint has been disconnected - and nothing puts things back.
Until that's cleaned up, a broken state is inevitable, but
letting endpoint deletion complete means the container can
be restarted or re-connected to the network without a zombie
endpoint causing further issues.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-26 14:45:18 +00:00
Derek McGowan
e4a1657762 Check containerd client before using on Windows
Throw an error if the containerd snapshotter is enabled on Windows but
containerd has not been configured. This fixes a panic in this case when
trying to use an uninitialized client.

Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-26 15:40:08 +01:00
Sebastiaan van Stijn
b1dccad684 Merge pull request #51593 from thaJeztah/bump_circl
vendor: github.com/cloudflare/circl v1.6.1
2025-11-26 15:03:32 +01:00
Sebastiaan van Stijn
a3916290da vendor: golang.org/x/mod v0.30.0
full diff: https://github.com/golang/mod/compare/v0.29.0...v0.30.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 14:31:44 +01:00
Sebastiaan van Stijn
10d68d4399 vendor: golang.org/x/net v0.47.0
full diff: https://github.com/golang/net/compare/v0.46.0...v0.47.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 14:15:14 +01:00
Sebastiaan van Stijn
633acaa5b3 vendor: golang.org/x/crypto v0.44.0
full diff: https://github.com/golang/crypto/compare/v0.43.0...v0.44.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 14:14:35 +01:00
Sebastiaan van Stijn
e4900958c3 vendor: golang.org/x/text v0.31.0
full diff: https://github.com/golang/text/compare/v0.30.0...v0.31.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 14:09:23 +01:00
Sebastiaan van Stijn
bd79eb0da5 vendor: golang.org/x/tools v0.38.0
full diff: https://github.com/golang/tools/compare/v0.37.0...v0.38.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 14:08:41 +01:00
Sebastiaan van Stijn
421bda22d1 vendor: golang.org/x/sync v0.18.0
full diff: https://github.com/golang/sync/compare/v0.17.0...v0.18.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 13:43:51 +01:00
Sebastiaan van Stijn
3054fdd8b2 vendor: golang.org/x/sys v0.38.0
- cpu: add HPDS, LOR, PAN detection for arm64
- cpu: also use MRS instruction in getmmfr1
- cpu: use MRS instruction to read arm64 system registers
- unix: add consts for ELF handling
- unix: add SetMemPolicy and its mode/flag values
- unix: add SizeofNhmsg and SizeofNexthopGrp
- windows: add iphlpapi routing functions

full diff: https://github.com/golang/sys/compare/v0.37.0...v0.38.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 13:39:03 +01:00
Sebastiaan van Stijn
997837376a vendor: github.com/cloudflare/circl v1.6.1
- fixes [GHSA-2x5j-vhc8-9cwm]: CIRCL-Fourq: Missing and wrong validation
  can lead to incorrect results

full diff: https://github.com/cloudflare/circl/compare/v1.6.0...v1.6.1

[GHSA-2x5j-vhc8-9cwm]: https://github.com/cloudflare/circl/security/advisories/GHSA-2x5j-vhc8-9cwm

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-26 13:30:29 +01:00
Rob Murray
5512eea3d0 Merge pull request #51559 from 2003Aditya/TestAPIImagesSaveAndLoad
migrate TestAPIImagesSaveAndLoad to integration test
2025-11-26 12:11:14 +00:00
Rob Murray
a3c29e8996 Merge pull request #51455 from smerkviladze/add-windows-integration-tests
integration: add Windows network driver and isolation tests
2025-11-26 11:42:54 +00:00
Rob Murray
4a166c7316 Merge pull request #51459 from 2003Aditya/contributing-docs
docs: update contributing guides for clarity and consistency (#49891)
2025-11-26 10:57:39 +00:00
Sopho Merkviladze
5a5d5b4c5f integration: add Windows network driver and isolation tests
Add integration tests for Windows container functionality focusing on network drivers and container isolation modes.

Signed-off-by: Sopho Merkviladze <smerkviladze@mirantis.com>
2025-11-26 13:35:19 +04:00
Rob Murray
18d2a08fcf Merge pull request #51587 from robmry/unmap_ipv6_addr
Unmap() more netip.Addr vars created from slices
2025-11-25 19:30:27 +00:00
Rob Murray
731ae07e65 Endpint.sbLeave: when deleting container, no new gateway
When the endpoint providing a container's default gateway
is removed, there's no need to select a new gateway if the
container is being removed.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-25 18:11:07 +00:00
Albin Kerouanton
03797acd88 Merge pull request #51586 from robmry/ep_options_exposed_ports
PublishAllPorts: create port mappings for exposed ports
2025-11-25 18:21:59 +01:00
Rob Murray
abd4c104dc Merge pull request #51526 from robmry/refactor-create-mounts
Refactor Daemon.create - prep for call to NRI plugin
2025-11-25 16:13:57 +00:00
Rob Murray
56dda25227 Merge pull request #51507 from zhangguanzhang/fix-pause-restart
libnet: setupDNS: don't overwrite user-modified resolv.conf
2025-11-25 13:53:10 +00:00
zhangguanzhang
7639e193ff libnet: setupDNS: don't overwrite user-modified resolv.conf
Call resolvconf.UserModified() in sandbox.setupDNS() to check if
resolv.conf was manually modified before regenerating it during
container restart for non-host network modes.

Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-11-25 20:32:40 +08:00
Albin Kerouanton
eb18b398d4 libnet: rebuildDNS: update the hash file
Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-11-25 11:51:27 +01:00
Albin Kerouanton
937246a868 libnet: populateNetworkResourcesOS: updateDNS only if !needResolver
When ep.needResolver() is true, sb.startResolver() calls sb.rebuildDNS()
which doesn't update the resolv.conf hash file.

Subsequent calls to sb.updateDNS() (which is only called by
populateNetworkResourcesOS) won't have any effect since it'll compare
the hash file and consider that the file was manually modified.

Make this explicit by gating the call to updateDNS() on !needResolver().

Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
2025-11-25 11:43:36 +01:00
Rob Murray
85b260fba8 PublishAllPorts: create port mappings for exposed ports
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 20:38:46 +00:00
Brian Goff
f7ccfed3f3 Merge pull request #51572 from corhere/otelcol-windows
.github: capture OTEL trace spans from all processes
2025-11-24 10:38:07 -08:00
Rob Murray
a2de9bb334 Unmap more netip.Addr vars created using AddrFromSlice
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 16:51:14 +00:00
Rob Murray
9907ded7df Merge pull request #51577 from robmry/static-ip-no-configured-subnet
Allow configured address with no configured subnet
2025-11-24 16:37:27 +00:00
Rob Murray
2effc1bfd4 inspect: unmap IPv6-mapped IPv4 host address
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 16:29:32 +00:00
Rob Murray
84a251d039 Allow configured address with no configured subnet
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-11-24 14:14:27 +00: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