Commit graph

200 commits

Author SHA1 Message Date
bsiegert
8638a196c5 Update go115 to 1.15.5 (security fix).
- math/big: panic during recursive division of very large numbers

A number of math/big.Int <https://pkg.go.dev/math/big#Int> methods (Div,
Exp, DivMod, Quo, Rem, QuoRem, Mod, ModInverse, ModSqrt, Jacobi, and GCD)
can panic when provided crafted large inputs. For the panic to happen, the
divisor or modulo argument must be larger than 3168 bits (on 32-bit
architectures) or 6336 bits (on 64-bit architectures). Multiple math/big.Rat
<https://pkg.go.dev/math/big#Rat> methods are similarly affected.

crypto/rsa.VerifyPSS <https://pkg.go.dev/crypto/rsa#VerifyPSS>,
crypto/rsa.VerifyPKCS1v15 <https://pkg.go.dev/crypto/rsa#VerifyPKCS1v15>,
and crypto/dsa.Verify <https://pkg.go.dev/crypto/dsa#Verify> may panic when
provided crafted public keys and signatures. crypto/ecdsa and
crypto/elliptic operations may only be affected if custom CurveParams
<https://pkg.go.dev/crypto/elliptic#CurveParams> with unusually large field
sizes (several times larger than the largest supported curve, P-521) are in
use. Using crypto/x509.Verify on a crafted X.509 certificate chain can lead
to a panic, even if the certificates don’t chain to a trusted root. The
chain can be delivered via a crypto/tls connection to a client, or to a
server that accepts and verifies client certificates. net/http clients can
be made to crash by an HTTPS server, while net/http servers that accept
client certificates will recover the panic and are unaffected.

Moreover, an application might crash invoking
crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate
request or during a golang.org/x/crypto/otr conversation. Parsing a
golang.org/x/crypto/openpgp Entity or verifying a signature may crash.
Finally, a golang.org/x/crypto/ssh client can panic due to a malformed host
key, while a server could panic if either PublicKeyCallback accepts a
malformed public key, or if IsUserAuthority accepts a certificate with a
malformed public key.

This issue is CVE-2020-28362 and Go issue golang.org/issue/42552.


   - cmd/go: arbitrary code execution at build time through cgo

The go command may execute arbitrary code at build time when cgo is in use.
This may occur when running go get on a malicious package, or any other
command that builds untrusted code.

This can be caused by malicious gcc flags specified via a #cgo directive,
or by a malicious symbol name in a linked object file.

These issues are CVE-2020-28367 and CVE-2020-28366, and Go issues
golang.org/issue/42556 and golang.org/issue/42559 respectively.
2020-11-13 18:45:50 +00:00
bsiegert
35f78529e9 Update go114 to 1.14.12 (security fix).
- math/big: panic during recursive division of very large numbers

A number of math/big.Int methods (Div, Exp, DivMod, Quo, Rem, QuoRem, Mod,
ModInverse, ModSqrt, Jacobi, and GCD) can panic when provided crafted large
inputs. For the panic to happen, the divisor or modulo argument must be larger
than 3168 bits (on 32-bit architectures) or 6336 bits (on 64-bit
architectures). Multiple math/big.Rat <https://pkg.go.dev/math/big#Rat> methods
are similarly affected.

crypto/rsa.VerifyPSS <https://pkg.go.dev/crypto/rsa#VerifyPSS>,
crypto/rsa.VerifyPKCS1v15 <https://pkg.go.dev/crypto/rsa#VerifyPKCS1v15>,
and crypto/dsa.Verify <https://pkg.go.dev/crypto/dsa#Verify> may panic when
provided crafted public keys and signatures. crypto/ecdsa and
crypto/elliptic operations may only be affected if custom CurveParams
<https://pkg.go.dev/crypto/elliptic#CurveParams> with unusually large field
sizes (several times larger than the largest supported curve, P-521) are in
use. Using crypto/x509.Verify on a crafted X.509 certificate chain can lead
to a panic, even if the certificates don’t chain to a trusted root. The
chain can be delivered via a crypto/tls connection to a client, or to a
server that accepts and verifies client certificates. net/http clients can
be made to crash by an HTTPS server, while net/http servers that accept
client certificates will recover the panic and are unaffected.

Moreover, an application might crash invoking
crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate
request or during a golang.org/x/crypto/otr conversation. Parsing a
golang.org/x/crypto/openpgp Entity or verifying a signature may crash.
Finally, a golang.org/x/crypto/ssh client can panic due to a malformed host
key, while a server could panic if either PublicKeyCallback accepts a
malformed public key, or if IsUserAuthority accepts a certificate with a
malformed public key.

Thanks to the Go Ethereum team and the OSS-Fuzz project for reporting this.
Thanks to Rémy Oudompheng and Robert Griesemer for their help developing
and validating the fix.

This issue is CVE-2020-28362 and Go issue golang.org/issue/42552.


   - cmd/go: arbitrary code execution at build time through cgo

The go command may execute arbitrary code at build time when cgo is in use.
This may occur when running go get on a malicious package, or any other
command that builds untrusted code.

This can be caused by malicious gcc flags specified via a #cgo directive,
or by a malicious symbol name in a linked object file.

These issues are CVE-2020-28367 and CVE-2020-28366, and Go issues
golang.org/issue/42556 and golang.org/issue/42559 respectively.
2020-11-13 18:27:35 +00:00
bsiegert
722d96fb40 Update go115 to 1.15.4
go1.15.4 (released 2020/11/05) includes fixes to cgo, the compiler, linker,
runtime, and the compress/flate, net/http, reflect, and time packages. See the
Go 1.15.4 milestone on our issue tracker for details.
2020-11-08 20:38:09 +00:00
bsiegert
49628a9c11 Update go114 to 1.14.11
go1.14.11 (released 2020/11/05) includes fixes to the runtime, and the net/http
and time packages. See the Go 1.14.11 milestone on our issue tracker for
details.
2020-11-08 20:12:31 +00:00
tnn
75e18b1abb go-module.mk: "make show-go-modules" now prints an rcs id preamble
So that one can do "make show-go-modules > go-modules.mk"
2020-11-03 18:44:13 +00:00
bsiegert
b83c9938d4 Update go115 to 1.15.3.
go1.15.2 (released 2020/09/09) includes fixes to the compiler, runtime,
documentation, the go command, and the net/mail, os, sync, and testing
packages. See the Go 1.15.2 milestone on our issue tracker for details.

go1.15.3 (released 2020/10/14) includes fixes to cgo, the compiler, runtime,
the go command, and the bytes, plugin, and testing packages. See the Go 1.15.3
milestone on our issue tracker for details.
2020-10-15 12:43:33 +00:00
bsiegert
5fc5704b92 Update go114 to 1.14.10.
go1.14.9 (released 2020/09/09) includes fixes to the compiler, linker, runtime,
documentation, and the net/http and testing packages. See the Go 1.14.9
milestone on our issue tracker for details.

go1.14.10 (released 2020/10/14) includes fixes to the compiler, runtime, and
the plugin and testing packages. See the Go 1.14.10 milestone on our issue
tracker for details.
2020-10-15 12:01:14 +00:00
bsiegert
2e91bccf85 Update go114 to 1.14.8.
go1.14.8 (released 2020/09/01) includes security fixes to the net/http/cgi and
net/http/fcgi packages. See the Go 1.14.8 milestone on our issue tracker for
details.
2020-09-03 07:03:26 +00:00
bsiegert
fa19a36bd6 Update go115 to 1.15.1.
go1.15.1 (released 2020/09/01) includes security fixes to the net/http/cgi and
net/http/fcgi packages. See the Go 1.15.1 milestone on our issue tracker for
details.
2020-09-03 06:47:21 +00:00
tnn
90bf64f225 go/go-module.mk: sort show-go-modules output 2020-08-30 11:52:19 +00:00
tnn
6863038df6 go-vars.mk: set RELRO_SUPPORTED=no here
So we don't have to set CHECK_RELRO_SKIP in every go package.
It's a property of golang and may get fixed some day.
2020-08-30 05:52:10 +00:00
bsiegert
f7530abcd6 Add a package for Go 1.15.
The latest Go release, version 1.15, arrives six months after Go 1.14. Most of
its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 promise of compatibility. We expect
almost all Go programs to continue to compile and run as before.

