glibc/string
Florian Weimer 25a5eb4010 string: strerror, strsignal cannot use buffer after dlmopen (bug 32026)
Secondary namespaces have a different malloc.  Allocating the
buffer in one namespace and freeing it another results in
heap corruption.  Fix this by using a static string (potentially
translated) in secondary namespaces.  It would also be possible
to use the malloc from the initial namespace to manage the
buffer, but these functions would still not be safe to use in
auditors etc. because a call to strerror could still free a
buffer while it is used by the application.  Another approach
could use proper initial-exec TLS, duplicated in secondary
namespaces, but that would need a callback interface for freeing
libc resources in namespaces on thread exit, which does not exist
today.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-08-19 15:48:03 +02:00
..
bits string: Improve fortify with clang 2024-02-27 10:52:58 -03:00
_strerror.c
argz-addsep.c
argz-append.c
argz-count.c
argz-create.c
argz-ctsep.c
argz-delete.c
argz-extract.c
argz-insert.c
argz-next.c
argz-replace.c
argz-stringify.c
argz.h
basename.c
bcopy.c
bug-envz1.c
bug-strcoll1.c
bug-strcoll2.c
bug-strncat1.c
bug-strpbrk1.c
bug-strspn1.c
bug-strtok1.c
byteswap.h
bzero.c
Depend
endian.h
envz.c
envz.h
explicit_bzero.c
ffs.c
ffsll.c
inl-tester.c
Makefile Enhanced test coverage for strncmp, wcsncmp 2024-08-01 09:08:32 +02:00
memccpy.c
memchr.c
memcmp.c
memcmpeq.c
memcpy.c
memfrob.c
memmem.c
memmove.c
memory.h
mempcpy.c
memrchr.c
memset.c
noinl-tester.c
rawmemchr.c
sigabbrev_np.c
sigdescr_np.c
stpcpy.c
stpncpy.c
str-two-way.h
stratcliff.c
strcasecmp_l.c
strcasecmp.c
strcasestr.c
strcat.c
strchr.c
strchrnul.c
strcmp.c
strcoll_l.c
strcoll.c
strcpy.c
strcspn.c
strdup.c
strerror_l.c string: strerror, strsignal cannot use buffer after dlmopen (bug 32026) 2024-08-19 15:48:03 +02:00
strerror.c
strerrordesc_np.c
strerrorname_np.c
strfry.c
string-inlines.c
string.h
strings.h
strlcat.c
strlcpy.c
strlen.c
strncase_l.c
strncase.c
strncat.c
strncmp.c
strncpy.c
strndup.c
strnlen.c
strpbrk.c
strrchr.c
strsep.c
strsignal.c string: strerror, strsignal cannot use buffer after dlmopen (bug 32026) 2024-08-19 15:48:03 +02:00
strspn.c
strstr.c
strtok_r.c
strtok.c
strverscmp.c
strxfrm_l.c
strxfrm.c
swab.c
test-bcopy.c
test-bzero.c
test-endian-file-scope.c
test-endian-sign-conversion.c
test-endian-types.c
test-explicit_bzero.c
test-ffs.c
test-memccpy.c
test-memchr.c
test-memcmp.c
test-memcmpeq.c
test-memcpy-large.c
test-memcpy-support.h
test-memcpy.c
test-memmem.c
test-memmove.c
test-mempcpy.c
test-memrchr.c
test-memset.c
test-memswap.c
test-rawmemchr.c
test-sig_np.c
test-stpcpy.c
test-stpncpy.c
test-strcasecmp.c
test-strcasestr.c
test-strcat.c
test-strchr.c x86: Fix bug in strchrnul-evex512 [BZ #32078] 2024-08-15 08:11:33 -07:00
test-strchrnul.c
test-strcmp.c
test-strcpy.c
test-strcspn.c
test-strdup.c
test-strerror-errno.c
test-string.h
test-strlen.c
test-strncasecmp.c
test-strncat.c
test-strncmp-nonarray.c Enhanced test coverage for strncmp, wcsncmp 2024-08-01 09:08:32 +02:00
test-strncmp.c
test-strncpy.c
test-strndup.c
test-strnlen-nonarray.c Enhance test coverage for strnlen, wcsnlen 2024-08-01 09:07:34 +02:00
test-strnlen.c
test-strpbrk.c
test-strrchr.c
test-strspn.c
test-strstr.c wcsmbs: Ensure wcstr worst-case linear execution time (BZ 23865) 2024-04-11 14:21:32 -03:00
test-Xncmp-nonarray.c Enhanced test coverage for strncmp, wcsncmp 2024-08-01 09:08:32 +02:00
test-Xnlen-nonarray.c Enhance test coverage for strnlen, wcsnlen 2024-08-01 09:07:34 +02:00
testcopy.c
tester.c
tst-bswap.c
tst-cmp.c
tst-endian.c
tst-inlcall.c
tst-memmove-overflow.c
tst-strcoll-overflow.c
tst-strerror-fail.c
tst-strerror.c
tst-strfry.c
tst-strlcat2.c Fix stringop-overflow warning in tst-strlcat2. 2024-02-05 15:04:26 +01:00
tst-strlcat.c
tst-strlcpy2.c
tst-strlcpy.c
tst-strlen.c
tst-strsignal.c
tst-strtok_r.c
tst-strtok.c
tst-strxfrm2.c
tst-strxfrm.c
tst-svc2.c
tst-svc.c
tst-svc.expect
tst-svc.input
tst-xbzero-opt.c
Versions
wordcopy.c
xpg-strerror.c