[PATCH v2] libdw: Fix eu_search_tree TOCTOU bugs

2025-05-19 Thread Aaron Merey
eu_tfind is used to facilitate lazy loading throughout libdw. If a result is not found via eu_tfind, work is done to load the result and cache it in an eu_search_tree. Some calls to eu_tfind allow for TOCTOU bugs. Multiple threads might race to call eu_tfind on some result that hasn't yet been ca

[PATCH v2] src/readelf.c: Access symbol and version data only if available

2025-05-19 Thread Aaron Merey
handle_dynamic_symtab can attempt to read symbol and version data from file offset of 0 or address of 0 if the associated DT_ tags aren't found. Fix this by only reading symbol and version data when non-zero file offsets/addresses have been found. https://sourceware.org/bugzilla/show_bug.cgi?id=3