summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-05-19 09:30:37 +0100
committerMatt Caswell <matt@openssl.org>2017-05-22 13:54:31 +0100
commit98d132cf6a879faf0147aa83ea0c07ff326260ed (patch)
treeb52227ae6c337aaedfda6c153794414b4989a5af /ssl/s3_enc.c
parent7ac5b84ea7920343f5c69247251bbc84ac259b2b (diff)
Add a macro for testing assertion in both debug and production builds
If we have an assert then in a debug build we want an abort() to occur. In a production build we want the function to return an error. This introduces a new macro to assist with that. The idea is to replace existing use of OPENSSL_assert() with this new macro. The problem with OPENSSL_assert() is that it aborts() on an assertion failure in both debug and production builds. It should never be a library's decision to abort a process (we don't get to decide when to kill the life support machine or the nuclear reactor control system). Additionally if an attacker can cause a reachable assert to be hit then this can be a source of DoS attacks e.g. see CVE-2017-3733, CVE-2015-0293, CVE-2011-4577 and CVE-2002-1568. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3496)
Diffstat (limited to 'ssl/s3_enc.c')
0 files changed, 0 insertions, 0 deletions