]> git.kaiwu.me - nginx.git/commit
SSL: fixed possible use-after-free in $ssl_server_name.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 22 Aug 2017 14:36:12 +0000 (17:36 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 22 Aug 2017 14:36:12 +0000 (17:36 +0300)
commited0cc4d52308b75ab217724392994e6828af4fda
tree72a91d2bcff58902adcfb7ab344225ec33d6bef5
parent50a0f25c60bcc0fb46efcab00985c200c08c2b2f
SSL: fixed possible use-after-free in $ssl_server_name.

The $ssl_server_name variable used SSL_get_servername() result directly,
but this is not safe: it references a memory allocation in an SSL
session, and this memory might be freed at any time due to renegotiation.
Instead, copy the name to memory allocated from the pool.
src/event/ngx_event_openssl.c