Go 1.13.2 および Go 1.13.3 のリリース【セキュリティ・アップデート】

no extension

Go 1.13.2 がリリースされた。

今回のはちょーっとヤバめかも。

HTTPS サーバを構成している場合は要注意。

Invalid DSA public keys can cause a panic in dsa.Verify. In particular, 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.

他にも OpenPGP, OTR, SSH あたりも影響を受けるそうな。

Moreover, an application might crash invoking crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate request, parsing a golang.org/x/crypto/openpgp Entity, or during a golang.org/x/crypto/otr conversation. 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.

更に更に slice に関して

The Go 1.13.2 release also includes a fix to the compiler that prevents improper access to negative slice indexes in rare cases. Affected code, in which the compiler can prove that the index is zero or negative, would have resulted in a panic in Go 1.12, but could have led to arbitrary memory read and writes in Go 1.13 and Go 1.13.1.

とあり, Go 1.13.x でバイナリを提供している場合はもれなくリコンパイルする必要があるかもねぇ。

【追記】 Go 1.13.3 のリリース

まさか5時間足らずでアップデートするとは思わざりき。 別途記事を起こすのはアレなので,この記事に追記する。 フットワークの軽い言語だとポジティブに考えることにしよう(笑)

というわけで Go 1.13.3 がリリースされた。

go1.13.3 (released 2019/10/17) includes fixes to the go command, the toolchain, the runtime, syscall, net, net/http, and crypto/ecdsa packages. See the Go 1.13.3 milestone on our issue tracker for details.

1.13.2 のアップデートがまだの人はまとめてやってしまおう。 私のように既にアップデートしてしまった人は,ごくろーさん(泣)

Ubuntu の APT は相変わらずサポートから外れた 1.10.x しか対応していないのでダウンロードページからバイナリ(go1.13.3.linux-amd64.tar.gz)を取ってきて手動でインストールすることを強く推奨する。

$ cd /usr/local/src
$ sudo curl "https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz" -O
$ cd ..
$ sudo unlink go # 以前の Go が入っている場合
$ sudo tar xvf src/go1.13.3.linux-amd64.tar.gz
$ sudo mv go go1.13.3
$ sudo ln -s go1.13.3 go
$ go version # /usr/local/go/bin にパスが通っている場合
go version go1.13.3 linux/amd64

アップデートは計画的に。

ブックマーク

参考図書

photo
プログラミング言語Go
アラン・ドノバン (著), ブライアン・カーニハン (著), 柴田芳樹 (著)
丸善出版 2016-06-20 (Release 2021-07-13)
Kindle版
B099928SJD (ASIN)
評価     

Kindle 版出た! 一部内容が古びてしまったが,この本は Go 言語の教科書と言ってもいいだろう。感想はこちら

reviewed by Spiegel on 2021-05-22 (powered by PA-APIv5)