#golang Unicode パッケージの脆弱性
golang.org/x/text/encoding/unicode パッケージで脆弱性が見つかった模様。
Version v0.3.3 of
golang.org/x/textfixes a vulnerability in thegolang.org/x/text/encoding/unicodepackage which could lead to the UTF-16 decoder entering an infinite loop, causing the program to crash or run out of memory.An attacker could provide a single byte to a
UTF16decoder instantiated withUseBOMorExpectBOMto trigger an infinite loop if theStringfunction on theDecoderis called, or theDecoderis passed togolang.org/x/text/transform.String.
というわけで,件のパッケージを使って UTF-16 符号化・復号化の操作を行っている場合は最新バージョンのパッケージに差し替えること。
とりあえず go.mod ファイルを見て
require golang.org/x/text v0.3.2
とか v0.3.3 未満になっている場合は
require golang.org/x/text latest
と最新版に書き換えてコンパイルし直せばいいだろう。
CVE-2020-14040
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- 深刻度: 重要 (7.5)
| 基本評価基準 | 評価値 |
|---|---|
| 攻撃元区分 | ネットワーク |
| 攻撃条件の複雑さ | 低 |
| 必要な特権レベル | 不要 |
| ユーザ関与レベル | 不要 |
| スコープ | 変更なし |
| 機密性への影響 | なし |
| 完全性への影響 | なし |
| 可用性への影響 | 高 |
参考図書
- プログラミング言語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 現在)。復刊を望む!

