aboutsummaryrefslogtreecommitdiff
path: root/scripts/cpp
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-08-19 15:48:03 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-08-19 16:12:08 +0200
commit709319f9de6f976f9feceb623cb2c96769e9d78b (patch)
treeb86ab3cc04c89312b38fdbcf6775996044ad0148 /scripts/cpp
parent586e4cd8c67df95ebb0bfecea3d007bff618d6d9 (diff)
downloadglibc-709319f9de6f976f9feceb623cb2c96769e9d78b.tar.xz
glibc-709319f9de6f976f9feceb623cb2c96769e9d78b.zip
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> (cherry picked from commit 25a5eb4010df94b412c67db9e346029de316d06b)
Diffstat (limited to 'scripts/cpp')
0 files changed, 0 insertions, 0 deletions