diff mbox

explicit_bzero final

Message ID e4278331-45fb-87ab-fd8b-fa015306aa33@redhat.com
State New
Headers show

Commit Message

Florian Weimer Dec. 14, 2016, 5:05 p.m. UTC
On 12/14/2016 02:15 PM, Florian Weimer wrote:
> On 12/14/2016 02:04 AM, Zack Weinberg wrote:
>> We also have a nasty interaction between internal PLT bypass and
>> ifuncs which means that a hypothetical __explicit_bzero_chk is
>> ridiculously difficult to implement.  I tried that once already and it
>> did not go well.
>
> I'm looking into this aspect right now.

This patch on top of yours implements proper explict_bzero and 
__explicit_bzero_chk symbols.  I put it through build-many-glibcs, and 
it results in the expected ABI everywhere.

The attached patch also fixes the compiler barrier, and removes some 
unnecessary conditionals from include/string.h (because we know that a 
current GCC is used for compiling glibc itself, so checking for that in 
an internal header does not make sense).

It is up to the architecture maintainers to add optimized 
implementations.  For explicit_bzero, this is often quite 
straightforward because many architectures already have an optimized 
bzero, and explicit_bzero can just be an alias.  But there is no 
__bzero_chk.  IFUNC is transitive: if something is an IFUNC, all callers 
in libc.so have to be an IFUNC, too.  Implementing __bzero_chk on top of 
__memset_chk requires a tiny bit of argument adjustment, but in 
practice, this means that all memset implementations need to be 
duplicated, and a new IFUNC resolver has to be added.

Nevertheless, I think this is the way to proceed.

Thanks,
Florian
diff mbox

Patch

diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c
index 2d72691..23e776f 100644
--- a/crypt/crypt-entry.c
+++ b/crypt/crypt-entry.c
@@ -142,15 +142,13 @@  __crypt_r (const char *key, const char *salt,
    */
   _ufc_output_conversion_r (res[0], res[1], salt, data);
 
-#ifdef _LIBC
   /*
    * Erase key-dependent intermediate data.  Data dependent only on
    * the salt is not considered sensitive.
    */
-  __explicit_bzero (ktab, sizeof (ktab));
-  __explicit_bzero (data->keysched, sizeof (data->keysched));
-  __explicit_bzero (res, sizeof (res));
-#endif
+  explicit_bzero (ktab, sizeof (ktab));
+  explicit_bzero (data->keysched, sizeof (data->keysched));
+  explicit_bzero (res, sizeof (res));
 
   return data->crypt_3_buf;
 }
diff --git a/crypt/md5-crypt.c b/crypt/md5-crypt.c
index 617ccd3..6125c7f 100644
--- a/crypt/md5-crypt.c
+++ b/crypt/md5-crypt.c
@@ -288,13 +288,13 @@  __md5_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __md5_init_ctx (&ctx);
   __md5_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   return buffer;
diff --git a/crypt/sha256-crypt.c b/crypt/sha256-crypt.c
index 53f00c0..8c670ea 100644
--- a/crypt/sha256-crypt.c
+++ b/crypt/sha256-crypt.c
@@ -371,16 +371,16 @@  __sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __sha256_init_ctx (&ctx);
   __sha256_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
-  __explicit_bzero (temp_result, sizeof (temp_result));
-  __explicit_bzero (p_bytes, key_len);
-  __explicit_bzero (s_bytes, salt_len);
+  explicit_bzero (temp_result, sizeof (temp_result));
+  explicit_bzero (p_bytes, key_len);
+  explicit_bzero (s_bytes, salt_len);
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   free (free_pbytes);
diff --git a/crypt/sha512-crypt.c b/crypt/sha512-crypt.c
index 86b6354..dac145b 100644
--- a/crypt/sha512-crypt.c
+++ b/crypt/sha512-crypt.c
@@ -393,16 +393,16 @@  __sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __sha512_init_ctx (&ctx);
   __sha512_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
