This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix segfault in maybe_script_execute.


On Sep 06 2018, Stefan Liebler <stli@linux.ibm.com> wrote:

> commit 03a8c686eab8e12b4c478e7606963db6a72f6f0e
> Author: Stefan Liebler <stli@linux.ibm.com>
> Date:   Thu Sep 6 12:27:38 2018 +0200
>
>     Fix segfault in maybe_script_execute.
>     
>     If glibc is built with gcc 8 and -march=z900,
>     the testcase posix/tst-spawn4-compat crashes with a segfault.
>     
>     In function maybe_script_execute, the new_argv array is dynamically
>     initialized on stack with (argc + 1) elements.
>     The function wants to add _PATH_BSHELL as the first argument
>     and writes out of bounds of new_argv.
>     There is an off-by-one because maybe_script_execute fails to count
>     the terminating NULL when sizing new_argv.
>     
>     ChangeLog:
>     
>             * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
>             Increment size of new_argv by one.

Ok, thanks.

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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]