From 4ffef752d0bb5b41488848d617c21759fd29b31e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 13 Jul 2022 11:48:54 +0200 Subject: [PATCH] update golang to 1.18.4, 1.17.12 go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip, encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath packages, as well as bug fixes to the compiler, the go command, the linker, the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the issue tracker for details: https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved This update addresses: CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631, CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148. Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4 From the security announcement; https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These minor releases include 9 security fixes following the security policy: - net/http: improper sanitization of Transfer-Encoding header The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating a "chunked" encoding. This could potentially allow for request smuggling, but only if combined with an intermediate server that also improperly failed to reject the header as invalid. This is CVE-2022-1705 and https://go.dev/issue/53188. - When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map containing a nil value for the X-Forwarded-For header, ReverseProxy would set the client IP as the value of the X-Forwarded-For header, contrary to its documentation. In the more usual case where a Director function set the X-Forwarded-For header value to nil, ReverseProxy would leave the header unmodified as expected. This is https://go.dev/issue/53423 and CVE-2022-32148. Thanks to Christian Mehlmauer for reporting this issue. - compress/gzip: stack exhaustion in Reader.Read Calling Reader.Read on an archive containing a large number of concatenated 0-length compressed files can cause a panic due to stack exhaustion. This is CVE-2022-30631 and Go issue https://go.dev/issue/53168. - encoding/xml: stack exhaustion in Unmarshal Calling Unmarshal on a XML document into a Go struct which has a nested field that uses the any field tag can cause a panic due to stack exhaustion. This is CVE-2022-30633 and Go issue https://go.dev/issue/53611. - encoding/xml: stack exhaustion in Decoder.Skip Calling Decoder.Skip when parsing a deeply nested XML document can cause a panic due to stack exhaustion. The Go Security team discovered this issue, and it was independently reported by Juho Nurminen of Mattermost. This is CVE-2022-28131 and Go issue https://go.dev/issue/53614. - encoding/gob: stack exhaustion in Decoder.Decode Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion. This is CVE-2022-30635 and Go issue https://go.dev/issue/53615. - path/filepath: stack exhaustion in Glob Calling Glob on a path which contains a large number of path separators can cause a panic due to stack exhaustion. Thanks to Juho Nurminen of Mattermost for reporting this issue. This is CVE-2022-30632 and Go issue https://go.dev/issue/53416. - io/fs: stack exhaustion in Glob Calling Glob on a path which contains a large number of path separators can cause a panic due to stack exhaustion. This is CVE-2022-30630 and Go issue https://go.dev/issue/53415. - go/parser: stack exhaustion in all Parse* functions Calling any of the Parse functions on Go source code which contains deeply nested types or declarations can cause a panic due to stack exhaustion. Thanks to Juho Nurminen of Mattermost for reporting this issue. This is CVE-2022-1962 and Go issue https://go.dev/issue/53616. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/build-test-images.yml | 2 +- .github/workflows/ci.yml | 18 +++++++++--------- .github/workflows/codeql.yml | 2 +- .github/workflows/images.yml | 2 +- .github/workflows/nightly.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .../containerd-build/integration-test.yaml | 2 +- .zuul/playbooks/containerd-build/run.yaml | 2 +- .../playbooks/containerd-build/unit-test.yaml | 2 +- Vagrantfile | 2 +- contrib/Dockerfile.test | 2 +- contrib/fuzz/oss_fuzz_build.sh | 4 ++-- script/setup/prepare_env_windows.ps1 | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-test-images.yml b/.github/workflows/build-test-images.yml index fa41b3508..3ecf30758 100644 --- a/.github/workflows/build-test-images.yml +++ b/.github/workflows/build-test-images.yml @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189afaf22..966a16dca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - go-version: [1.18.3] + go-version: [1.18.4] os: [ubuntu-18.04, macos-10.15, windows-2019] steps: @@ -46,7 +46,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: @@ -78,7 +78,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: @@ -110,7 +110,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 - run: go install github.com/cpuguy83/go-md2man/v2@v2.0.1 - run: make man @@ -148,7 +148,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 - run: | set -e -x @@ -215,7 +215,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, macos-10.15, windows-2019, windows-2022] - go-version: ['1.17.11', '1.18.3'] + go-version: ['1.17.12', '1.18.4'] steps: - uses: actions/setup-go@v2 with: @@ -261,7 +261,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: @@ -397,7 +397,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 @@ -516,7 +516,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 - run: sudo -E PATH=$PATH script/setup/install-gotestsum - name: Tests diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index aaeb38128..5e9f3a76a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: 1.18.3 + go-version: 1.18.4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 1ca92baf0..688bd89bd 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6577d40ad..c81053c4f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: @@ -155,7 +155,7 @@ jobs: steps: - uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - uses: actions/checkout@v2 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b77e01b0..9afcefadd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,7 @@ jobs: - name: Install Go uses: actions/setup-go@v2 with: - go-version: '1.18.3' + go-version: '1.18.4' - name: Set env shell: bash env: @@ -109,7 +109,7 @@ jobs: find ./releases/ -maxdepth 1 -type l | xargs rm working-directory: src/github.com/containerd/containerd env: - GO_VERSION: '1.18.3' + GO_VERSION: '1.18.4' PLATFORM: ${{ matrix.platform }} - name: Save Artifacts uses: actions/upload-artifact@v2 diff --git a/.zuul/playbooks/containerd-build/integration-test.yaml b/.zuul/playbooks/containerd-build/integration-test.yaml index dc983f3d2..df2839b8b 100644 --- a/.zuul/playbooks/containerd-build/integration-test.yaml +++ b/.zuul/playbooks/containerd-build/integration-test.yaml @@ -2,7 +2,7 @@ become: yes roles: - role: config-golang - go_version: '1.18.3' + go_version: '1.18.4' arch: arm64 tasks: - name: Install pre-requisites diff --git a/.zuul/playbooks/containerd-build/run.yaml b/.zuul/playbooks/containerd-build/run.yaml index 5a7229ed2..7e097c184 100644 --- a/.zuul/playbooks/containerd-build/run.yaml +++ b/.zuul/playbooks/containerd-build/run.yaml @@ -2,7 +2,7 @@ become: yes roles: - role: config-golang - go_version: '1.18.3' + go_version: '1.18.4' arch: arm64 tasks: - name: Build containerd diff --git a/.zuul/playbooks/containerd-build/unit-test.yaml b/.zuul/playbooks/containerd-build/unit-test.yaml index e42f1e85d..f96b8869d 100644 --- a/.zuul/playbooks/containerd-build/unit-test.yaml +++ b/.zuul/playbooks/containerd-build/unit-test.yaml @@ -2,7 +2,7 @@ become: yes roles: - role: config-golang - go_version: '1.18.3' + go_version: '1.18.4' arch: arm64 tasks: - name: Build and test containerd diff --git a/Vagrantfile b/Vagrantfile index 73b7fb76b..f61f5a5bd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -97,7 +97,7 @@ EOF config.vm.provision "install-golang", type: "shell", run: "once" do |sh| sh.upload_path = "/tmp/vagrant-install-golang" sh.env = { - 'GO_VERSION': ENV['GO_VERSION'] || "1.18.3", + 'GO_VERSION': ENV['GO_VERSION'] || "1.18.4", } sh.inline = <<~SHELL #!/usr/bin/env bash diff --git a/contrib/Dockerfile.test b/contrib/Dockerfile.test index 5d8c8b780..b030cb020 100644 --- a/contrib/Dockerfile.test +++ b/contrib/Dockerfile.test @@ -10,7 +10,7 @@ # # docker build -t containerd-test --build-arg RUNC_VERSION=v1.0.0-rc94 -f Dockerfile.test ../ -ARG GOLANG_VERSION=1.18.3 +ARG GOLANG_VERSION=1.18.4 ARG GOLANG_IMAGE=golang FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang diff --git a/contrib/fuzz/oss_fuzz_build.sh b/contrib/fuzz/oss_fuzz_build.sh index 63c7e49ca..57c9b6e40 100755 --- a/contrib/fuzz/oss_fuzz_build.sh +++ b/contrib/fuzz/oss_fuzz_build.sh @@ -40,11 +40,11 @@ compile_fuzzers() { apt-get update && apt-get install -y wget cd $SRC -wget --quiet https://go.dev/dl/go1.18.3.linux-amd64.tar.gz +wget --quiet https://go.dev/dl/go1.18.4.linux-amd64.tar.gz mkdir temp-go rm -rf /root/.go/* -tar -C temp-go/ -xzf go1.18.3.linux-amd64.tar.gz +tar -C temp-go/ -xzf go1.18.4.linux-amd64.tar.gz mv temp-go/go/* /root/.go/ cd $SRC/containerd diff --git a/script/setup/prepare_env_windows.ps1 b/script/setup/prepare_env_windows.ps1 index 74623e556..548337d05 100644 --- a/script/setup/prepare_env_windows.ps1 +++ b/script/setup/prepare_env_windows.ps1 @@ -5,7 +5,7 @@ # lived test environment. Set-MpPreference -DisableRealtimeMonitoring:$true -$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.18.3"; make = ""; nssm = "" } +$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.18.4"; make = ""; nssm = "" } Write-Host "Downloading chocolatey package" curl.exe -L "https://packages.chocolatey.org/chocolatey.0.10.15.nupkg" -o 'c:\choco.zip'