mirror of https://github.com/openresty/openresty
master
1.19.9.x
1.21.4.x
1.25.3.x
cve
ngx-http-redis
v24.2
bump-1.21.4.2
rel
close_fd
1.19.3.x
1.17.8.x
1.15.8.x
nginx-1.13.8
v1.15.8.2
v0.8.54.3
v0.8.54.4
v0.8.54.5
v0.8.54.6
v0.8.54.8
v0.8.54.9
v1.0.10.1
v1.0.10.11
v1.0.10.13
v1.0.10.15
v1.0.10.17
v1.0.10.19
v1.0.10.21
v1.0.10.23
v1.0.10.24
v1.0.10.25
v1.0.10.27
v1.0.10.29
v1.0.10.3
v1.0.10.31
v1.0.10.33
v1.0.10.35
v1.0.10.41
v1.0.10.43
v1.0.10.44
v1.0.10.45
v1.0.10.47
v1.0.10.48
v1.0.10.5
v1.0.10.7
v1.0.10.9
v1.0.11.11
v1.0.11.15
v1.0.11.17
v1.0.11.19
v1.0.11.21
v1.0.11.23
v1.0.11.25
v1.0.11.27
v1.0.11.28
v1.0.11.3
v1.0.11.7
v1.0.11.9
v1.0.15.1
v1.0.15.10
v1.0.15.11
v1.0.15.3
v1.0.15.5
v1.0.15.7
v1.0.15.9
v1.0.4.0
v1.0.4.1
v1.0.4.2
v1.0.5.0
v1.0.5.1
v1.0.6.22
v1.0.6.3
v1.0.6.5
v1.0.8.1
v1.0.8.11
v1.0.8.13
v1.0.8.15
v1.0.8.17
v1.0.8.19
v1.0.8.21
v1.0.8.26
v1.0.8.3
v1.0.8.5
v1.0.8.7
v1.0.8.9
v1.0.9.1
v1.0.9.10
v1.0.9.3
v1.0.9.5
v1.0.9.7
v1.0.9.9
v1.1.12.3
v1.1.12.4
v1.1.12.5
v1.1.13.1
v1.11.2.1
v1.11.2.2
v1.11.2.3
v1.11.2.4
v1.11.2.5
v1.13.6.1
v1.13.6.2
v1.15.8.1
v1.15.8.1rc1
v1.15.8.1rc2
v1.15.8.3
v1.17.8.1
v1.17.8.1rc1
v1.17.8.2
v1.19.3.1
v1.19.3.1rc0
v1.19.3.1rc1
v1.19.3.2
v1.19.9.1
v1.19.9.1rc1
v1.19.9.2
v1.2.1.1
v1.2.1.11
v1.2.1.13
v1.2.1.14
v1.2.1.3
v1.2.1.5
v1.2.1.7
v1.2.1.9
v1.2.3.1
v1.2.3.3
v1.2.3.5
v1.2.3.7
v1.2.3.8
v1.2.4.1
v1.2.4.11
v1.2.4.13
v1.2.4.14
v1.2.4.3
v1.2.4.5
v1.2.4.7
v1.2.4.9
v1.2.6.1
v1.2.6.3
v1.2.6.5
v1.2.6.6
v1.2.7.1
v1.2.7.3
v1.2.7.5
v1.2.7.6
v1.2.7.8
v1.2.8.1
v1.2.8.3
v1.2.8.5
v1.2.8.6
v1.21.4.1
v1.21.4.1rc1
v1.21.4.1rc2
v1.21.4.1rc3
v1.21.4.2
v1.21.4.2rc1
v1.21.4.3
v1.21.4.4
v1.25.3.1
v1.25.3.2
v1.27.1.1
v1.4.1.1
v1.4.1.3
v1.4.2.1
v1.4.2.3
v1.4.2.5
v1.4.2.7
v1.4.2.8
v1.4.2.9
v1.4.3.1
v1.4.3.3
v1.4.3.4
v1.4.3.6
v1.4.3.7
v1.4.3.9
v1.5.11.1
v1.5.12.1
v1.5.8.1
v1.7.0.1
v1.7.10.1
v1.7.10.2
v1.7.2.1
v1.7.4.1
v1.7.7.1
v1.7.7.2
v1.9.15.1
v1.9.3.1
v1.9.3.1rc1
v1.9.3.2
v1.9.7.1
v1.9.7.2
v1.9.7.3
v1.9.7.4
v1.9.7.5
${ noResults }
2 Commits (bae27d3effa2944188bc7e555258699519ebb2e0)
Author | SHA1 | Message | Date |
---|---|---|---|
Thibault Charbonnier | c1a0a9ad8f |
bugfix: fixed a memory leak in the OpenSSL 1.1.1 sess_set_get_cb_yield patch.
This memory leak was found by running the Valgrind testing mode against lua-resty-core's `ssl-session-fetch.t` test suite: TEST 5: yield during doing handshake with client which uses low version OpenSSL ==16956== 64 (32 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 15 ==16956== at 0x4C2B002: malloc (vg_replace_malloc.c:298) ==16956== by 0x5FFC868: CRYPTO_malloc (mem.c:222) ==16956== by 0x5FFC96F: CRYPTO_zalloc (mem.c:230) ==16956== by 0x603C54A: OPENSSL_sk_new_reserve (stack.c:209) ==16956== by 0x603C597: OPENSSL_sk_new_null (stack.c:118) ==16956== by 0x5C94A86: sk_SSL_CIPHER_new_null (ssl.h:960) ==16956== by 0x5C94A86: bytes_to_cipher_list (ssl_lib.c:5361) ==16956== by 0x5CB52E9: tls_early_post_process_client_hello (statem_srvr.c:1713) ==16956== by 0x5CB52E9: tls_post_process_client_hello (statem_srvr.c:2231) ==16956== by 0x5CB6F39: ossl_statem_server_post_process_message (statem_srvr.c:1218) ==16956== by 0x5CA4C11: read_state_machine (statem.c:664) ==16956== by 0x5CA4C11: state_machine (statem.c:434) ==16956== by 0x5CA538A: ossl_statem_accept (statem.c:255) ==16956== by 0x5C91759: SSL_do_handshake (ssl_lib.c:3609) ==16956== by 0x45456B: ngx_ssl_handshake (ngx_event_openssl.c:1606) ==16956== by 0x4698D3: ngx_http_ssl_handshake (ngx_http_request.c:751) ==16956== by 0x44ECA8: ngx_epoll_process_events (ngx_epoll_module.c:901) ==16956== by 0x443E94: ngx_process_events_and_timers (ngx_event.c:257) ==16956== by 0x44DC25: ngx_single_process_cycle (ngx_process_cycle.c:333) ==16956== by 0x4236AB: main (nginx.c:382) ==16956== { <insert_a_suppression_name_here> Memcheck:Leak match-leak-kinds: definite fun:malloc fun:CRYPTO_malloc fun:CRYPTO_zalloc fun:OPENSSL_sk_new_reserve fun:OPENSSL_sk_new_null fun:sk_SSL_CIPHER_new_null fun:bytes_to_cipher_list fun:tls_early_post_process_client_hello fun:tls_post_process_client_hello fun:ossl_statem_server_post_process_message fun:read_state_machine fun:state_machine fun:ossl_statem_accept fun:SSL_do_handshake fun:ngx_ssl_handshake fun:ngx_http_ssl_handshake fun:ngx_epoll_process_events fun:ngx_process_events_and_timers fun:ngx_single_process_cycle fun:main } ==16956== 368 (32 direct, 336 indirect) bytes in 1 blocks are definitely lost in loss record 8 of 15 ==16956== at 0x4C2B002: malloc (vg_replace_malloc.c:298) ==16956== by 0x5FFC868: CRYPTO_malloc (mem.c:222) ==16956== by 0x5FFC96F: CRYPTO_zalloc (mem.c:230) ==16956== by 0x603C54A: OPENSSL_sk_new_reserve (stack.c:209) ==16956== by 0x603C597: OPENSSL_sk_new_null (stack.c:118) ==16956== by 0x5C94A79: sk_SSL_CIPHER_new_null (ssl.h:960) ==16956== by 0x5C94A79: bytes_to_cipher_list (ssl_lib.c:5360) ==16956== by 0x5CB52E9: tls_early_post_process_client_hello (statem_srvr.c:1713) ==16956== by 0x5CB52E9: tls_post_process_client_hello (statem_srvr.c:2231) ==16956== by 0x5CB6F39: ossl_statem_server_post_process_message (statem_srvr.c:1218) ==16956== by 0x5CA4C11: read_state_machine (statem.c:664) ==16956== by 0x5CA4C11: state_machine (statem.c:434) ==16956== by 0x5CA538A: ossl_statem_accept (statem.c:255) ==16956== by 0x5C91759: SSL_do_handshake (ssl_lib.c:3609) ==16956== by 0x45456B: ngx_ssl_handshake (ngx_event_openssl.c:1606) ==16956== by 0x4698D3: ngx_http_ssl_handshake (ngx_http_request.c:751) ==16956== by 0x44ECA8: ngx_epoll_process_events (ngx_epoll_module.c:901) ==16956== by 0x443E94: ngx_process_events_and_timers (ngx_event.c:257) ==16956== by 0x44DC25: ngx_single_process_cycle (ngx_process_cycle.c:333) ==16956== by 0x4236AB: main (nginx.c:382) ==16956== { <insert_a_suppression_name_here> Memcheck:Leak match-leak-kinds: definite fun:malloc fun:CRYPTO_malloc fun:CRYPTO_zalloc fun:OPENSSL_sk_new_reserve fun:OPENSSL_sk_new_null fun:sk_SSL_CIPHER_new_null fun:bytes_to_cipher_list fun:tls_early_post_process_client_hello fun:tls_post_process_client_hello fun:ossl_statem_server_post_process_message fun:read_state_machine fun:state_machine fun:ossl_statem_accept fun:SSL_do_handshake fun:ngx_ssl_handshake fun:ngx_http_ssl_handshake fun:ngx_epoll_process_events fun:ngx_process_events_and_timers fun:ngx_single_process_cycle fun:main } |
5 years ago |
spacewander | 2e480157a3 |
feature: supported OpenSSL 1.1.1 by upgrading the OpenSSL patch.
Previously, we used the OpenSSL 1.1.1 ClientHello callback to do ssl
session fetching non-blockingly. However, this way cannot handle an edge
case: the ssl session resumption via session ticket might fail, and the
client fallbacks to session ID resumption. The ClientHello callback is
run too early to know if the client will fallback to use session ID
resumption.
Therefore, we have to take back the OpenSSL sess_set_get_cb_yield patch
and upgrade it to adapt OpenSSL 1.1.1.
Thanks Yongjian Xu and crasyangel for their help.
See
|
5 years ago |