Commit graph

44978 commits

Author SHA1 Message Date
Sebastiaan van Stijn
d06cf03729
vendor: re-vendor to add missing file
When running hack/vendor.sh, I noticed this file was added to vendor.
I suspect this should've been part of 0233029d5a,
but the vendor check doesn't appear to be catching this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3f09316e3b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-05 20:16:49 +02:00
Sebastiaan van Stijn
cf7742ea7c
vendor: opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
full diff: 02efb9a75e...3a7f492d3f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0233029d5a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-05 20:15:35 +02:00
Sebastiaan van Stijn
382e9ebbf6
vendor: github.com/containerd/ttrpc v1.1.1
- server: Fix connection leak when receiving ECONNRESET

full diff: https://github.com/containerd/ttrpc/compare/v1.1.0...v1.1.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c733cf223d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-05 20:15:35 +02:00
Laura Brehm
e0843f264d
Update github.com/containerd/containerd to the HEAD of release/1.6 and vendor
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
(cherry picked from commit e85c69e1b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-05 20:14:51 +02:00
Sebastiaan van Stijn
24fd7c5eb8
Merge pull request #45465 from corhere/backport-23.0/copy-xattr-notsupp
[23.0 backport] d/graphdriver/copy: support src fs w/o xattr support
2023-05-05 01:14:43 +02:00
Cory Snider
94fcd2d2ef d/graphdriver/copy: support src fs w/o xattr support
Treat copying extended attributes from a source filesystem which does
not support extended attributes as a no-op, same as if the file did not
possess the extended attribute. Only fail copying extended attributes if
the source file has the attribute and the destination filesystem does
not support xattrs.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 2b6761fd3e)
Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-05-04 15:28:04 -04:00
Sebastiaan van Stijn
c5197fe6c5
Merge pull request #45455 from thaJeztah/23.0_update_go1.19.9
[23.0] update go to go1.19.9
2023-05-04 19:49:24 +02:00
Sebastiaan van Stijn
70dbd2c870
[23.0] update go to go1.19.9
go1.19.9 (released 2023-05-02) includes three security fixes to the html/template
package, as well as bug fixes to the compiler, the runtime, and the crypto/tls
and syscall packages. See the Go 1.19.9 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.19.9+label%3ACherryPickApproved

release notes: https://go.dev/doc/devel/release#go1.19.9
full diff: https://github.com/golang/go/compare/go1.19.8...go1.19.9

from the announcement:

> These minor releases include 3 security fixes following the security policy:
>
>- html/template: improper sanitization of CSS values
>
>   Angle brackets (`<>`) were not considered dangerous characters when inserted
>   into CSS contexts. Templates containing multiple actions separated by a '/'
>   character could result in unexpectedly closing the CSS context and allowing
>   for injection of unexpected HMTL, if executed with untrusted input.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-24539 and Go issue https://go.dev/issue/59720.
>
> - html/template: improper handling of JavaScript whitespace
>
>   Not all valid JavaScript whitespace characters were considered to be
>   whitespace. Templates containing whitespace characters outside of the character
>   set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain
>   actions may not be properly sanitized during execution.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-24540 and Go issue https://go.dev/issue/59721.
>
> - html/template: improper handling of empty HTML attributes
>
>   Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}")
>   executed with empty input could result in output that would have unexpected
>   results when parsed due to HTML normalization rules. This may allow injection
>   of arbitrary attributes into tags.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-29400 and Go issue https://go.dev/issue/59722.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-03 20:48:31 +02:00
Sebastiaan van Stijn
94d3ad69cc
Merge pull request #45410 from rumpl/23.0_backport-fix-buildx-tag-events
[23.0 backport] Use the image service instead of the reference store for tagging
2023-04-26 17:29:05 +02:00
Sebastiaan van Stijn
933a9f83b7
Merge pull request #45407 from thaJeztah/23.0_backport_vendor_runc_1.1.5
[23.0 backport] vendor: github.com/opencontainers/runc v1.1.5
2023-04-26 16:43:32 +02:00
Djordje Lukic
fe0a414613
Use the image service instead of the reference store for tagging
The image store sends events when a new image is created/tagged, using
it instead of the reference store makes sure we send the "tag" event
when a new image is built using buildx.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-04-26 16:32:25 +02:00
Sebastiaan van Stijn
1b1230eaaf
Merge pull request #45375 from thaJeztah/23.0_backport_bump_swarmkit
[23.0 backport] vendor: github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83
2023-04-26 15:22:10 +02:00
Sebastiaan van Stijn
1b263035af
Merge pull request #45374 from thaJeztah/23.0_backport_stfu_grpc
[23.0 backport] Silence GRPC logs unless our log level is debug
2023-04-26 15:21:47 +02:00
Sebastiaan van Stijn
682542fd08
Merge pull request #45373 from thaJeztah/23.0_backport_assorted_test_and_packaging
[23.0 backport] assorted test- and build/packaging fixes
2023-04-26 15:21:31 +02:00
Sebastiaan van Stijn
40ec0eb9fe
vendor: github.com/opencontainers/runc v1.1.5
no changes in vendored code, just keeping scanners happy :)

