[openssl-commits] [openssl] master update

Kurt Roeckx kurt at openssl.org
Sun Feb 19 13:00:37 UTC 2017


The branch master has been updated
       via  3aad8e18707bccaabee5f111de2db0696b45781c (commit)
      from  0837bd869b4f3c95ff78f29a05cb94c10b39d54f (commit)


- Log -----------------------------------------------------------------
commit 3aad8e18707bccaabee5f111de2db0696b45781c
Author: Kurt Roeckx <kurt at roeckx.be>
Date:   Wed Feb 15 00:36:46 2017 +0100

    Use memcmp() instead of CRYPTO_memcmp() when fuzzing
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    GH: #2633

-----------------------------------------------------------------------

Summary of changes:
 crypto/cryptlib.c | 1 +
 e_os.h            | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index 01b8ce5..f916193 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -324,6 +324,7 @@ void OPENSSL_die(const char *message, const char *file, int line)
  * pointers to volatile to not be emitted in some rare,
  * never needed in real life, pieces of code.
  */
+# undef CRYPTO_memcmp
 int CRYPTO_memcmp(const volatile void * volatile in_a,
                   const volatile void * volatile in_b,
                   size_t len)
diff --git a/e_os.h b/e_os.h
index eafa862..d2f4d3f 100644
--- a/e_os.h
+++ b/e_os.h
@@ -513,6 +513,10 @@ struct servent *getservbyname(const char *name, const char *proto);
 
 #define OSSL_NELEM(x)    (sizeof(x)/sizeof(x[0]))
 
+#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define CRYPTO_memcmp memcmp
+#endif
+
 #ifdef  __cplusplus
 }
 #endif


More information about the openssl-commits mailing list