-  __explicit_bzero (temp_result, sizeof (temp_result));
-  __explicit_bzero (p_bytes, key_len);
-  __explicit_bzero (s_bytes, salt_len);
+  explicit_bzero (temp_result, sizeof (temp_result));
+  explicit_bzero (p_bytes, key_len);
+  explicit_bzero (s_bytes, salt_len);
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   free (free_pbytes);
diff --git a/debug/Makefile b/debug/Makefile
index 6b5f31e..84d3f92 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -48,6 +48,7 @@  routines  = backtrace backtracesyms backtracesymsfd noophooks \
 	    vdprintf_chk obprintf_chk \
 	    longjmp_chk ____longjmp_chk \
 	    fdelt_chk poll_chk ppoll_chk \
+	    explicit_bzero_chk \
 	    stack_chk_fail fortify_fail \
 	    $(static-only-routines)
 static-only-routines := warning-nop stack_chk_fail_local
diff --git a/debug/Versions b/debug/Versions
index 0482c85..a6628db 100644
--- a/debug/Versions
+++ b/debug/Versions
@@ -55,6 +55,9 @@  libc {
   GLIBC_2.16 {
     __poll_chk; __ppoll_chk;
   }
+  GLIBC_2.25 {
+    __explicit_bzero_chk;
+  }
   GLIBC_PRIVATE {
     __fortify_fail;
   }
diff --git a/debug/explicit_bzero_chk.c b/debug/explicit_bzero_chk.c
new file mode 100644
index 0000000..2e507f8
--- /dev/null
+++ b/debug/explicit_bzero_chk.c
@@ -0,0 +1,44 @@ 
+/* Generic implementation of __explicit_bzero_chk.
+   Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Torbjorn Granlund (tege@sics.se).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* This is the generic definition of __explicit_bzero_chk.  The
+   __explicit_bzero_chk symbol is used as the implementation of
+   explicit_bzero throughout glibc.  If this file is overriden by an
+   architecture, both __explicit_bzero_chk and
+   __explicit_bzero_chk_internal have to be defined (the latter not as
+   an IFUNC).  */
+
+#include <string.h>
+
+void
+__explicit_bzero_chk (void *dst, size_t len, size_t dstlen)
+{
+  /* Inline __memset_chk to avoid a PLT reference to __memset_chk.  */
+  if (__glibc_unlikely (dstlen < len))
+    __chk_fail ();
+  memset (dst, '\0', len);
+  /* Compiler barrier.  */
+  asm volatile ("" ::: "memory");
+}
+
+/* libc-internal references use the hidden
+   __explicit_bzero_chk_internal symbol.  This is necessary if
+   __explicit_bzero_chk is implemented as an IFUNC because some
+   targets do not support hidden references to IFUNC symbols.  */
+strong_alias (__explicit_bzero_chk, __explicit_bzero_chk_internal)
diff --git a/include/string.h b/include/string.h
index 56d02de..300a2e2 100644
--- a/include/string.h
+++ b/include/string.h
@@ -100,20 +100,15 @@  extern __typeof (memmem) __memmem;
 libc_hidden_proto (__memmem)
 libc_hidden_proto (__ffs)
 
-/* explicit_bzero is used in libcrypt.  */
-extern __typeof (explicit_bzero) __explicit_bzero;
-extern __typeof (explicit_bzero) __internal_explicit_bzero;
-libc_hidden_proto (__internal_explicit_bzero)
-extern __typeof (__glibc_read_memory) __internal_glibc_read_memory;
-libc_hidden_proto (__internal_glibc_read_memory)
-/* Honor string.h inlines when present.  */
-#if __GNUC_PREREQ (3,4)							\
-  && ((defined __extern_always_inline					\
-       && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__		\
-       && !defined __NO_INLINE__ && !defined __NO_STRING_INLINES)	\
-      || (__USE_FORTIFY_LEVEL > 0 && defined __fortify_function))
-# define __explicit_bzero(s,n) explicit_bzero (s,n)
-# define __internal_explicit_bzero(s,n) explicit_bzero (s,n)
+#if IS_IN (libc)
+/* Avoid hidden reference to IFUNC symbol __explicit_bzero_chk.  */
+void __explicit_bzero_chk_internal (void *, size_t, size_t)
+  __THROW __nonnull ((1)) attribute_hidden;
+# define explicit_bzero(buf, len) \
+  __explicit_bzero_chk_internal (buf, len, __bos0 (buf))
+#elif !IS_IN (nonlib)
+void __explicit_bzero_chk (void *, size_t, size_t) __THROW __nonnull ((1));
+# define explicit_bzero(buf, len) __explicit_bzero_chk (buf, len, __bos0 (buf))
 #endif
 
 libc_hidden_builtin_proto (memchr)
diff --git a/string/Makefile b/string/Makefile
index 0b6486e..9a8b46d 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -43,11 +43,6 @@  routines	:= strcat strchr strcmp strcoll strcpy strcspn		\
 		   strcoll_l strxfrm_l string-inlines memrchr		\
 		   xpg-strerror strerror_l explicit_bzero
 
-# Attention future hackers trying to enable link-time optimization for
-# glibc: this file *must not* be subject to LTO.  It is added separately
-# to 'routines' to document this.  See comments in this file for details.
-routines	+= read_memory
-
 strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
diff --git a/string/Versions b/string/Versions
index 73bb1cb..9b709d1 100644
--- a/string/Versions
+++ b/string/Versions
@@ -83,14 +83,6 @@  libc {
   GLIBC_2.24 {
   }
   GLIBC_2.25 {
-    # used by inlines in string.h and bits/string3.h
-    __glibc_read_memory;
-
-    # e*
     explicit_bzero;
   }
-  GLIBC_PRIVATE {
-    # used by libcrypt
-    __explicit_bzero;
-  }
 }
diff --git a/string/bits/string3.h b/string/bits/string3.h
index c1fcbd9..940c8d8 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -103,11 +103,13 @@  __NTH (bzero (void *__dest, size_t __len))
   (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
 }
 
+void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
+  __THROW __nonnull ((1));
+
 __fortify_function void
 __NTH (explicit_bzero (void *__dest, size_t __len))
 {
-  (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
-  __glibc_read_memory (__dest, __len);
+  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
 }
 #endif
 
diff --git a/string/explicit_bzero.c b/string/explicit_bzero.c
index 571595d..6712cad 100644
--- a/string/explicit_bzero.c
+++ b/string/explicit_bzero.c
@@ -1,4 +1,4 @@ 
-/* Erasure of sensitive data.
+/* Erasure of sensitive data, generic implementation.
    Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -16,19 +16,23 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <features.h>
-#undef __USE_STRING_INLINES
-#define __NO_STRING_INLINES
+/* An assembler implementation of explicit_bzero can be created as an
+   assembler alias of an optimized bzero implementation.
+   Architecture-specific implementations also need to define
+   __explicit_bzero_chk.  */
+
 #include <string.h>
 
+/* glibc-internal users use __explicit_bzero_chk, and explicit_bzero
+   redirects to that.  */
+#undef explicit_bzero
+
 /* Set LEN bytes of S to 0.  The compiler will not delete a call to
    this function, even if S is dead after the call.  */
 void
-__internal_explicit_bzero (void *s, size_t len)
+explicit_bzero (void *s, size_t len)
 {
   memset (s, '\0', len);
-  __internal_glibc_read_memory (s, len);
+  /* Compiler barrier.  */
+  asm volatile ("" ::: "memory");
 }
-libc_hidden_def (__internal_explicit_bzero)
-strong_alias (__internal_explicit_bzero, __explicit_bzero)
-weak_alias (__internal_explicit_bzero, explicit_bzero)
diff --git a/string/read_memory.c b/string/read_memory.c
deleted file mode 100644
index 8e08a46..0000000
--- a/string/read_memory.c
+++ /dev/null
@@ -1,47 +0,0 @@ 
-/* "Read" a range of memory, from the caller's perspective.
-   Copyright (C) 2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* This function is an optimization fence.  It doesn't do anything,
-   but the compiler doesn't know that, and must assume that it reads
-   the block of memory pointed to by S and extending for LEN bytes.
-   This prevents any earlier write to that memory from being optimized
-   away.  For instance, explicit_bzero uses this function to ensure
-   that its erasure of a piece of sensitive data is preserved.
-
-   In order to achieve the desired effect, this function must never,
-   under any circumstances, be inlined or subjected to inter-
-   procedural optimization.  string.h declares this function with
-   attributes that, in conjunction with the no-op asm insert, are
-   sufficient to prevent problems in the current (2016) generation of
-   compilers, but *only if* this file is *not* compiled with -flto.
-   At present, this is not an issue since glibc is never compiled with
-   -flto, but should that ever change, this file must be excepted.
-
-   The 'volatile' below is technically not necessary but is included
-   for explicitness.  */
-
-void
-internal_function
-__internal_glibc_read_memory(const void *s, size_t len)
-{
-  asm volatile ("");
-}
-libc_hidden_def (__internal_glibc_read_memory)
-strong_alias (__internal_glibc_read_memory, __glibc_read_memory)
diff --git a/string/string.h b/string/string.h
index 1ef3310..c398569 100644
--- a/string/string.h
+++ b/string/string.h
@@ -457,24 +457,6 @@  extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
    function, even if S is dead after the call.  */
 extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1));
 
