]> git.kaiwu.me - nginx.git/commit
OCSP: fixed use-after-free on error.
authorRoman Arutyunyan <arut@nginx.com>
Mon, 15 Jun 2020 17:17:16 +0000 (20:17 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Mon, 15 Jun 2020 17:17:16 +0000 (20:17 +0300)
commit7547581bbcb7b737710f9141260d822a08685b83
tree13e4f40768d06e8e960803f52031273cf4b68867
parent2afc050bd0e59d1ae5391c962e4c6c83120e8ebf
OCSP: fixed use-after-free on error.

When validating second and further certificates, ssl callback could be called
twice to report the error.  After the first call client connection is
terminated and its memory is released.  Prior to the second call and in it
released connection memory is accessed.

Errors triggering this behavior:
- failure to create the request
- failure to start resolving OCSP responder name
- failure to start connecting to the OCSP responder

The fix is to rearrange the code to eliminate the second call.
src/event/ngx_event_openssl_stapling.c