Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
5b0b0e98
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5b0b0e98
编写于
2月 19, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Security fix: Vaudenay timing attack on CBC.
An advisory will be posted to the web. Expect a release within the hour.
上级
d5234c7b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
54 addition
and
17 deletion
+54
-17
CHANGES
CHANGES
+23
-1
ssl/s3_pkt.c
ssl/s3_pkt.c
+31
-16
未找到文件。
CHANGES
浏览文件 @
5b0b0e98
...
...
@@ -434,7 +434,17 @@ TODO: bug: pad x with leading zeros if necessary
differing sizes.
[Richard Levitte]
Changes between 0.9.7 and 0.9.7a [XX xxx 2003]
Changes between 0.9.7 and 0.9.7a [19 Feb 2003]
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
via timing by performing a MAC computation even if incorrrect
block cipher padding has been found. This is a countermeasure
against active attacks where the attacker has to distinguish
between bad padding and a MAC verification error. (CAN-2003-0078)
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
Martin Vuagnoux (EPFL, Ilion)]
*) Make the no-err option work as intended. The intention with no-err
is not to have the whole error stack handling routines removed from
...
...
@@ -2325,6 +2335,18 @@ des-cbc 3624.96k 5258.21k 5530.91k 5624.30k 5628.26k
*) Clean old EAY MD5 hack from e_os.h.
[Richard Levitte]
Changes between 0.9.6h and 0.9.6i [19 Feb 2003]
*) In ssl3_get_record (ssl/s3_pkt.c), minimize information leaked
via timing by performing a MAC computation even if incorrrect
block cipher padding has been found. This is a countermeasure
against active attacks where the attacker has to distinguish
between bad padding and a MAC verification error. (CAN-2003-0078)
[Bodo Moeller; problem pointed out by Brice Canvel (EPFL),
Alain Hiltgen (UBS), Serge Vaudenay (EPFL), and
Martin Vuagnoux (EPFL, Ilion)]
Changes between 0.9.6g and 0.9.6h [5 Dec 2002]
*) New function OPENSSL_cleanse(), which is used to cleanse a section of
...
...
ssl/s3_pkt.c
浏览文件 @
5b0b0e98
...
...
@@ -238,6 +238,8 @@ static int ssl3_get_record(SSL *s)
unsigned
int
mac_size
;
int
clear
=
0
;
size_t
extra
;
int
decryption_failed_or_bad_record_mac
=
0
;
unsigned
char
*
mac
=
NULL
;
rr
=
&
(
s
->
s3
->
rrec
);
sess
=
s
->
session
;
...
...
@@ -353,8 +355,11 @@ again:
/* SSLerr() and ssl3_send_alert() have been called */
goto
err
;
/* otherwise enc_err == -1 */
goto
decryption_failed_or_bad_record_mac
;
/* Otherwise enc_err == -1, which indicates bad padding
* (rec->length has not been changed in this case).
* To minimize information leaked via timing, we will perform
* the MAC computation anyway. */
decryption_failed_or_bad_record_mac
=
1
;
}
#ifdef TLS_DEBUG
...
...
@@ -380,28 +385,46 @@ printf("\n");
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_PRE_MAC_LENGTH_TOO_LONG);
goto f_err;
#else
goto
decryption_failed_or_bad_record_mac
;
decryption_failed_or_bad_record_mac
=
1
;
#endif
}
/* check the MAC for rr->input (it's in mac_size bytes at the tail) */
if
(
rr
->
length
<
mac_size
)
if
(
rr
->
length
>=
mac_size
)
{
rr
->
length
-=
mac_size
;
mac
=
&
rr
->
data
[
rr
->
length
];
}
else
{
/* record (minus padding) is too short to contain a MAC */
#if 0 /* OK only for stream ciphers */
al=SSL_AD_DECODE_ERROR;
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT);
goto f_err;
#else
goto
decryption_failed_or_bad_record_mac
;
decryption_failed_or_bad_record_mac
=
1
;
rr
->
length
=
0
;
#endif
}
rr
->
length
-=
mac_size
;
i
=
s
->
method
->
ssl3_enc
->
mac
(
s
,
md
,
0
);
if
(
m
emcmp
(
md
,
&
(
rr
->
data
[
rr
->
length
]),
mac_size
)
!=
0
)
if
(
m
ac
==
NULL
||
memcmp
(
md
,
mac
,
mac_size
)
!=
0
)
{
goto
decryption_failed_or_bad_record_mac
;
decryption_failed_or_bad_record_mac
=
1
;
}
}
if
(
decryption_failed_or_bad_record_mac
)
{
/* A separate 'decryption_failed' alert was introduced with TLS 1.0,
* SSL 3.0 only has 'bad_record_mac'. But unless a decryption
* failure is directly visible from the ciphertext anyway,
* we should not reveal which kind of error occured -- this
* might become visible to an attacker (e.g. via a logfile) */
al
=
SSL_AD_BAD_RECORD_MAC
;
SSLerr
(
SSL_F_SSL3_GET_RECORD
,
SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
);
goto
f_err
;
}
/* r->length is now just compressed */
if
(
s
->
expand
!=
NULL
)
{
...
...
@@ -443,14 +466,6 @@ printf("\n");
return
(
1
);
decryption_failed_or_bad_record_mac:
/* Separate 'decryption_failed' alert was introduced with TLS 1.0,
* SSL 3.0 only has 'bad_record_mac'. But unless a decryption
* failure is directly visible from the ciphertext anyway,
* we should not reveal which kind of error occured -- this
* might become visible to an attacker (e.g. via logfile) */
al
=
SSL_AD_BAD_RECORD_MAC
;
SSLerr
(
SSL_F_SSL3_GET_RECORD
,
SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
);
f_err:
ssl3_send_alert
(
s
,
SSL3_AL_FATAL
,
al
);
err:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录