Commit Graph

12056 Commits

Author SHA1 Message Date
Derek McGowan
a7fddb40bc
Use wait instead of a sleep to check for startup delay
Avoid using sleep as a way to measure whether gc has occurred.
Some systems may pause execution of the test and cause a failure if
the gc thread has not yet run after the sleep in the main thread.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-04-06 08:43:32 -07:00
Phil Estes
3c6ddee128
Merge pull request #8352 from thaJeztah/bump_go1.20.3
update go to go1.20.3, go1.19.8
2023-04-05 11:17:49 -04:00
Sebastiaan van Stijn
0fb2d91322
update go to go1.20.3, go1.19.8
go1.20.3 (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 compiler, the linker, the runtime, and the time package.
See the Go 1.20.3 milestone on our issue tracker for details:

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

full diff: https://github.com/golang/go/compare/go1.20.2...go1.20.3

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 16:03:25 +02:00
Akihiro Suda
a85af0f5ca
Merge pull request #8343 from AkihiroSuda/crun-1.8.3
CI: bump up crun to 1.8.3
2023-04-05 10:52:14 +09:00
Samuel Karp
cbb2d08af0
Merge pull request #8342 from davidhsingyuchen/exit-status-typo 2023-04-03 11:04:12 -07:00
Akihiro Suda
76690706f4
CI: bump up crun to 1.8.3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-04-03 14:30:15 +09:00
Hsing-Yu (David) Chen
157fe6a13a docs: fix typo in comment of ExitStatus.Exit(Code|Time)
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
2023-04-01 00:48:26 -07:00
Fu Wei
988ee8ffef
Merge pull request #8208 from Iceber/fix_runtime_path
fix the task setting the runtime path
2023-03-31 12:38:08 +08:00
Samuel Karp
8f756bc8c2
Merge pull request #8309 from vinayakankugoyal/fixresolv
Add noexec nodev and nosuid to sandbox /etc/resolv.conf mount bind.
2023-03-30 17:34:08 -07:00
Vinayak Goyal
ac84bf7c89 Update sbserver to add noexec nodev and nosuid to /etc/resolv.conf mount bind.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2023-03-30 21:54:21 +00:00
Akihiro Suda
812111eb08
Merge pull request #8327 from mxpv/linux-mounts
Keep linux mounts for linux sandboxes on Windows/Darwin
2023-03-30 17:21:21 +09:00
Maksym Pavlenko
126ab72fea Keep linux mounts for linux sandboxes on Windows/Darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-29 19:00:06 -07:00
Fu Wei
6682c63175
Merge pull request #8159 from mxpv/split
Initial split of sandboxed CRI service
2023-03-30 09:10:39 +08:00
Vinayak Goyal
990199a021 Test to ensure nosuid,nodev,noexec are set on /etc/reolv.conf mount.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2023-03-29 20:34:05 +00:00
Phil Estes
ca7be3e050
Merge pull request #8323 from AkihiroSuda/runc-1.1.5
update runc binary to v1.1.5
2023-03-29 10:54:41 -04:00
Akihiro Suda
96490734b7
update runc binary to v1.1.5
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-29 17:17:19 +09:00
Akihiro Suda
b55dad06aa
go.mod: github.com/opencontainers/runc v1.1.5
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-03-29 17:16:57 +09:00
Iceber Gu
c89438e834 integration: add container start test using abs runtime path
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-29 11:54:52 +08:00
Maksym Pavlenko
3557ac884b Extract image service from CRI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-28 20:37:26 -07:00
Iceber Gu
97064b0772 WithRuntimePath uses the TaskInfo.RuntimePath field
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-29 11:34:50 +08:00
Fu Wei
831b9a9ae8
Merge pull request #8278 from Iceber/cleanup_protobuild_config 2023-03-29 07:09:33 +08:00
Maksym Pavlenko
a47ac4a352
Merge pull request #8295 from samruddhikhandale/samruddhikhandale/add-dev-container
Adds dev container config and updates docs with Codespaces information
2023-03-28 12:18:16 -07:00
Phil Estes
662ff50b73
Merge pull request #8313 from mxpv/atomic
Use atomic.Bool from stdlib (and remove pkg/atomic)
2023-03-28 13:41:49 -04:00
Maksym Pavlenko
a6ac62f02e
Merge pull request #8315 from cpuguy83/devmapper_plugin_skip
devmapper plugin: skip plugin when not configured
2023-03-28 09:36:36 -07:00
Brian Goff
c56f54aa1e devmapper plugin: skip plugin when not configured
This is not really an error in most cases as most people do not use
devmapper, however this shows up as an error in the logs and in the
plugin service when querying the plugins.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-03-28 00:00:55 +00:00
Maksym Pavlenko
4a00e06034
Merge pull request #8312 from mxpv/oci
Defer uid lookups on Darwin
2023-03-27 15:34:32 -07:00
Maksym Pavlenko
a11e47b48c Use built in atomic.Bool
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-27 12:08:06 -07:00
Maksym Pavlenko
87346df54f Defer uid lookups on Darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-03-27 10:24:01 -07:00
Vinayak Goyal
ae4dbb60d5 Add noexec nodev and nosuid to sandbox /etc/resolv.conf mount bind.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2023-03-24 21:56:53 +00:00
Fu Wei
f7f2be7321
Merge pull request #8302 from Iceber/fix_ctr_task_metrics
ctr/tasks: fix unmarshal the task metrics for cgroup v1
2023-03-24 20:26:05 +08:00
Iceber Gu
1be08b10f7 ctr/tasks: fix unmarshal the task metrics for cgroups v1
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-23 14:42:24 +08:00
Samruddhi Khandale
8322bcb881 Adds a file header
Signed-off-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-03-22 19:31:15 +00:00
Samruddhi Khandale
50b576a94e Adds a dev container and Codespaces docs
Signed-off-by: Samruddhi Khandale <samruddhikhandale@github.com>
2023-03-22 19:28:44 +00:00
Iceber Gu
0bbca7f1bc Cleanup protobuild config
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-22 13:28:41 +08:00
Fu Wei
584d13d5cb
Merge pull request #8276 from Iceber/remove_cri_v1alpha2
Remove CRI v1alpha2 [deprecated since v1.7]
2023-03-22 13:25:07 +08:00
Phil Estes
3a1047319f
Merge pull request #8279 from Iceber/remove_criu_path
Remove the CriuPath field from runc's options
2023-03-20 14:50:33 -04:00
Derek McGowan
e2cb6b82d1
Merge pull request #8259 from laurazard/readonly-overlay
Add `ReadonlyMounts` to make overlay mounts readonly
2023-03-17 22:34:38 -07:00
Laura Brehm
daa3a7665e
Add WithReadonlyTempMount to create readonly temporary mounts
This is necessary so we can mount snapshots more than once with overlayfs,
otherwise mounts enter an unknown state.

related: https://github.com/moby/buildkit/pull/1100

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
Co-authored-by: Zou Nengren <zouyee1989@gmail.com>
2023-03-17 15:51:18 +00:00
Maksym Pavlenko
63e45eb5d8
Merge pull request #8281 from hach-que/patch-1
fix: 'failed to resolve symlink' error messaging
2023-03-16 15:23:19 -07:00
June Rhodes
f48ae22273
fix: Update error message format based on feedback
Signed-off-by: June Rhodes <504826+hach-que@users.noreply.github.com>
2023-03-17 06:49:12 +11:00
June Rhodes
3193650f13
fix: 'failed to resolve symlink' error messaging
This error message currently does not provide useful information, because the `src` value that is interleaved will have been overridden by the call to `osi.ResolveSymbolicLink`. This stores the original `src` before the `osi.ResolveSymbolicLink` call so the error message can be useful.

Signed-off-by: June Rhodes <504826+hach-que@users.noreply.github.com>
2023-03-17 05:12:43 +11:00
Fu Wei
e208c24256
Merge pull request #8175 from Iceber/fix_cni_metadata
adding cni metadata to the container in the `ctr run --config`
2023-03-16 23:29:48 +08:00
Iceber Gu
14714b94de Fold the output of crictl info
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 19:50:59 +08:00
Iceber Gu
5fdca538d0 adding cni metadata to the container in the ctr run --config
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 18:01:53 +08:00
Iceber Gu
32d431a7cb Update crictl doc
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:49:14 +08:00
Iceber Gu
690ae58ca7 Update cri-tools version on windows
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:48:53 +08:00
Iceber Gu
5956cdea87 Remove third-party package cri-api
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:48:53 +08:00
Iceber Gu
c011502bd1 Remove cri v1alpha1 services
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:48:49 +08:00
Iceber Gu
23d288a809 Remove the CriuPath field from runc's options
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2023-03-16 17:12:51 +08:00
Fu Wei
732d184cbb
Merge pull request #8275 from AkihiroSuda/remove-config-v1
Remove support for config.toml `version = 1`
2023-03-16 17:12:08 +08:00