Skip to content
Commit 3237824f authored by Szabolcs Nagy's avatar Szabolcs Nagy
Browse files

elf: Refactor _dl_update_slotinfo to avoid use after free

map is not valid to access here because it can be freed by a concurrent
dlclose: during tls access (via __tls_get_addr) _dl_update_slotinfo is
called without holding dlopen locks. So don't check the modid of map.

The map == 0 and map != 0 code paths can be shared (avoiding the dtv
resize in case of map == 0 is just an optimization: larger dtv than
necessary would be fine too).

--
v2:
- commit message update
parent 6b63f027
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment