Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 0ce2031

Browse files
committed
bump golang 1.13.1 (CVE-2019-16276)
full diff: golang/go@go1.13...go1.13.1 ``` Hi gophers, We have just released Go 1.13.1 and Go 1.12.10 to address a recently reported security issue. We recommend that all affected users update to one of these releases (if you're not sure which, choose Go 1.13.1). net/http (through net/textproto) used to accept and normalize invalid HTTP/1.1 headers with a space before the colon, in violation of RFC 7230. If a Go server is used behind an uncommon reverse proxy that accepts and forwards but doesn't normalize such invalid headers, the reverse proxy and the server can interpret the headers differently. This can lead to filter bypasses or request smuggling, the latter if requests from separate clients are multiplexed onto the same upstream connection by the proxy. Such invalid headers are now rejected by Go servers, and passed without normalization to Go client applications. The issue is CVE-2019-16276 and Go issue golang.org/issue/34540. Thanks to Andrew Stucki, Adam Scarr (99designs.com), and Jan Masarik (masarik.sh) for discovering and reporting this issue. Downloads are available at https://golang.org/dl for all supported platforms. Alla prossima, Filippo on behalf of the Go team ``` From the patch: golang/go@6e6f4aa ``` net/textproto: don't normalize headers with spaces before the colon RFC 7230 is clear about headers with a space before the colon, like X-Answer : 42 being invalid, but we've been accepting and normalizing them for compatibility purposes since CL 5690059 in 2012. On the client side, this is harmless and indeed most browsers behave the same to this day. On the server side, this becomes a security issue when the behavior doesn't match that of a reverse proxy sitting in front of the server. For example, if a WAF accepts them without normalizing them, it might be possible to bypass its filters, because the Go server would interpret the header differently. Worse, if the reverse proxy coalesces requests onto a single HTTP/1.1 connection to a Go server, the understanding of the request boundaries can get out of sync between them, allowing an attacker to tack an arbitrary method and path onto a request by other clients, including authentication headers unknown to the attacker. This was recently presented at multiple security conferences: https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn net/http servers already reject header keys with invalid characters. Simply stop normalizing extra spaces in net/textproto, let it return them unchanged like it does for other invalid headers, and let net/http enforce RFC 7230, which is HTTP specific. This loses us normalization on the client side, but there's no right answer on the client side anyway, and hiding the issue sounds worse than letting the application decide. ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 8eb23cde95496c65efacdb6f854bfd819ecb31bc) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: f8d4276a89a8b978cb5c25c33ab22a62269375f1 Component: engine
1 parent 03ea689 commit 0ce2031

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

components/engine/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
ARG CROSS="false"
2828
# IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored
29-
ARG GO_VERSION=1.13.0
29+
ARG GO_VERSION=1.13.1
3030
ARG DEBIAN_FRONTEND=noninteractive
3131
ARG VPNKIT_DIGEST=e508a17cfacc8fd39261d5b4e397df2b953690da577e2c987a47630cd0c42f8e
3232

components/engine/Dockerfile.e2e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_VERSION=1.13.0
1+
ARG GO_VERSION=1.13.1
22

33
FROM golang:${GO_VERSION}-alpine AS base
44
ENV GO111MODULE=off

components/engine/Dockerfile.simple

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# This represents the bare minimum required to build and test Docker.
77

8-
ARG GO_VERSION=1.13.0
8+
ARG GO_VERSION=1.13.1
99

1010
FROM golang:${GO_VERSION}-stretch
1111
ENV GO111MODULE=off

components/engine/Dockerfile.windows

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ FROM microsoft/windowsservercore
165165
# Use PowerShell as the default shell
166166
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
167167

168-
ARG GO_VERSION=1.13.0
168+
ARG GO_VERSION=1.13.1
169169

170170
# Environment variable notes:
171171
# - GO_VERSION must be consistent with 'Dockerfile' used by Linux.

0 commit comments

Comments
 (0)