release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.5
diff: https://github.com/opencontainers/runc/compare/v1.1.4...v1.1.5

This is the fifth patch release in the 1.1.z series of runc, which fixes
three CVEs found in runc.

* CVE-2023-25809 is a vulnerability involving rootless containers where
  (under specific configurations), the container would have write access
  to the /sys/fs/cgroup/user.slice/... cgroup hierarchy. No other
  hierarchies on the host were affected. This vulnerability was
  discovered by Akihiro Suda.
  <https://github.com/opencontainers/runc/security/advisories/GHSA-m8cg-xc2p-r3fc>

* CVE-2023-27561 was a regression which effectively re-introduced
  CVE-2019-19921. This bug was present from v1.0.0-rc95 to v1.1.4. This
  regression was discovered by @Beuc.
  <https://github.com/advisories/GHSA-vpvm-3wq2-2wvm>

* CVE-2023-28642 is a variant of CVE-2023-27561 and was fixed by the same
  patch. This variant of the above vulnerability was reported by Lei
  Wang.
  <https://github.com/opencontainers/runc/security/advisories/GHSA-g2j6-57v7-gm8c>

In addition, the following other fixes are included in this release:

* Fix the inability to use `/dev/null` when inside a container.
* Fix changing the ownership of host's `/dev/null` caused by fd redirection
  (a regression in 1.1.1).
* Fix rare runc exec/enter unshare error on older kernels, including
  CentOS < 7.7.
* nsexec: Check for errors in `write_log()`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a17029ba49)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-26 14:50:34 +02:00
Sebastiaan van Stijn
9af6762d34
Merge pull request #45403 from akerouanton/23.0-cherrypick-2d31697
[23.0 backport] daemon: set docker0 subpool as the IPAM pool
2023-04-26 14:34:41 +02:00
Sebastiaan van Stijn
0b6449a477
Merge pull request #45376 from thaJeztah/23.0_backport_delete_network_more_atomically
[23.0 backport] libnetwork: clean up inDelete network atomically
2023-04-26 13:11:30 +02:00
Albin Kerouanton
227d3f39a3
daemon: set docker0 subpool as the IPAM pool
Since cc19eba (backported to v23.0.4), the PreferredPool for docker0 is
set only when the user provides the bip config parameter or when the
default bridge already exist. That means, if a user provides the
fixed-cidr parameter on a fresh install or reboot their computer/server
without bip set, dockerd throw the following error when it starts:

> failed to start daemon: Error initializing network controller: Error
> creating default "bridge" network: failed to parse pool request for
> address space "LocalDefault" pool "" subpool "100.64.0.0/26": Invalid
> Address SubPool

