GnuPG ElGamal签名密钥私钥信息泄露漏洞

漏洞信息详情

GnuPG ElGamal签名密钥私钥信息泄露漏洞

漏洞简介

GNU Privacy Guard (GnuPG)是一款开放源代码的加密程序。
GnuPG在处理ElGamal签名密钥实现时存在漏洞,远程攻击者可以利用这个问题获得目标用户私钥信息。
GnuPG允许建立ELGamal密钥用于加密和签名。2000年1月的1.0.2版本,GnuPG对建立ELGamal密钥进行的有效修改,可以更高效的进行加密(选择小的X密码指数(secret exponent)和使用小的K用于加密),不过对这个更改导致签名密钥时产生问题:用于加密的小的K也用于签名,如果攻击者获取一个用此密钥生成的签名,就可以利用这种密码攻击方法来得出这个私钥。由于由这个密钥建立的签名用于绑定用户ID和其他重要密钥,因此此类签名一般都用于primary ElGamal密钥,即使这个密钥从来没有对文档进行签字也可能遭到此漏洞破坏。
这个漏洞针对普通的(type 16)加密ELGamal密钥不受影响,因此GnuPG不允许使用这类型的密钥进行签名。只有ELGamal签名+加密密钥(type 20)存在此漏洞。

漏洞公告

临时解决方法:
如果您不能立刻安装补丁或者升级,CNNVD建议您采取以下措施以降低威胁:

* 如下为针对GnuPG 1.2.3的补丁:

Index: getkey.c

===================================================================

RCS file: /cvs/gnupg/gnupg/g10/getkey.c,v

retrieving revision 1.78.2.20

diff -u -r1.78.2.20 getkey.c

— getkey.c 21 Jul 2003 14:55:00 -0000 1.78.2.20

+++ getkey.c 27 Nov 2003 00:32:30 -0000

@@ -1655,6 +1655,11 @@

if ( x ) /* mask it down to the actual allowed usage */

key_usage &= x;

}

+

+ /* Type 20 Elgamal keys are not usable. */

+ if(pk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)

+ key_usage=0;

+

pk->pubkey_usage = key_usage;

if ( !key_expire_seen ) {

@@ -1869,6 +1874,13 @@

if ( x ) /* mask it down to the actual allowed usage */

key_usage &= x;

}

+

+ /* Type 20 Elgamal subkeys or any subkey on a type 20 primary are

+ not usable. */

+ if(mainpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL

+ || subpk->pubkey_algo==PUBKEY_ALGO_ELGAMAL)

+ key_usage=0;

+

subpk->pubkey_usage = key_usage;

p = parse_sig_subpkt (sig->hashed, SIGSUBPKT_KEY_EXPIRE, NULL);

Index: keygen.c

===================================================================

RCS file: /cvs/gnupg/gnupg/g10/keygen.c,v

retrieving revision 1.90.2.11

diff -u -r1.90.2.11 keygen.c

— keygen.c 16 Jul 2003 03:09:15 -0000 1.90.2.11

+++ keygen.c 27 Nov 2003 00:32:31 -0000

@@ -958,8 +958,6 @@

tty_printf( _(” (%d) DSA (sign only)\n”), 2 );

if( addmode )

tty_printf( _(” (%d) ElGamal (encrypt only)\n”), 3 );

– if (opt.expert)

– tty_printf( _(” (%d) ElGamal (sign and encrypt)\n”), 4 );

tty_printf( _(” (%d) RSA (sign only)\n”), 5 );

if (addmode)

tty_printf( _(” (%d) RSA (encrypt only)\n”), 6 );

@@ -989,21 +987,6 @@

algo = PUBKEY_ALGO_RSA;

*r_usage = PUBKEY_USAGE_SIG;

break;

– }

– else if( algo == 4 && opt.expert)