-/* Optimization fence, used by the inline versions of explicit_bzero
-   below and in bits/string3.h.  */
-extern void __glibc_read_memory (const void *__s, size_t __n)
-     __THROW __nonnull ((1)) __attribute_noinline__;
-
-# if __GNUC_PREREQ (3,4) && defined __extern_always_inline	\
-  && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__		\
-  && !defined __NO_INLINE__ && !defined __NO_STRING_INLINES	\
-  && (__USE_FORTIFY_LEVEL == 0 || !defined __fortify_function)
-
-__extern_always_inline void
-__NTH (explicit_bzero (void *__s, size_t __n))
-{
-  memset (__s, '\0', __n);
-  __glibc_read_memory (__s, __n);
-}
-# endif
-
 /* Compare N bytes of S1 and S2 (same as memcmp).  */
 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
      __THROW __attribute_pure__ __nonnull ((1, 2));
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index a777432..312857e 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -36,10 +36,7 @@ 
    This implementation instead uses the <ucontext.h> coroutine
    interface.  The coroutine stack is still too small to safely use
    printf, but we know the OS won't erase it, so we can do all the
-   checks and printing from the normal stack.
-
-   If this test begins to fail with a new compiler, investigate
-   whether __glibc_read_memory is still doing its job.  */
+   checks and printing from the normal stack.  */
 
 #define _GNU_SOURCE 1
 
diff --git a/sysdeps/arm/nacl/libc.abilist b/sysdeps/arm/nacl/libc.abilist
index 8583317..abd70c8 100644
--- a/sysdeps/arm/nacl/libc.abilist
+++ b/sysdeps/arm/nacl/libc.abilist
@@ -1843,7 +1843,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index e5bdd21..58d768c 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2090,7 +2090,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 693a972..906050d 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2001,7 +2001,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/arm/libc.abilist b/sysdeps/unix/sysv/linux/arm/libc.abilist
index 51b2172..66112dd 100644
--- a/sysdeps/unix/sysv/linux/arm/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libc.abilist
@@ -91,7 +91,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index da8d858..3ddadd2 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -1855,7 +1855,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index ea34f48..977ab90 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2013,7 +2013,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index df0e999..c7edb9a 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1877,7 +1877,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index f5fda48..450be4e 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -92,7 +92,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 1e5ce20..9e016bd 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -1969,7 +1969,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/microblaze/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
index 4a2b238..1a455be 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
@@ -2090,7 +2090,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index a48d869..8eb5e66 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -1944,7 +1944,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index de591fc..416d9ac 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -1942,7 +1942,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 673393b..f4949e5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -1940,7 +1940,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index cfc03d9..c7375ae 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -1935,7 +1935,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 58d148d..724a0e3 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2131,7 +2131,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 4d6efdd..2dc32b6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -1973,7 +1973,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index a0f8608..5658109 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -1978,7 +1978,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
index a097b1c..c761221 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
@@ -2178,7 +2178,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
index 0e7fac1..265c769 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
@@ -92,7 +92,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index ad93e22..ed1b6bf 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -1973,7 +1973,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 7b53df3..2e75d29 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1874,7 +1874,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sh/libc.abilist b/sysdeps/unix/sysv/linux/sh/libc.abilist
index 425ae6c..bd74c0c 100644
--- a/sysdeps/unix/sysv/linux/sh/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libc.abilist
@@ -1859,7 +1859,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index cad6a47..5584838 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -1965,7 +1965,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 55c0ea6..efedbe2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1903,7 +1903,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
index b95c3d4..ffd988a 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
index 6fde0c4..f0c13ce 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
index b95c3d4..ffd988a 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 1f77aad..f57004c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1854,7 +1854,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index f528b85..05629e1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F