Go 1.15 includes substantial improvements to the linker, improves allocation
for small objects at high core counts, and deprecates X.509 CommonName. GOPROXY
now supports skipping proxies that return errors and a new embedded tzdata
package has been added.

There are no changes to the language.
2020-08-21 19:50:22 +00:00
tnn
6b2259e0c9 go-module.mk: fix permission denied as non-root when running "make clean" 2020-08-20 06:50:49 +00:00
bsiegert
81f069fedc Update go114 to 1.14.7.
go1.14.7 (released 2020/08/06) includes security fixes to the encoding/binary
package. See the Go 1.14.7 milestone on our issue tracker for details.
2020-08-14 18:45:56 +00:00
bsiegert
f04da0ad99 Update go113 to 1.13.15.
go1.13.15 (released 2020/08/06) includes security fixes to the encoding/binary
package. See the Go 1.13.15 milestone on our issue tracker for details.
2020-08-14 18:28:29 +00:00
bsiegert
20c55b0cbb Update go114 to 1.14.6.
go1.14.5 (released 2020/07/14) includes security fixes to the crypto/x509 and
net/http packages. See the Go 1.14.5 milestone on our issue tracker for
details.

go1.14.6 (released 2020/07/16) includes fixes to the go command, the compiler,
the linker, vet, and the database/sql, encoding/json, net/http, reflect, and
testing packages. See the Go 1.14.6 milestone on our issue tracker for details.
2020-07-17 17:20:05 +00:00
bsiegert
21b0aca1e9 Update go113 to 1.13.14.
go1.13.12 (released 2020/06/01) includes fixes to the runtime, and the go/types
and math/big packages. See the Go 1.13.12 milestone on our issue tracker for
details.

go1.13.13 (released 2020/07/14) includes security fixes to the crypto/x509 and
net/http packages. See the Go 1.13.13 milestone on our issue tracker for details.

go1.13.14 (released 2020/07/16) includes fixes to the compiler, vet, and the
database/sql, net/http, and reflect packages. See the Go 1.13.14 milestone
on our issue tracker for details.
2020-07-17 17:10:20 +00:00
bsiegert
dbb9abc36a go-module.mk: Run "go mod download" to prime the module cache.
This was suggested by Russ Cox, instead of "go get".
2020-07-17 16:23:21 +00:00
bsiegert
f3534cc29b Update go114 to 1.14.4.
go1.14.3 (released 2020/05/14) includes fixes to cgo, the compiler, the
runtime, and the go/doc and math/big packages. See the Go 1.14.3
milestone on our issue tracker for details.

go1.14.4 (released 2020/06/01) includes fixes to the go doc command, the
runtime, and the encoding/json and os packages. See the Go 1.14.4
milestone on our issue tracker for details.
2020-06-17 09:37:25 +00:00
bsiegert
1dbd3939f0 Update go113 to 1.13.11.
go1.13.11 (released 2020/05/14) includes fixes to the compiler. See the Go
1.13.11 milestone on our issue tracker for details.
2020-05-16 08:33:07 +00:00
tnn
1827855b6e go/bootstrap.mk: depend on lang/go-bin on {Linux,NetBSD}-*-aarch64 2020-05-02 20:12:34 +00:00
tnn
7b83f45fa4 go/bootstrap.mk: add manual user instructions for aarch64 bootstrap
In lieu of something better, like lang/go14 aarch64 support ...
2020-05-01 16:55:28 +00:00
tnn
d76bc0bc56 go/version.mk: now supports aarch64 2020-05-01 16:39:59 +00:00
tnn
71a42ac05e go/bootstrap.mk: allow user to set GOROOT_BOOTSTRAP in mk.conf 2020-05-01 14:39:37 +00:00
tnn
a273b4913a go*: move definition of GOROOT_BOOTSTRAP to go/bootstrap.mk.
NFC. But will later need to do something else when MACHINE_ARCH == aarch64.
Also drop dup include of bsd.prefs.mk. go/version.mk does this already.
2020-05-01 14:09:14 +00:00
bsiegert
72cef9211c Add support for building Go modules in pkgsrc.
This is for packages containing a "go.mod" file.
2020-04-12 11:12:34 +00:00
bsiegert
be160551f1 Update go113 to 1.13.10.
go1.13.10 (released 2020/04/08) includes fixes to the go command, the
runtime, os/exec, and time packages. See the Go 1.13.10 milestone on our
issue tracker for details.
2020-04-12 11:09:03 +00:00
bsiegert
45a8e84ef3 Set 1.14 as default Go version.
1.14.2 is good now :)
2020-04-12 09:41:18 +00:00
bsiegert
c783c2d5c5 Update go114 to 1.14.2.
go1.14.2 (released 2020/04/08) includes fixes to cgo, the go command, the
runtime, os/exec, and testing packages. See the Go 1.14.2 milestone on our
issue tracker for details.

From what I know from work, 1.14.1 had a nasty runtime bug that is now
fixed.
2020-04-09 13:28:38 +00:00
joerg
818d6be53f Support UNLIMIT_RESOURCES for go packages. 2020-03-30 19:33:13 +00:00
bsiegert
b3983183e2 Update go113 to 1.13.9.
This release includes fixes to the go command, tools, the runtime,
the toolchain, and to the crypto/cypher package.

View the release notes for more information:
    https://golang.org/doc/devel/release.html#go1.13.minor
2020-03-21 16:51:10 +00:00
bsiegert
bcffb9e579 Remove GO112_VERSION and GO111_VERSION. 2020-03-21 10:07:48 +00:00
bsiegert
922378ae3c Update go114 to 1.14.1.
This release include fixes to the go command, tools, the runtime,
the toolchain, and to the crypto/cypher package.

View the release notes for more information:
    https://golang.org/doc/devel/release.html#go1.14.minor
2020-03-20 19:50:48 +00:00
bsiegert
36f1aeda20 Update go113 to 1.13.8.
This release includes fixes to the runtime, the crypto/x509, and
net/http packages.
2020-02-27 16:34:31 +00:00
bsiegert
f28e925357 Add a package for Go 1.14.
The default will remain at 1.13 for the next branch.

The latest Go release, version 1.14, arrives six months after Go 1.13. Most of
its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 promise of compatibility. We expect
almost all Go programs to continue to compile and run as before.

See the release notes at https://golang.org/doc/go1.14.
2020-02-27 14:32:57 +00:00
bsiegert
a876136634 Update go112 to 1.12.7.
These releases include fixes to the runtime, the crypto/x509, and
net/http packages.
2020-02-23 19:21:27 +00:00
maya
4947727f41 Forcibly turn off Go module support.
We don't currently build any packages using modules, and the switch to
newer versions of Go has resulted in the default changing to modules
being sometimes enabled.
This now causes random packages to begin fetching from the Internet during
builds, which goes against pkgsrc policy.

Doesn't seem to harm the ability to build a random subset of the Go packages
in pkgsrc.
2020-02-18 18:02:58 +00:00
bsiegert
f2aaad19f4 Update go113 to 1.13.7 (security release).
Panic in crypto/x509 certificate parsing and golang.org/x/crypto/cryptobyte

On 32-bit architectures, a malformed input to crypto/x509 or the ASN.1 parsing
functions of golang.org/x/crypto/cryptobyte can lead to a panic.

The malformed certificate can be delivered via a crypto/tls connection to a
client, or to a server that accepts client certificates. net/http clients can
be made to crash by an HTTPS server, while net/http servers that accept client
certificates will recover the panic and are unaffected.

Thanks to Project Wycheproof for providing the test cases that led to the
discovery of this issue.

The issue is CVE-2020-7919 and Go issue golang.org/issue/36837.

This is also fixed in version v0.0.0-20200124225646-8b5121be2f68 of
golang.org/x/crypto/cryptobyte.
2020-02-02 09:36:40 +00:00
bsiegert
56d839292e Update go112 to 1.12.16 (security release).
Panic in crypto/x509 certificate parsing and golang.org/x/crypto/cryptobyte

