Welcome! Log In Create A New Profile

Advanced

[nginx] SSL: fixed unlocked access to sess_id->len.

September 27, 2018 06:44AM
details: http://hg.nginx.org/nginx/rev/cd4fa2fab8d8
branches:
changeset: 7365:cd4fa2fab8d8
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Sep 25 14:07:59 2018 +0300
description:
SSL: fixed unlocked access to sess_id->len.

diffstat:

src/event/ngx_event_openssl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 5fa22beeaf11 -r cd4fa2fab8d8 src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Thu Sep 27 13:05:39 2018 +0300
+++ b/src/event/ngx_event_openssl.c Tue Sep 25 14:07:59 2018 +0300
@@ -3146,6 +3146,7 @@ ngx_ssl_get_cached_session(ngx_ssl_conn_
const
#endif
u_char *p;
+ size_t slen;
uint32_t hash;
ngx_int_t rc;
ngx_shm_zone_t *shm_zone;
@@ -3201,12 +3202,14 @@ ngx_ssl_get_cached_session(ngx_ssl_conn_
if (rc == 0) {

if (sess_id->expire > ngx_time()) {
- ngx_memcpy(buf, sess_id->session, sess_id->len);
+ slen = sess_id->len;
+
+ ngx_memcpy(buf, sess_id->session, slen);

ngx_shmtx_unlock(&shpool->mutex);

p = buf;
- sess = d2i_SSL_SESSION(NULL, &p, sess_id->len);
+ sess = d2i_SSL_SESSION(NULL, &p, slen);

return sess;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] SSL: fixed unlocked access to sess_id->len.

ru@nginx.com 181 September 27, 2018 06:44AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 124
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready