]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: ssl: missing tests in ACL fetch functions
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Sep 2012 21:56:58 +0000 (23:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 15 Sep 2012 06:57:46 +0000 (08:57 +0200)
commit3e394c903f156ab2bcf731df39c4e6e74df3b6b4
treeea02c1695f87000cffc017bb7108451f06cc0bd6
parentaeff252dcac84a82d1688e8ac3d00dad85ca4a50
BUG/MAJOR: ssl: missing tests in ACL fetch functions

Baptiste Assmann observed a crash of 1.5-dev12 occuring when the ssl_sni
fetch was used with no SNI on the input connection and without a prior
has_sni check. A code review revealed several issues :
   1) it was possible to call the has_sni and ssl_sni fetch functions with
      a NULL data_ctx if the handshake fails or if the connection is aborted
      during the handshake.
   2) when no SNI is present, strlen() was called with a NULL parameter in
      smp_fetch_ssl_sni().
src/ssl_sock.c