From ftp://ftp.gnupg.org/pub/gcrypt/gnupg/gnupg-1.0.4.security-patch1.diff Hi! It has been pointed out that there is another bug in the signature verification code of GnuPG. * This can easily lead to false positives * All versions of GnuPG released before today are vulnerable! To check a detached singature you normally do this: gpg --verify foo.sig foo.txt The problem here is that someone may replace foo.sig with a standard signature containing some arbitrary signed text and its signature, and then modify foo.txt - GnuPG does not detect this - Ooops. The solution for this problem ist not easy and needs a change in the semantics of the --verify command: It will not any longer be possible to do this: gpg --verify foo.sig signed_data ) { + log_error (_("not a detached signature\n") ); + return; + } for( n1 = node; (n1 = find_next_kbnode(n1, PKT_SIGNATURE )); ) check_sig_and_print( c, n1 ); @@ -1307,6 +1311,10 @@ proc_tree( CTX c, KBNODE node ) log_error("cleartext signature without data\n" ); return; } + else if ( c->signed_data ) { + log_error (_("not a detached signature\n") ); + return; + } for( n1 = node; (n1 = find_next_kbnode(n1, PKT_SIGNATURE )); ) check_sig_and_print( c, n1 ); @@ -1364,6 +1372,10 @@ proc_tree( CTX c, KBNODE node ) log_error("can't hash datafile: %s\n", g10_errstr(rc)); return; } + } + else if ( c->signed_data ) { + log_error (_("not a detached signature\n") ); + return; } else log_info(_("old style (PGP 2.x) signature\n"));