diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2024-07-29 12:45:09 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2024-07-31 21:10:06 +0100 |
commit | 21397b78f9a617c22cfafbf1eebd6fc4b2ecc160 (patch) | |
tree | 956551e6aaad43577606f64e16d3036dabb3a184 /libctf/ctf-open.c | |
parent | e34b3bde885d7746e1b55a6920479a1ba83fee73 (diff) | |
download | binutils-21397b78f9a617c22cfafbf1eebd6fc4b2ecc160.zip binutils-21397b78f9a617c22cfafbf1eebd6fc4b2ecc160.tar.gz binutils-21397b78f9a617c22cfafbf1eebd6fc4b2ecc160.tar.bz2 |
libctf: fix ref leak of names of newly-inserted non-root-visible types
A bug in ctf_dtd_delete led to refs in the string table to the
names of non-root-visible types not being removed when the DTD
was. This seems harmless, but actually it would lead to a write
down a pointer into freed memory if such a type was ctf_rollback()ed
over and then the dict was serialized (updating all the refs as the
strtab was serialized in turn).
Bug introduced in commit fe4c2d55634c700ba527ac4183e05c66e9f93c62
("libctf: create: non-root-visible types should not appear in name tables")
which is included in binutils 2.35.
libctf/
* ctf-create.c (ctf_dtd_delete): Remove refs for all types
with names, not just root-visible ones.
Diffstat (limited to 'libctf/ctf-open.c')
0 files changed, 0 insertions, 0 deletions