mirror of
git://git.musl-libc.org/musl
synced 2024-12-18 21:05:13 +00:00
193338e619
since slack space at the beginning and/or end of writable load maps is donated to malloc, the application could obtain valid pointers in these ranges which dladdr would erroneously identify as part of the shared object whose mapping they came from. instead of checking the queried address against the mapping base and length, check it against the load segments from the program headers, and only match the dso if it lies within the bounds of one of them. as a shortcut, if the address does match the range of the mapping but not any of the load segments, we know it cannot match any other dso and can immediately return failure. |
||
---|---|---|
.. | ||
dlstart.c | ||
dynlink.c |