– {

– tty_printf(_(

-“The use of this algorithm is only supported by GnuPG. You will not be\n”

-“able to use this key to communicate with PGP users. This algorithm is also\n”

-“very slow, and may not be as secure as the other choices.\n”));

– if( cpr_get_answer_is_yes(“keygen.algo.elg_se”,

– _(“Create anyway? “)))

– {

– algo = PUBKEY_ALGO_ELGAMAL;

– *r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG;

– break;

– }

}

else if( algo == 3 && addmode ) {

algo = PUBKEY_ALGO_ELGAMAL_E;
厂商补丁:
MandrakeSoft
————
MandrakeSoft已经为此发布了一个安全公告(MDKSA-2003:109)以及相应补丁:

MDKSA-2003:109:Updated gnupg packages fix vulnerability with ElGamal signing keys

链接:http://www.linux-mandrake.com/en/security/2003/2003-109.php” target=”_blank”>
http://www.linux-mandrake.com/en/security/2003/2003-109.php

补丁下载:

Updated Packages:

Corporate Server 2.1:

ftp://download.sourceforge.net/pub/mirrors/mandrake/updates/corporate/2.1/RPMS/gnupg-1.0.7-3.2.C21mdk.i586.rpm

ftp://download.sourceforge.net/pub/mirrors/mandrake/updates/corporate/2.1/SRPMS/gnupg-1.0.7-3.2.C21mdk.src.rpm

Corporate Server 2.1/x86_64:

ftp://download.sourceforge.net/pub/mirrors/mandrake/updates/x86_64/corporate/2.1/RPMS/gnupg-1.0.7-3.2.C21mdk.x86_64.rpm

ftp://download.sourceforge.net/pub/mirrors/mandrake/updates/x86_64/corporate/2.1/SRPMS/gnupg-1.0.7-3.2.C21mdk.src.rpm

Mandrake Linux 9.0:

上述升级软件还可以在下列地址中的任意一个镜像ftp服务器上下载:

http://www.mandrakesecure.net/en/ftp.php” target=”_blank”>
http://www.mandrakesecure.net/en/ftp.php

参考网址

来源:US-CERT Vulnerability Note: VU#940388
名称: VU#940388
链接:http://www.kb.cert.org/vuls/id/940388

来源: BID
名称: 9115
链接:http://www.securityfocus.com/bid/9115

来源: BUGTRAQ
名称: 20031127 GnuPG’s ElGamal signing keys compromised
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=106995769213221&w=2

来源: lists.gnupg.org
链接:http://lists.gnupg.org/pipermail/gnupg-announce/2003q4/000277.html

来源: lists.gnupg.org
链接:http://lists.gnupg.org/pipermail/gnupg-announce/2003q4/000276.html

来源: REDHAT
名称: RHSA-2003:395
链接:http://www.redhat.com/support/errata/RHSA-2003-395.html

来源: REDHAT
名称: RHSA-2003:390
链接:http://www.redhat.com/support/errata/RHSA-2003-390.html

来源: SUSE
名称: SuSE-SA:2003:048
链接:http://www.novell.com/linux/security/advisories/2003_048_gpg.html

来源: DEBIAN
名称: DSA-429
链接:http://www.debian.org/security/2004/dsa-429

来源: SECUNIA
名称: 10400
链接:http://secunia.com/advisories/10400

来源: SECUNIA
名称: 10399
链接:http://secunia.com/advisories/10399

来源: SECUNIA
名称: 10349
链接:http://secunia.com/advisories/10349

来源: SECUNIA
名称: 10304
链接:http://secunia.com/advisories/10304

来源: OVAL
名称: oval:org.mitre.oval:def:10982
链接:http://oval.mitre.org/repository/data/getDef?id=oval:org.mitre.oval:def:10982

来源: MANDRAKE
名称: MDKSA-2003:109
链接:http://www.mandriva.com/security/advisories?name=MDKSA-2003:109

来源: CONECTIVA
名称: CLA-2003:798
链接:http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000798

来源: SGI
名称: 20040202-01-U
链接:ftp://patches.sgi.com/support/free/security/advisories/20040202-01-U.asc

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享