about summary refs log tree commit diff
path: root/src/dirent/telldir.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-03-14 18:51:27 -0400
committerRich Felker <dalias@aerifal.cx>2017-03-14 18:51:27 -0400
commitc49d3c8adadfa24235fcf4779bb722b1aa6f480b (patch)
tree7468c28a96271cef0c3dfa5d451594f0a0600423 /src/dirent/telldir.c
parent3ec8b3aeb88cef8574a7b0f677ebc1801f03821d (diff)
downloadmusl-c49d3c8adadfa24235fcf4779bb722b1aa6f480b.tar.gz
musl-c49d3c8adadfa24235fcf4779bb722b1aa6f480b.tar.xz
musl-c49d3c8adadfa24235fcf4779bb722b1aa6f480b.zip
avoid loading of multiple libc versions via explicit pathname
such loading is unsafe, and can happen when programs use their own
logic to locate a .so file then pass the absolute pathname to dlopen,
or if an absolute pathname ends up in DT_NEEDED headers. multiple
loads with only the base name were already precluded, provided libc
was named appropriately, by special-casing standard library names.

one function symbol (in the reserved namespace, but public, since it's
part of the crt1 entry point ABI) and one data symbol are checked.
this way we avoid likely false positives, particularly from libraries
interposing and wrapping functions. there is no hard requirement to
avoid breaking such usage, since trying to run a hook before libc is
even initialized is not a supported usage case, but it's friendlier
not to break things.
Diffstat (limited to 'src/dirent/telldir.c')
0 files changed, 0 insertions, 0 deletions