Go 1.15.7 のリリース【セキュリティ・アップデート】
今回は複数の脆弱性について改修されている。
cmd/go: packages using cgo can cause arbitrary code execution at build time (CVE-2021-3115)
The go command may execute arbitrary code at build time when cgo is in use on Windows. This may occur when running “
go get
”, or any other command that builds code. Only users who build untrusted code (and don’t execute it) are affected.In addition to Windows users, this can also affect Unix users who have “
.
” listed explicitly in theirPATH
and are running “go get
” or build commands outside of a module or with module mode disabled.
というわけで, Windows だけでなく UNIX 系のプラットフォームでも環境変数 PATH
にカレントディレクトリ “.
” が設定されているとヤバいので(そんなヤツおらんやろけど),きちんと対処すること。
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
- 深刻度: 重要 (Score: 7.5)
基本評価基準 | 評価値 |
---|---|
攻撃元区分 | ネットワーク |
攻撃条件の複雑さ | 高 |
必要な特権レベル | 不要 |
ユーザ関与レベル | 要 |
スコープ | 変更なし |
機密性への影響 | 高 |
完全性への影響 | 高 |
可用性への影響 | 高 |
crypto/elliptic: incorrect operations on the P-224 curve (CVE-2021-3114)
The.P224()
Curve implementation can in rare circumstances generate incorrect outputs, including returning invalid points fromScalarMult
ただし
The.crypto/x509
andgolang.org/x/crypto/ocsp
(but notcrypto/tls
) packages support P-224 ECDSA keys, but they are not supported by publicly trusted certificate authorities. No other standard library orgolang.org/x/crypto
package supports or uses the P-224 curve.
ということなので,実質的なインパクトは小さい?
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- 深刻度: 警告 (Score: 6.5)
基本評価基準 | 評価値 |
---|---|
攻撃元区分 | ネットワーク |
攻撃条件の複雑さ | 低 |
必要な特権レベル | 不要 |
ユーザ関与レベル | 不要 |
スコープ | 変更なし |
機密性への影響 | 低 |
完全性への影響 | 低 |
可用性への影響 | なし |
例によって…
Ubuntu の APT で管理している Go コンパイラは古いので,ダウンロードページからバイナリ(go1.15.7.linux-amd64.tar.gz
)を取ってきて手動でインストールすることを強く推奨する。
以下は手動での作業例。
$ cd /usr/local/src
$ sudo curl -L "https://golang.org/dl/go1.15.7.linux-amd64.tar.gz" -O
$ cd ..
$ sudo unlink go # 以前の Go が入っている場合
$ sudo tar xvf src/go1.15.7.linux-amd64.tar.gz
$ sudo mv go go1.15.7
$ sudo ln -s go1.15.7 go
$ go version # /usr/local/go/bin にパスが通っている場合
go version go1.15.7 linux/amd64
アップデートは計画的に。
ブックマーク
参考図書
- プログラミング言語Go (ADDISON-WESLEY PROFESSIONAL COMPUTING SERIES)
- Alan A.A. Donovan (著), Brian W. Kernighan (著), 柴田 芳樹 (翻訳)
- 丸善出版 2016-06-20
- 単行本(ソフトカバー)
- 4621300253 (ASIN), 9784621300251 (EAN), 4621300253 (ISBN)
- 評価
著者のひとりは(あの「バイブル」とも呼ばれる)通称 “K&R” の K のほうである。この本は Go 言語の教科書と言ってもいいだろう。と思ったら絶版状態らしい(2025-01 現在)。復刊を望む!