GnuPG 2.2.8 および Libgcrypt 1.8.3 がリリース(セキュリティ・アップデート)

no extension

GnuPG 2.2.8 および Libgcrypt 1.8.3 がリリースされた。

今回はキュリティ・アップデートを含む。

CVE-2018-12020

脆弱性の概要

mainproc.c in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, which allows remote attackers to spoof the output that GnuPG sends on file descriptor 2 to other programs that use the "--status-fd 2" option. For example, the OpenPGP data might represent an original filename that contains line feed characters in conjunction with GOODSIG or VALIDSIG status codes.
The OpenPGP protocol allows to include the file name of the original input file into a signed or encrypted message. During decryption and verification the GPG tool can display a notice with that file name. The displayed file name is not sanitized and as such may include line feeds or other control characters. This can be used inject terminal control sequences into the out and, worse, to fake the so-called status messages. These status messages are parsed by programs to get information from gpg about the validity of a signature and an other parameters. Status messages are created with the option "--status-fd N" where N is a file descriptor. Now if N is 2 the status messages and the regular diagnostic messages share the stderr output channel. By using a made up file name in the message it is possible to fake status messages. Using this technique it is for example possible to fake the verification status of a signed mail.

想定される影響

GPGME ライブラリを使用しない全てのメールクライアント等のアプリケーションに影響を及ぼす。 Red Hat のレポートではこの件(CVE-2018-12020)の深刻度を「重要(7.5)」レベルと見積っている。

基本評価基準 評価値
攻撃元区分 ネットワーク
攻撃条件の複雑さ
必要な特権レベル 不要
ユーザ関与レベル 不要
スコープ 変更なし
機密性への影響 なし
完全性への影響
可用性への影響 なし

対策

GnuPG 2.2.8 にアップデートする。 深刻度が高いので早めのアップデートを推奨する。

アップデートが間に合わない場合は,アプリケーションに応じて,以下の対策を行うこと。

If your application uses GPGME your application is safe. Fortunately most modern mail readers use GPGME, including GpgOL and KMail. Mutt users should make sure to use "set crypt_use_gpgme".
If you are parsing GnuPG status output and you use a dedicated file descriptor with --status-fd you are safe. A dedicated file descriptor is one that is not shared with the log output. The log output defaults to stderr (2) but may be a different if the option --logger-fd is used.
If you are not using --verbose you are safe. But take care: --verbose might be specified in the config file. As a short term mitigation or if you can't immediately upgrade to the latest versions, you can add --no-verbose to the invocation of gpg.
Another short term mitigation is to redirect the log output to a different file: For example "--log-file /dev/null".

verbose オプションを外すのが手っ取り早いかな。

CVE-2018-0495

脆弱性の概要

Libgcrypt before 1.7.10 and 1.8.x before 1.8.3 allows a memory-cache side-channel attack on ECDSA signatures that can be mitigated through the use of blinding during the signing process in the `_gcry_ecc_ecdsa_sign` function in cipher/ecc-ecdsa.c, aka the Return Of the Hidden Number Problem or ROHNP. To discover an ECDSA key, the attacker needs access to either the local machine or a different virtual machine on the same physical host.

想定される影響

GPGME ライブラリを使用しない全てのメールクライアント等のアプリケーションに影響を及ぼす。 Red Hat のレポートではこの件(CVE-2018-0495)の深刻度を「警告(5.1)」レベルと見積っている。

基本評価基準 評価値
攻撃元区分 ローカル
攻撃条件の複雑さ
必要な特権レベル 不要
ユーザ関与レベル 不要
スコープ 変更なし
機密性への影響
完全性への影響 なし
可用性への影響 なし

対策

Libgcrypt 1.8.3 または 1.7.10 にアップデートする。

一般的に side channel 攻撃はそれほど高い深刻度にはならない。 計画的なアップデートを。

GnuPG アップデート後の状態

$ gpg --version
gpg (GnuPG) 2.2.8
libgcrypt 1.8.3
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ********
サポートしているアルゴリズム:
公開鍵: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
暗号方式: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
    CAMELLIA128, CAMELLIA192, CAMELLIA256
ハッシュ: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
圧縮: 無圧縮, ZIP, ZLIB, BZIP2

Gpg4win も 3.1.2 にアップデート

Gpg4win 3.1.2 の構成は以下の通り。

  • GnuPG: 2.2.8
  • Kleopatra: 3.1.2
  • GPA: 0.9.10
  • GpgOL: 2.2.0
  • GpgEX: 1.0.6

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

参考図書

photo
暗号技術入門 第3版 秘密の国のアリス
結城 浩 (著)
SBクリエイティブ 2015-08-25 (Release 2015-09-17)
Kindle版
B015643CPE (ASIN)
評価     

SHA-3 や Bitcoin/Blockchain など新しい知見や技術要素を大幅追加。暗号技術を使うだけならこれ1冊でとりあえず無問題。

reviewed by Spiegel on 2015-09-20 (powered by PA-APIv5)