[PATCH] Fix invalid free of memory allocated during rtld init
Dmitry V. Levin
ldv@altlinux.org
Wed Jan 30 16:44:00 GMT 2013
On Tue, Jan 15, 2013 at 05:04:43PM +0100, Andreas Schwab wrote:
> Any memory allocated during rtld init cannot be freed.
>
> Andreas.
>
> [BZ #14293]
> * elf/dl-load.c (_dl_init_paths): Mark decomposed RUNPATH as
> non-freeable.
>
> diff --git a/elf/dl-load.c b/elf/dl-load.c
> index 6e65980..a3aab8a 100644
> --- a/elf/dl-load.c
> +++ b/elf/dl-load.c
> @@ -797,6 +797,7 @@ _dl_init_paths (const char *llp)
> (const void *) (D_PTR (l, l_info[DT_STRTAB])
> + l->l_info[DT_RUNPATH]->d_un.d_val),
> l, "RUNPATH");
> + l->l_runpath_dirs.malloced = 0;
>
> /* The RPATH is ignored. */
> l->l_rpath_dirs.dirs = (void *) -1;
The fix is correct.
Could you also apply it to 2.17 and 2.16 branches, please?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130130/00862780/attachment.sig>
More information about the Libc-alpha
mailing list