[openssl] OpenSSL_1_1_1-stable update

kaduk at mit.edu kaduk at mit.edu
Wed Dec 30 23:43:11 UTC 2020


The branch OpenSSL_1_1_1-stable has been updated
       via  9be10637502bf32189055dff8d3442e140e845c5 (commit)
      from  64a1b940d2b640e5edf0feae90e81bbb6b4941e7 (commit)


- Log -----------------------------------------------------------------
commit 9be10637502bf32189055dff8d3442e140e845c5
Author: David Carlier <devnexen at gmail.com>
Date:   Tue Dec 8 17:43:10 2020 +0000

    CRYPTO_secure_malloc_init: BSD support improvements.
    
    Backport of #13394
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    Reviewed-by: Ben Kaduk <kaduk at mit.edu>
    (Merged from https://github.com/openssl/openssl/pull/13637)

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

Summary of changes:
 crypto/mem_sec.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index b5f959ba15..222c786cba 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -34,6 +34,12 @@
 #   include <errno.h>
 #  endif
 # endif
+# if defined(__FreeBSD__)
+#  define MADV_DONTDUMP MADV_NOCORE
+# endif
+# if !defined(MAP_CONCEAL)
+#  define MAP_CONCEAL 0
+# endif
 # include <sys/param.h>
 # include <sys/stat.h>
 # include <fcntl.h>
@@ -442,7 +448,7 @@ static int sh_init(size_t size, int minsize)
     if (1) {
 #ifdef MAP_ANON
         sh.map_result = mmap(NULL, sh.map_size,
-                             PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
+                             PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_CONCEAL, -1, 0);
     } else {
 #endif
         int fd;


More information about the openssl-commits mailing list