See #45356.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 2d31697)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-04-26 11:38:55 +02:00
Sebastiaan van Stijn
6f83b8c3f4
Merge pull request #45372 from thaJeztah/23.0_backport_really_deprecate_newclient
[23.0 backport] client: deprecate NewClient properly
2023-04-25 18:31:47 +02:00
Cory Snider
c82be35412
libnetwork: clean up inDelete network atomically
The (*network).ipamRelease function nils out the network's IPAM info
fields, putting the network struct into an inconsistent state. The
network-restore startup code panics if it tries to restore a network
from a struct which has fewer IPAM config entries than IPAM info
entries. Therefore (*network).delete contains a critical section: by
persisting the network to the store after ipamRelease(), the datastore
will contain an inconsistent network until the deletion operation
completes and finishes deleting the network from the datastore. If for
any reason the deletion operation is interrupted between ipamRelease()
and deleteFromStore(), the daemon will crash on startup when it tries to
restore the network.

Updating the datastore after releasing the network's IPAM pools may have
served a purpose in the past, when a global datastore was used for
intra-cluster communication and the IPAM allocator had persistent global
state, but nowadays there is no global datastore and the IPAM allocator
has no persistent state whatsoever. Remove the vestigial datastore
update as it is no longer necessary and only serves to cause problems.
If the network deletion is interrupted before the network is deleted
from the datastore, the deletion will resume during the next daemon
startup, including releasing the IPAM pools.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit c957ad0067)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:47:01 +02:00
Sebastiaan van Stijn
ccccb7a170
vendor: github.com/moby/swarmkit/v2 v2.0.0-20230315203717-e28e8ba9bc83
- CSI: Manager PublishVolume verify CSI node ID is not empty

full diff: a745a8755c...e28e8ba9bc

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 72dc7a0f7b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:42:24 +02:00
Brian Goff
8a6bec6e16
Silence GRPC logs unless our log level is debug
GRPC is logging a *lot* of garbage at info level.
This configures the GRPC logger such that it is only giving us logs when
at debug level and also adds a log field indicating where the logs are
coming from.

containerd is still currently spewing these same log messages and needs
a separate update.

