[PATCHv5][PING^3][BZ #17833] _dl_close_worker() does not release inconsistent objects.

Andreas Schwab schwab@suse.de
Thu Aug 6 14:12:00 GMT 2015


Pavel Kopyl <p.kopyl@samsung.com> writes:

> @@ -152,6 +152,10 @@ _dl_close_worker (struct link_map *map)
>        l->l_idx = idx;
>        maps[idx] = l;
>        ++idx;
> +
> +      /* clear DF_1_NODELETE to force object deletion.  */
> +      if (force)
> +	l->l_flags_1 &= ~DF_1_NODELETE;

This is a very bad idea.  It can cause libpthread to be unloaded, which
will crash ld.so on the next __rtld_lock_unlock.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



More information about the Libc-alpha mailing list