diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-08-19 15:48:03 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-08-19 16:11:19 +0200 |
commit | e73fd06b7f12d6ddaae4f91f9c5088a621a82ce4 (patch) | |
tree | ce02ebc04b705e2efbb5f66a29773aa902b4007f /nptl/pthread_cleanup_upto.c | |
parent | 37c2aa4eaa0adc4193bc0e1f520b677ad30c9e4d (diff) | |
download | glibc-release/2.39/master.tar.gz glibc-release/2.39/master.tar.xz glibc-release/2.39/master.zip |
string: strerror, strsignal cannot use buffer after dlmopen (bug 32026) release/2.39/master
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> (cherry picked from commit 25a5eb4010df94b412c67db9e346029de316d06b)
Diffstat (limited to 'nptl/pthread_cleanup_upto.c')
0 files changed, 0 insertions, 0 deletions