about summary refs log tree commit diff
path: root/src/stdio/fgetc.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-03-10 13:16:59 -0400
committerRich Felker <dalias@aerifal.cx>2019-03-10 13:16:59 -0400
commit50cd02386b152bb39a1a9d1edba3fdcda7771a4c (patch)
tree2467f39c7a510226f5ee64422e33d84a8886fc0d /src/stdio/fgetc.c
parent4918b7fb0d9f3d3fd4b46be3313901fbd772064b (diff)
downloadmusl-50cd02386b152bb39a1a9d1edba3fdcda7771a4c.tar.gz
musl-50cd02386b152bb39a1a9d1edba3fdcda7771a4c.tar.xz
musl-50cd02386b152bb39a1a9d1edba3fdcda7771a4c.zip
fix invalid-/double-/use-after-free in new dlopen ctor execution
this affected the error path where dlopen successfully found and
loaded the requested dso and all its dependencies, but failed to
resolve one or more relocations, causing the operation to fail after
storage for the ctor queue was allocated.

commit 188759bbee057aa94db2bbb7cf7f5855f3b9ab53 wrongly put the free
for the ctor_queue array in the error path inside a loop over each
loaded dso that needed to be backed-out, rather than just doing it
once. in addition, the exit path also observed the ctor_queue pointer
still being nonzero, and would attempt to call ctors on the backed-out
dsos unless the double-free crashed the process first.
Diffstat (limited to 'src/stdio/fgetc.c')
0 files changed, 0 insertions, 0 deletions