Skip to content

Conversation

@msantos
Copy link

@msantos msantos commented Dec 11, 2018

No description provided.

Calling into the resolver causes a segfault:

~~~
LD_PRELOAD=./libglb.so GLB_OPTIONS="--random 1234 x" ls
Segmentation fault (core dumped)
~~~

For libglb, bypass the resolver and parse the IPv4 address.
If parsing the destination list from the environment fails, the pointer
to the configuration may be freed twice: by glb_parse_dst_list() and
glb_env_parse():

~~~
$ LD_PRELOAD=./src/.libs/libglb.so GLB_OPTIONS="--random 1234 x" ls
LIBGLB:   ERROR: glb_dst.c:86: Invalid argument
Invalid destination spec: x
*** Error in `nc': double free or corruption (!prev): 0x0091c008 ***
Aborted (core dumped)
~~~

Check the return value from env_parse_options()/glb_parse_dst_list() was
not NULL before attempting to free().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant