Skip to content

[19.03 backport] Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514) - #2044

Merged
andrewhsu merged 3 commits into
docker:19.03from
thaJeztah:19.03_backport_bump_golang_1.12.8
Aug 14, 2019
Merged

[19.03 backport] Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)#2044
andrewhsu merged 3 commits into
docker:19.03from
thaJeztah:19.03_backport_bump_golang_1.12.8

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

back ports of #2008 and #2043 for 19.03

go1.12.8 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.12.8 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.8

  • net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
    net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
    clients could be remotely made to allocate an unlimited amount of memory, until the program
    crashes. Servers will now close connections if the send queue accumulates too many control
    messages.
    The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
    Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
    This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
    net/url: parsing validation issue
  • url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
    suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
    in certain applications. Note that URLs with invalid, not numeric ports will now return an error
    from url.Parse.
    The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
    Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
    and reporting this issue.

This allows overriding the version of Go without making modifications in the
source code, which can be useful to test against multiple versions.
For example:
make GO_VERSION=1.13beta1 -f docker.Makefile binary
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0d3022c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
go1.12.8 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.12.8 milestone on our issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.12.8
- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
clients could be remotely made to allocate an unlimited amount of memory, until the program
crashes. Servers will now close connections if the send queue accumulates too many control
messages.
The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
in certain applications. Note that URLs with invalid, not numeric ports will now return an error
from url.Parse.
The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
and reporting this issue.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bbd179f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
MemberAuthor

waiting for Golang-cross image to become available on Docker Hub docker/golang-cross#36

For now, just verifying that an error is returned, but not checking the
error message itself, because those are not under our control, and may
change with different Go versions.
```
=== Failed
=== FAIL: opts TestParseDockerDaemonHost (0.00s)
hosts_test.go:87: tcp tcp:a.b.c.d address expected error "Invalid bind address format: tcp:a.b.c.d" return, got "parse tcp://tcp:a.b.c.d: invalid port \":a.b.c.d\" after host" and addr
hosts_test.go:87: tcp tcp:a.b.c.d/path address expected error "Invalid bind address format: tcp:a.b.c.d/path" return, got "parse tcp://tcp:a.b.c.d/path: invalid port \":a.b.c.d\" after host" and addr
=== FAIL: opts TestParseTCP (0.00s)
hosts_test.go:129: tcp tcp:a.b.c.d address expected error Invalid bind address format: tcp:a.b.c.d return, got parse tcp://tcp:a.b.c.d: invalid port ":a.b.c.d" after host and addr
hosts_test.go:129: tcp tcp:a.b.c.d/path address expected error Invalid bind address format: tcp:a.b.c.d/path return, got parse tcp://tcp:a.b.c.d/path: invalid port ":a.b.c.d" after host and addr
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit de1523d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2044 into 19.03 will decrease coverage by <.01%.
The diff coverage is n/a.

@@ Coverage Diff @@## 19.03 #2044 +/- ##
==========================================
- Coverage 56.75% 56.75% -0.01% 
==========================================
Files 311 311 Lines 21820 21820 ==========================================
- Hits 12385 12383 -2 - Misses 8521 8522 +1 - Partials 914 915 +1

@andrewhsuandrewhsu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andrewhsu
andrewhsu merged commit bf683df into docker:19.03Aug 14, 2019
@thaJeztah
thaJeztah deleted the 19.03_backport_bump_golang_1.12.8 branch August 14, 2019 18:57
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@thaJeztah@codecov-io@andrewhsu@GordonTheTurtle