Skip to content

Commit

Permalink
[release/1.6] update to go1.18.9
Browse files Browse the repository at this point in the history
Includes security fixes for net/http (CVE-2022-41717, CVE-2022-41720),
and os (CVE-2022-41720).

These minor releases include 2 security fixes following the security policy:

- os, net/http: avoid escapes from os.DirFS and http.Dir on Windows

  The os.DirFS function and http.Dir type provide access to a tree of files
  rooted at a given directory. These functions permitted access to Windows
  device files under that root. For example, os.DirFS("C:/tmp").Open("COM1")
  would open the COM1 device.
  Both os.DirFS and http.Dir only provide read-only filesystem access.

  In addition, on Windows, an os.DirFS for the directory \(the root of the
  current drive) can permit a maliciously crafted path to escape from the
  drive and access any path on the system.

  The behavior of os.DirFS("") has changed. Previously, an empty root was
  treated equivalently to "/", so os.DirFS("").Open("tmp") would open the
  path "/tmp". This now returns an error.

  This is CVE-2022-41720 and Go issue https://go.dev/issue/56694.

- net/http: limit canonical header cache by bytes, not entries

  An attacker can cause excessive memory growth in a Go server accepting
  HTTP/2 requests.

  HTTP/2 server connections contain a cache of HTTP header keys sent by
  the client. While the total number of entries in this cache is capped,
  an attacker sending very large keys can cause the server to allocate
  approximately 64 MiB per open connection.

  This issue is also fixed in golang.org/x/net/http2 vX.Y.Z, for users
  manually configuring HTTP/2.

  Thanks to Josselin Costanzi for reporting this issue.

  This is CVE-2022-41717 and Go issue https://go.dev/issue/56350.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.18.9

And the milestone on the issue tracker:
https://github.com/golang/go/issues?q=milestone%3AGo1.18.9+label%3ACherryPickApproved

Full diff: golang/go@go1.18.8...go1.18.9

The golang.org/x/net fix is in golang/net@1e63c2f

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Dec 6, 2022
1 parent d986545 commit 9743dba
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-images.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
go-version: [1.18.8]
go-version: [1.18.9]
os: [ubuntu-18.04, macos-12, windows-2019]

steps:
Expand All @@ -46,7 +46,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'
- uses: actions/checkout@v2
- run: go install github.com/cpuguy83/go-md2man/v2@v2.0.1
- run: make man
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'
- uses: actions/checkout@v2
- run: |
set -e -x
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-18.04, macos-12, windows-2019, windows-2022]
go-version: ['1.17.13', '1.18.8']
go-version: ['1.17.13', '1.18.9']

steps:
- uses: actions/setup-go@v2
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -352,7 +352,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2

Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'
- uses: actions/checkout@v2
- run: sudo -E PATH=$PATH script/setup/install-gotestsum
- name: Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: 1.18.8
go-version: 1.18.9

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/images.yml
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.18.8'
go-version: '1.18.9'

- uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -111,7 +111,7 @@ jobs:
find ./releases/ -maxdepth 1 -type l | xargs rm
working-directory: src/github.com/containerd/containerd
env:
GO_VERSION: '1.18.8'
GO_VERSION: '1.18.9'
PLATFORM: ${{ matrix.platform }}
- name: Save Artifacts
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Expand Up @@ -91,7 +91,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.8",
'GO_VERSION': ENV['GO_VERSION'] || "1.18.9",
}
sh.inline = <<~SHELL
#!/usr/bin/env bash
Expand Down
2 changes: 1 addition & 1 deletion contrib/Dockerfile.test
Expand Up @@ -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.8
ARG GOLANG_VERSION=1.18.9
ARG GOLANG_IMAGE=golang

FROM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS golang
Expand Down
2 changes: 1 addition & 1 deletion script/setup/prepare_env_windows.ps1
@@ -1,6 +1,6 @@
# Prepare windows environment for building and running containerd tests

$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.18.8"; make = ""; nssm = "" }
$PACKAGES= @{ mingw = "10.2.0"; git = ""; golang = "1.18.9"; make = ""; nssm = "" }

Write-Host "Downloading chocolatey package"
curl.exe -L "https://packages.chocolatey.org/chocolatey.0.10.15.nupkg" -o 'c:\choco.zip'
Expand Down

0 comments on commit 9743dba

Please sign in to comment.