BUG/MEDIUM: ssl: check OCSP calloc in ssl_sock_load_ocsp()
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 31 Jul 2020 09:43:20 +0000 (11:43 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 11 Sep 2020 08:00:27 +0000 (10:00 +0200)
commitfa5d70bc54b8f32649713ea7f9f8730de809278d
tree996a735840312f515c28f4eb0dc75821f656eddd
parent28616d973e9185e0152474bb1083145c46b90259
BUG/MEDIUM: ssl: check OCSP calloc in ssl_sock_load_ocsp()

Check the return of the calloc in ssl_sock_load_ocsp() which could lead
to a NULL dereference.

This was introduced by commit be2774d ("MEDIUM: ssl: Added support for
Multi-Cert OCSP Stapling").

Could be backported as far as 1.7.

(cherry picked from commit a560c06af7d9ba68cb0e82d1d25652b9a6a5a336)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit ea22337f040fd563b5bd5457976d90568a0b4697)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/ssl_sock.c