On 32-bit architectures, a malformed input to crypto/x509 or the ASN.1 parsing
functions of golang.org/x/crypto/cryptobyte can lead to a panic.

The malformed certificate can be delivered via a crypto/tls connection to a
client, or to a server that accepts client certificates. net/http clients can
be made to crash by an HTTPS server, while net/http servers that accept client
certificates will recover the panic and are unaffected.

Thanks to Project Wycheproof for providing the test cases that led to the
discovery of this issue.

The issue is CVE-2020-7919 and Go issue golang.org/issue/36837.

This is also fixed in version v0.0.0-20200124225646-8b5121be2f68 of
golang.org/x/crypto/cryptobyte.
2020-02-02 09:26:39 +00:00
rillig
9637f7852e all: migrate homepages from http to https
pkglint -r --network --only "migrate"

As a side-effect of migrating the homepages, pkglint also fixed a few
indentations in unrelated lines. These and the new homepages have been
checked manually.
2020-01-26 17:30:40 +00:00
bsiegert
57fa6c9b1a go: use go113 as the default for building packages.
I did a preliminary bulk build to find build failures resulting from this
change and fixed the fallout in www/grafana. Everything else seemed to be
ok.
2020-01-10 12:56:35 +00:00
bsiegert
b676553188 Update go112 to 1.12.15.
These releases include fixes to the runtime and to the
net/http package.

The macOS releases enable the Hardened Runtime. See
https://golang.org/issue/34986 for details.

View the release notes for more information:
    https://golang.org/doc/devel/release.html#go1.13.minor
2020-01-10 12:53:01 +00:00
bsiegert
e4f0163ebc Update go113 to 1.13.6.
These releases include fixes to the runtime and to the
net/http package.

The macOS releases enable the Hardened Runtime. See
https://golang.org/issue/34986 for details.

View the release notes for more information:
    https://golang.org/doc/devel/release.html#go1.13.minor
2020-01-10 12:40:43 +00:00
bsiegert
19e5d6045d Update go112 to 1.12.14.
go1.12.13 (released 2019/10/31) fixes an issue on macOS 10.15 Catalina where
the non-notarized installer and binaries were being rejected by Gatekeeper.
Only macOS users who hit this issue need to update.

go1.12.14 (released 2019/12/04) includes a fix to the runtime. See the Go
1.12.14 milestone on our issue tracker for details.
2019-12-13 07:39:33 +00:00
jperkin
bef8286b1f go: Split *_SUPPORTED variables out into new go-vars.mk.
It's not always possible to include go-package.mk earlier than bsd.prefs.mk
in a package, for example if the package defines its own do-install target,
so move out the *_SUPPORTED variables that need to be included first.
2019-12-09 09:59:31 +00:00
bsiegert
bd31358f40 Add go113.
I forgot to include this file in the go113 commit, thanks wiz@ for
notifying me!
2019-12-08 14:42:02 +00:00
rillig
4114ced2d6 lang/go: add go to the tools directory
This makes it easier to run the Go compiler from within the build
environment created by "bmake build-env".
2019-12-07 18:15:13 +00:00
rillig
8c6aee8563 lang: align variable assignments
pkglint -Wall -F --only aligned --only indent -r

No manual corrections.
2019-11-03 19:03:56 +00:00
bsiegert
d4e63a29c5 Update go112 to 1.12.12.
qo1.12.11 (released 2019/10/17) includes security fixes to the crypto/dsa
package. See the Go 1.12.11 milestone on our issue tracker for details.

go1.12.12 (released 2019/10/17) includes fixes to the go command, runtime,
syscall and net packages. See the Go 1.12.12 milestone on our issue tracker
for details.
2019-10-18 14:48:29 +00:00
bsiegert
ea642613fd Update go112 to 1.12.10.
Commit ok'd by wiz@ for PMC.

Go 1.12.10:

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.

Go 1.12.9:

go1.12.9 (released 2019/08/15) includes fixes to the linker, and the os and
math/big packages. See the Go 1.12.9 milestone on our issue tracker for
details.
2019-09-26 18:36:46 +00:00