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@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-07-13 11:48:54 +02:00
parent ff91434af1
commit 4ffef752d0
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
13 changed files with 24 additions and 24 deletions

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

2
Vagrantfile vendored
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'