<a href="http://lists.gnupg.org/pipermail/gnupg-announce/2006q1/000216.html">GnuPG does not detect injection of unsigned data</a>

えらいこっちゃ。前のやつよりもでかいっす。

Impact:
=======
Signature verification of non-detached signatures may give a positive result but when extracting the signed data, this data may be prepended or appended with extra data not covered by the signature. Thus it is possible for an attacker to take any signed message and inject extra arbitrary data.
Detached signatures (a separate signature file) are not affected.
All versions of gnupg prior to 1.4.2.2 are affected.
Scripts and applications using gpg to verify the integrity of data are affected. This includes applications using the GPGME library[2].

別ファイルに分離していない署名(暗号化の有無に関係なく)を含むデータの前後に、署名されていないデータを紛れ込ませることができる。1.4.2.2より古い全てのバージョンにこの脆弱性が含まれる。GPGMEを使うアプリケーションも影響を受ける。

Solution:
=========
Update GnuPG as soon as possible to version 1.4.2.2. There are no fixes for older versions available.

さっさと最新バージョンに上げましょう。Windows用のバイナリ(インストーラつき)もあります。詳細な解説はリンク先のメールを参照。

これで例えばどういう攻撃が可能か

  1. AさんはBさん宛てに重要なデータを暗号化してメールで送る。Aさんの秘密鍵で署名し、Bさんの公開鍵で暗号化する。
  2. 悪意を持ったCがAさんの発信したメールを捉えて、Bさんの公開鍵で暗号化した偽のデータをくっつけてAさんに送る。
  3. Bさんはメールを受け取って自分の秘密鍵で復号し、Aさんが送った元のデータ(と、Cがくっつけたデータ)をAさんの公開鍵で検証したつもりで*1、全体に対する署名が「正当な署名」であると判断する。
  4. Bさんは安心して間違ったデータを使う。

こわ。

*1:実際には、GnuPGで検証されるのはAさんが送った元のデータだけ