Go 1.20.7 のリリース【セキュリティ・アップデート】

no extension

予告どおり Go 1.20.7 がリリースされた。

今回は CVE ID ベースで1件の脆弱性修正を含んでいる。

CVE-2023-29409 crypto/tls: restrict RSA keys in certificates to <= 8192 bits

Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. Limit this by restricting the size of RSA keys transmitted during handshakes to <= 8192 bits.

Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.

どうやら 8192 bit 以上の RSA 鍵は取り扱わないことにしたようだ。 まぁ,妥当かな。

  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • 深刻度: 警告 (Score: 5.3)
基本評価基準 評価値
攻撃元区分 ネットワーク
攻撃条件の複雑さ
必要な特権レベル 不要
ユーザ関与レベル 不要
スコープ 変更なし
機密性への影響 なし
完全性への影響 なし
可用性への影響

その他のパッケージの更新

Go 標準パッケージ以外にも以下のパッケージでセキュリティ・アップデートが行われている。

CVE-2023-3978 Vulnerabilities in golang.org/x/net/html

Version v0.13.0 of golang.org/x/net fixes a vulnerability in the golang.org/x/net/html package which caused a mismatch between parsing and rendering.
Text nodes not in the HTML namespace were being incorrectly literally rendered, causing text which should’ve been escaped to not be. This could lead to an XSS attack.
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
  • 深刻度: 警告 (Score: 6.1)
基本評価基準 評価値
攻撃元区分 ネットワーク
攻撃条件の複雑さ
必要な特権レベル 不要
ユーザ関与レベル
スコープ 変更あり
機密性への影響
完全性への影響
可用性への影響 なし

CVE-2023-29407 Vulnerabilities in golang.org/x/image/tiff

Version v0.10.0 of golang.org/x/image fixes two vulnerabilities in the golang.org/x/image/tiff package which can cause excessive CPU or memory consumption when parsing images.

また TIFF か…

  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • 深刻度: 警告 (Score: 6.5)
基本評価基準 評価値
攻撃元区分 ネットワーク
攻撃条件の複雑さ
必要な特権レベル 不要
ユーザ関与レベル
スコープ 変更なし
機密性への影響 なし
完全性への影響 なし
可用性への影響

例によって…

Ubuntu の APT で管理している Go コンパイラは古いので,ダウンロードページからバイナリ(go1.20.7.linux-amd64.tar.gz)を取ってきてインストールすることを推奨する。 以下は完全手動での作業例。

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

Windows はインストールパッケージを取ってきて直接インストールする。 Scoop 経由でも OK

複数バージョンの Go コンパイラを扱いたい場合は

$ go install golang.org/dl/go1.20.7@latest
$ go1.20.7 download
$ go1.20.7 version
go version go1.20.7 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)

photo
初めてのGo言語 ―他言語プログラマーのためのイディオマティックGo実践ガイド
Jon Bodner (著), 武舎 広幸 (翻訳)
オライリージャパン 2022-09-26
単行本(ソフトカバー)
4814400047 (ASIN), 9784814400041 (EAN), 4814400047 (ISBN)
評価     

2021年に出た “Learning Go” の邦訳版。私は版元で PDF 版を購入。 Go 特有の語法(idiom)を切り口として Go の機能やパッケージを解説している。 Go 1.19 対応。

reviewed by Spiegel on 2022-10-11 (powered by PA-APIv5)