Without this change `docker build` is extremely noisy in the daemon
logs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit c7ccc68b15)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:33:33 +02:00
Aneesh Kulkarni
844fd50c67
Added timeout to validate job in github actions
Signed-off-by: Aneesh Kulkarni <askthefactorcamera@gmail.com>
(cherry picked from commit e5dbd28afd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:29:21 +02:00
CrazyMax
8cec683574
Dockerfile: update xx to 1.2.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 106c694993)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:28:53 +02:00
Albin Kerouanton
7ff53c3c78
Update delve version
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 4f48a4ea2a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:28:27 +02:00
Paweł Gronowski
4d57ee692d
TestLogs: Increase stop check poll timeout on Windows
Stopping container on Windows can sometimes take longer than 10s which
caused this test to be flaky.
Increase the timeout to 75s when running this test on Windows.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 74dbb721aa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:26:59 +02:00
xin.li
838d5ea058
chore: use http constants to replace numbers
Signed-off-by: xin.li <xin.li@daocloud.io>
(cherry picked from commit a770153af0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:13:31 +02:00
Cory Snider
61d084593c
client: deprecate NewClient properly
The 'Deprecated:' line in NewClient's doc comment was not in a new
paragraph, so GoDoc, linters, and IDEs were unaware that it was
deprecated. The package documentation also continued to reference
NewClient. Update the doc comments to finish documenting that NewClient
is deprecated.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 6b9968e8b1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-21 12:05:15 +02:00
Sebastiaan van Stijn
8fdca288c5
Merge pull request #45350 from PettitWesley/awslogs-non-blocking-bug-23.0
[23.0 backport] awslogs: fix non-blocking log drop bug
2023-04-19 12:59:45 +02:00
Wesley Pettit
28b694d32d
awslogs: fix non-blocking log drop bug
Previously, the AWSLogs driver attempted to implement
non-blocking itself. Non-blocking is supposed to
implemented solely by the Docker RingBuffer that
wraps the log driver.

Please see issue and explanation here:
https://github.com/moby/moby/issues/45217

Signed-off-by: Wesley Pettit <wppttt@amazon.com>
(cherry picked from commit c8f8d11ac4)
2023-04-17 11:59:53 -07:00
Sebastiaan van Stijn
cbce331930
Merge pull request #45330 from kevingentile/buildkit-3770
[23.0] vendor: github.com/moby/buildkit v0.10.7-0.20230412161310-d52b2d584242
2023-04-14 02:59:18 +02:00
Bjorn Neergaard
5f684cb072
Merge pull request #45331 from thaJeztah/23.0_backport_rootless_script_bugs
[23.0 backport] Fix argument quoting bugs in dockerd-rootless.sh
2023-04-13 18:48:55 -06:00
kpcyrd
3731ce10d4
Fix argument quoting bugs in dockerd-rootless.sh
Signed-off-by: kpcyrd <git@rxv.cc>
(cherry picked from commit 7fe0f73838)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-14 01:26:56 +02:00
Kevin Gentile
23774ada04
vendor: github.com/moby/buildkit v0.10.7-0.20230412161310-d52b2d584242
Signed-off-by: Kevin Gentile <kevin.gentile@rockwellautomation.com>
2023-04-13 23:29:30 +02:00
Sebastiaan van Stijn
90e8a0bbf5
Merge pull request #45323 from thaJeztah/23.0_backport_vendor_sctp
[23.0 backport] vendor: github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2
2023-04-13 21:59:27 +02:00
Sebastiaan van Stijn
9277e64444
vendor: github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2
- Prevent from descriptor leak
- Fixes optlen in getsockopt() for s390x

full diff: 9a39160e90...7ff4192f6f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 893d28469f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-13 15:02:16 +02:00
Sebastiaan van Stijn
cdb6200887
Merge pull request #45293 from AkihiroSuda/backport-45283-23
[23.0 backport] docker-rootless-setuptools.sh: improve readability of messages
2023-04-12 20:30:21 +02:00
Akihiro Suda
09fbbd5677
docker-rootless-setuptools.sh: improve readability of messages
Before:
```console
$ docker-rootless-setuptool.sh install
...
[INFO] Use CLI context "rootless"
Current context is now "rootless"

[INFO] Make sure the following environment variables are set (or add them to ~/.bashrc):

export PATH=/usr/local/bin:$PATH
Some applications may require the following environment variable too:
export DOCKER_HOST=unix:///run/user/1001/docker.sock
```

After:
```console
$ docker-rootless-setuptool.sh install
...
[INFO] Using CLI context "rootless"
Current context is now "rootless"

[INFO] Make sure the following environment variable(s) are set (or add them to ~/.bashrc):
export PATH=/usr/local/bin:$PATH

[INFO] Some applications may require the following environment variable too:
export DOCKER_HOST=unix:///run/user/1001/docker.sock
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 4aa2876c75)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-04-07 10:08:16 +09:00
Sebastiaan van Stijn
4ca4705bf7
Merge pull request #45277 from thaJeztah/23.0_bump_go1.19.8
[23.0] update go to go1.19.8
2023-04-06 01:48:49 +02:00
Sebastiaan van Stijn
d3e52936c3
[23.0] update go to go1.19.8
go1.19.8 (released 2023-04-04) includes security fixes to the go/parser,
html/template, mime/multipart, net/http, and net/textproto packages, as well as
bug fixes to the linker, the runtime, and the time package. See the Go 1.19.8
milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.19.8+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.19.7...go1.19.8

Further details from the announcement on the mailing list:

We have just released Go versions 1.20.3 and 1.19.8, minor point releases.
These minor releases include 4 security fixes following the security policy:

- go/parser: infinite loop in parsing

  Calling any of the Parse functions on Go source code which contains `//line`
  directives with very large line numbers can cause an infinite loop due to
  integer overflow.
  Thanks to Philippe Antoine (Catena cyber) for reporting this issue.
  This is CVE-2023-24537 and Go issue https://go.dev/issue/59180.

- html/template: backticks not treated as string delimiters

  Templates did not properly consider backticks (`) as Javascript string
  delimiters, and as such did not escape them as expected. Backticks are
  used, since ES6, for JS template literals. If a template contained a Go
  template action within a Javascript template literal, the contents of the
  action could be used to terminate the literal, injecting arbitrary Javascript
  code into the Go template.

  As ES6 template literals are rather complex, and themselves can do string
  interpolation, we've decided to simply disallow Go template actions from being
  used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe
  way to allow this behavior. This takes the same approach as
  github.com/google/safehtml. Template.Parse will now return an Error when it
  encounters templates like this, with a currently unexported ErrorCode with a
  value of 12. This ErrorCode will be exported in the next major release.

  Users who rely on this behavior can re-enable it using the GODEBUG flag
  jstmpllitinterp=1, with the caveat that backticks will now be escaped. This
  should be used with caution.

  Thanks to Sohom Datta, Manipal Institute of Technology, for reporting this issue.

  This is CVE-2023-24538 and Go issue https://go.dev/issue/59234.

- net/http, net/textproto: denial of service from excessive memory allocation

  HTTP and MIME header parsing could allocate large amounts of memory, even when
  parsing small inputs.

  Certain unusual patterns of input data could cause the common function used to
  parse HTTP and MIME headers to allocate substantially more memory than
  required to hold the parsed headers. An attacker can exploit this behavior to
  cause an HTTP server to allocate large amounts of memory from a small request,
  potentially leading to memory exhaustion and a denial of service.
  Header parsing now correctly allocates only the memory required to hold parsed
  headers.

  Thanks to Jakob Ackermann (@das7pad) for discovering this issue.

  This is CVE-2023-24534 and Go issue https://go.dev/issue/58975.

- net/http, net/textproto, mime/multipart: denial of service from excessive resource consumption

  Multipart form parsing can consume large amounts of CPU and memory when
  processing form inputs containing very large numbers of parts. This stems from
  several causes:

  mime/multipart.Reader.ReadForm limits the total memory a parsed multipart form
  can consume. ReadForm could undercount the amount of memory consumed, leading
  it to accept larger inputs than intended. Limiting total memory does not
  account for increased pressure on the garbage collector from large numbers of
  small allocations in forms with many parts. ReadForm could allocate a large
  number of short-lived buffers, further increasing pressure on the garbage
  collector. The combination of these factors can permit an attacker to cause an
  program that parses multipart forms to consume large amounts of CPU and
  memory, potentially resulting in a denial of service. This affects programs
  that use mime/multipart.Reader.ReadForm, as well as form parsing in the
  net/http package with the Request methods FormFile, FormValue,
  ParseMultipartForm, and PostFormValue.

  ReadForm now does a better job of estimating the memory consumption of parsed
  forms, and performs many fewer short-lived allocations.

  In addition, mime/multipart.Reader now imposes the following limits on the
  size of parsed forms:

  Forms parsed with ReadForm may contain no more than 1000 parts. This limit may
  be adjusted with the environment variable GODEBUG=multipartmaxparts=. Form
  parts parsed with NextPart and NextRawPart may contain no more than 10,000
  header fields. In addition, forms parsed with ReadForm may contain no more
  than 10,000 header fields across all parts. This limit may be adjusted with
  the environment variable GODEBUG=multipartmaxheaders=.

  Thanks to Jakob Ackermann for discovering this issue.

  This is CVE-2023-24536 and Go issue https://go.dev/issue/59153.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-05 22:02:01 +02:00
Sebastiaan van Stijn
347bce43e9
Merge pull request #45279 from thaJeztah/23.0_fix_vendor
[23.0] fix vendor.mod: add hashicorp/go-multierror as direct dependency
2023-04-05 18:33:33 +02:00
Sebastiaan van Stijn
a0a597cbbe
[23.0] fix vendor.mod: add hashicorp/go-multierror as direct dependency
commit 59118bff50 made this a direct
dependency (previously it was indirect). That commit was part of an
advisory, and didn't run the vendor validation check because of that.

This patch fixes the vendor.mod to unblock CI in this branch.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-05 17:31:29 +02:00
Sebastiaan van Stijn
c9f6343c24
Merge pull request #45220 from vvoland/test-windows-execstartfails-23
[23.0 backport] integration-cli: Enable TestExecStartFails on Windows
2023-04-05 02:44:27 +02:00
Sebastiaan van Stijn
0ce1e22243
Merge pull request #45237 from thaJeztah/23.0_backport_update_runc_binary_1.1.5
[23.0 backport] update runc binary to v1.1.5
2023-04-05 02:44:15 +02:00
Sebastiaan van Stijn
3648a4915c
Merge pull request #45240 from akerouanton/cherrypick-45211
[23.0 backport] libnet/d/windows: log EnableInternalDNS val after setting it
2023-04-05 02:44:02 +02:00
Sebastiaan van Stijn
aaa102b30f
Merge pull request #45245 from thaJeztah/23.0_containerd_binary_1.6.20
[23.0] update containerd binary to v1.6.20
2023-04-05 02:43:49 +02:00
Sebastiaan van Stijn
15d6037c1e
Merge pull request #45246 from akerouanton/cherrypick-44827
[23.0 backport] daemon: let libnetwork assign default bridge IPAM
2023-04-05 02:42:50 +02:00
Sebastiaan van Stijn
59118bff50
Merge pull request from GHSA-232p-vwff-86mp
[23.0 backport] libnetwork: ensure encryption is mandatory on encrypted overlay networks
2023-04-04 20:03:51 +02:00
Cory Snider
063d3a6f1a
daemon: let libnetwork assign default bridge IPAM
The netutils.ElectInterfaceAddresses function is only used in one place
outside of tests: in the daemon, to configure the default bridge
network. The function is also messy to reason about as it references the
shared mutable state of ipamutils.PredefinedLocalScopeDefaultNetworks.
It uses the list of predefined default networks to always return an IPv4
address even if the named interface does not exist or does not have any
IPv4 addresses. This list happens to be the same as the one used to
initialize the address pool of the 'builtin' IPAM driver, though that is
far from obvious. (Start with "./libnetwork".initIPAMDrivers and trace
the dataflow of the addressPool value. Surprise! Global state is being
mutated using the value of other global mutable state.)

The daemon does not need the fallback behaviour of
ElectInterfaceAddresses. In fact, the daemon does not have to configure
an address pool for the network at all! libnetwork will acquire one of
the available address ranges from the network's IPAM driver when the
preferred-pool configuration is unset. It will do so using the same list
of address ranges and the exact same logic
(netutils.FindAvailableNetworks) as ElectInterfaceAddresses. So unless
the daemon needs to force the network to use a specific address range
because the bridge interface already exists, it can leave the details
up to libnetwork.

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit cc19eba)
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-03-31 09:38:21 +02:00
Sebastiaan van Stijn
389e18081d
update containerd binary to v1.6.20
Notable Updates

- Disable looking up usernames and groupnames on host
- Add support for Windows ArgsEscaped images
- Update hcsshim to v0.9.8
- Fix debug flag in shim
- Add WithReadonlyTempMount to support readonly temporary mounts
- Update ttrpc to fix file descriptor leak
- Update runc binary to v1.1.5
= Update image config to support ArgsEscaped

full diff: https://github.com/containerd/containerd/compare/v1.6.19...v1.6.20

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-31 00:48:19 +02:00