安全研究
安全漏洞
GnuPG ElGamal签名密钥私钥信息泄露漏洞
发布日期:2003-11-28
更新日期:2003-12-03
受影响系统:
GNU GNU Privacy Guard 1.2.3描述:
GNU GNU Privacy Guard 1.2.2-r1
GNU GNU Privacy Guard 1.2.2
GNU GNU Privacy Guard 1.2.1
GNU GNU Privacy Guard 1.2
GNU GNU Privacy Guard 1.0.7
GNU GNU Privacy Guard 1.0.6
GNU GNU Privacy Guard 1.0.4
GNU GNU Privacy Guard 1.0.3b
GNU GNU Privacy Guard 1.0.3
GNU GNU Privacy Guard 1.0.2
GNU GNU Privacy Guard 1.0.1
GNU GNU Privacy Guard 1.0
GNU GNU Privacy Guard 1.0.5
- Caldera OpenLinux eBuilder 3.0
- Caldera OpenLinux 2.3
- Conectiva Linux graficas
- Conectiva Linux ecommerce
- Conectiva Linux 6.0
- Conectiva Linux 5.1
- Conectiva Linux 5.0
- Conectiva Linux 4.3
- Conectiva Linux 4.2
- Conectiva Linux 4.1
- Conectiva Linux 4.0 es
- Conectiva Linux 4.0
- Debian Linux 2.2
- Mandrake Linux Corporate Server 1.0.1
- Mandrake Linux 8.1
- Mandrake Linux 8.0
- Mandrake Linux 7.2
- Mandrake Linux 7.1
- Microsoft Windows ME
- Microsoft Windows 98
- Microsoft Windows 95
- RedHat Linux 7.1
- RedHat Linux 7.0
- RedHat Linux 6.2
- SuSE Linux 7.1
- SuSE Linux 7.0
- SuSE Linux 6.4
- SuSE Linux 6.3
- Trustix Secure Linux 1.2
- Trustix Secure Linux 1.1
BUGTRAQ ID: 9115
CVE(CAN) ID: CVE-2003-0971
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)存在此漏洞。
<*来源:Phong Q. Nguyen (wk@gnupg.org)
链接:http://marc.theaimsgroup.com/?l=bugtraq&m=106995769213221&w=2
http://www.linux-mandrake.com/en/security/2003/2003-109.php
*>
建议:
临时解决方法:
如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:
* 如下为针对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
补丁下载:
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
浏览次数:3184
严重程度:0(网友投票)
绿盟科技给您安全的保障