public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix segfault in maybe_script_execute.
@ 2018-09-05 13:38 Stefan Liebler
  2018-09-05 13:44 ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-05 13:38 UTC (permalink / raw)
  To: GNU C Library; +Cc: Adhemerval Zanella

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

Hi,

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.
But if argc == 1, it writes three instead of two elements:
new_argv[0] = (char *) _PATH_BSHELL;
new_argv[1] = (char *) args->file;
new_argv[2] = NULL;

The latter write access writes to the same location where the
pointer args is stored on stack.  Then it segfaults while accessing args:
args->exec (new_argv[0], new_argv, args->envp);

If argc > 1, the arguments inclusive the NULL termination of new_argv
is copied from argv with memcpy.

The implementation assumes that argc == 0 will never happen!

Okay to commit?

Bye
Stefan

---

ChangeLog:

	* sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
	Increment size of new_argv by one.

[-- Attachment #2: 20180905_maybe_script_execute.patch --]
[-- Type: text/x-patch, Size: 1721 bytes --]

commit d099212b378f23fef38ee3f51168bb247d5f719d
Author: Stefan Liebler <stli@linux.ibm.com>
Date:   Wed Sep 5 13:34:44 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.
    But if argc == 1, it writes three instead of two elements:
    new_argv[0] = (char *) _PATH_BSHELL;
    new_argv[1] = (char *) args->file;
    new_argv[2] = NULL;
    
    The latter write access writes to the same location where the
    pointer args is stored on stack.  Then it segfaults while accessing args:
    args->exec (new_argv[0], new_argv, args->envp);
    
    If argc > 1, the arguments inclusive the NULL termination of new_argv
    is copied from argv with memcpy.
    
    The implementation assumes that argc == 0 will never happen!
    
    ChangeLog:
    
            * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
            Increment size of new_argv by one.

diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index cf0213ece5..85239cedbf 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -101,7 +101,7 @@ maybe_script_execute (struct posix_spawn_args *args)
       ptrdiff_t argc = args->argc;
 
       /* Construct an argument list for the shell.  */
-      char *new_argv[argc + 1];
+      char *new_argv[argc + 2];
       new_argv[0] = (char *) _PATH_BSHELL;
       new_argv[1] = (char *) args->file;
       if (argc > 1)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-05 13:38 [PATCH] Fix segfault in maybe_script_execute Stefan Liebler
@ 2018-09-05 13:44 ` Andreas Schwab
  2018-09-06  8:37   ` Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2018-09-05 13:44 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: GNU C Library, Adhemerval Zanella

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

> If argc > 1, the arguments inclusive the NULL termination of new_argv
> is copied from argv with memcpy.

But it has the same bug, doesn't it?

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-05 13:44 ` Andreas Schwab
@ 2018-09-06  8:37   ` Stefan Liebler
  2018-09-06  8:52     ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-06  8:37 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GNU C Library, Adhemerval Zanella

On 09/05/2018 03:44 PM, Andreas Schwab wrote:
> On Sep 05 2018, Stefan Liebler <stli@linux.ibm.com> wrote:
> 
>> If argc > 1, the arguments inclusive the NULL termination of new_argv
>> is copied from argv with memcpy.
> 
> But it has the same bug, doesn't it?
> 
> Andreas.
> 
Yes. It also has this bug.

Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06  8:37   ` Stefan Liebler
@ 2018-09-06  8:52     ` Andreas Schwab
  2018-09-06  9:08       ` Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2018-09-06  8:52 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: GNU C Library, Adhemerval Zanella

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

> On 09/05/2018 03:44 PM, Andreas Schwab wrote:
>> On Sep 05 2018, Stefan Liebler <stli@linux.ibm.com> wrote:
>>
>>> If argc > 1, the arguments inclusive the NULL termination of new_argv
>>> is copied from argv with memcpy.
>>
>> But it has the same bug, doesn't it?
>>
>> Andreas.
>>
> Yes. It also has this bug.

This makes the description rather confusing, implying there is a
difference between argc == 1 and argc > 1, which isn't.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06  8:52     ` Andreas Schwab
@ 2018-09-06  9:08       ` Stefan Liebler
  2018-09-06  9:16         ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-06  9:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GNU C Library, Adhemerval Zanella

[-- Attachment #1: Type: text/plain, Size: 633 bytes --]

On 09/06/2018 10:50 AM, Andreas Schwab wrote:
> On Sep 06 2018, Stefan Liebler <stli@linux.ibm.com> wrote:
> 
>> On 09/05/2018 03:44 PM, Andreas Schwab wrote:
>>> On Sep 05 2018, Stefan Liebler <stli@linux.ibm.com> wrote:
>>>
>>>> If argc > 1, the arguments inclusive the NULL termination of new_argv
>>>> is copied from argv with memcpy.
>>>
>>> But it has the same bug, doesn't it?
>>>
>>> Andreas.
>>>
>> Yes. It also has this bug.
> 
> This makes the description rather confusing, implying there is a
> difference between argc == 1 and argc > 1, which isn't.
> 
> Andreas.
> 
Okay. I've adjusted the description.

Thanks.
Stefan

[-- Attachment #2: 20180906_maybe_script_execute.patch --]
[-- Type: text/x-patch, Size: 1955 bytes --]

commit 6359e1c59f856a1115fdbcfa233052ac62e32c83
Author: Stefan Liebler <stli@linux.ibm.com>
Date:   Thu Sep 6 11:03: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.
    
    In case of argc == 1, it writes three instead of two elements:
    new_argv[0] = (char *) _PATH_BSHELL;
    new_argv[1] = (char *) args->file;
    new_argv[2] = NULL;
    
    The latter write access writes to the same location where the
    pointer args is stored on stack.  Then it segfaults while accessing args:
    args->exec (new_argv[0], new_argv, args->envp);
    
    In case of argc > 1, new_argv[0] and new_argv[1] are set in the same
    way as in the case above and the arguments inclusive the NULL termination
    of new_argv is copied from argv with memcpy.
    Note: The last copied element (NULL termination) is written out of
    bounds of new_argv.
    
    The implementation assumes that argc == 0 will never happen!
    
    ChangeLog:
    
            * sysdeps/unix/sysv/linux/spawni.c (maybe_script_execute):
            Increment size of new_argv by one.

diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index cf0213ece5..85239cedbf 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -101,7 +101,7 @@ maybe_script_execute (struct posix_spawn_args *args)
       ptrdiff_t argc = args->argc;
 
       /* Construct an argument list for the shell.  */
-      char *new_argv[argc + 1];
+      char *new_argv[argc + 2];
       new_argv[0] = (char *) _PATH_BSHELL;
       new_argv[1] = (char *) args->file;
       if (argc > 1)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06  9:08       ` Stefan Liebler
@ 2018-09-06  9:16         ` Andreas Schwab
  2018-09-06 10:29           ` Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2018-09-06  9:16 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: GNU C Library, Adhemerval Zanella

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

> commit 6359e1c59f856a1115fdbcfa233052ac62e32c83
> Author: Stefan Liebler <stli@linux.ibm.com>
> Date:   Thu Sep 6 11:03: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.
>     
>     In case of argc == 1, it writes three instead of two elements:
>     new_argv[0] = (char *) _PATH_BSHELL;
>     new_argv[1] = (char *) args->file;
>     new_argv[2] = NULL;
>     
>     The latter write access writes to the same location where the
>     pointer args is stored on stack.  Then it segfaults while accessing args:
>     args->exec (new_argv[0], new_argv, args->envp);
>     
>     In case of argc > 1, new_argv[0] and new_argv[1] are set in the same

This still make a difference between argc == 1 and argc > 1.  Just say
that there is an off-by-one because maybe_script_execute fails to count
the terminating NULL when sizing new_argv.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06  9:16         ` Andreas Schwab
@ 2018-09-06 10:29           ` Stefan Liebler
  2018-09-06 10:33             ` Andreas Schwab
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-06 10:29 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GNU C Library, Adhemerval Zanella

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

On 09/06/2018 11:14 AM, Andreas Schwab wrote:
> On Sep 06 2018, Stefan Liebler <stli@linux.ibm.com> wrote:
> 
>> commit 6359e1c59f856a1115fdbcfa233052ac62e32c83
>> Author: Stefan Liebler <stli@linux.ibm.com>
>> Date:   Thu Sep 6 11:03: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.
>>      
>>      In case of argc == 1, it writes three instead of two elements:
>>      new_argv[0] = (char *) _PATH_BSHELL;
>>      new_argv[1] = (char *) args->file;
>>      new_argv[2] = NULL;
>>      
>>      The latter write access writes to the same location where the
>>      pointer args is stored on stack.  Then it segfaults while accessing args:
>>      args->exec (new_argv[0], new_argv, args->envp);
>>      
>>      In case of argc > 1, new_argv[0] and new_argv[1] are set in the same
> 
> This still make a difference between argc == 1 and argc > 1.  Just say
> that there is an off-by-one because maybe_script_execute fails to count
> the terminating NULL when sizing new_argv.
> 
> Andreas.
> 
What about this?

Stefan

[-- Attachment #2: 20180906_1230_maybe_script_execute.patch --]
[-- Type: text/x-patch, Size: 1326 bytes --]

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.

diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index cf0213ece5..85239cedbf 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -101,7 +101,7 @@ maybe_script_execute (struct posix_spawn_args *args)
       ptrdiff_t argc = args->argc;
 
       /* Construct an argument list for the shell.  */
-      char *new_argv[argc + 1];
+      char *new_argv[argc + 2];
       new_argv[0] = (char *) _PATH_BSHELL;
       new_argv[1] = (char *) args->file;
       if (argc > 1)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06 10:29           ` Stefan Liebler
@ 2018-09-06 10:33             ` Andreas Schwab
  2018-09-06 12:31               ` Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2018-09-06 10:33 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: GNU C Library, Adhemerval Zanella

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06 10:33             ` Andreas Schwab
@ 2018-09-06 12:31               ` Stefan Liebler
  2018-09-07  7:57                 ` Adhemerval Zanella
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-06 12:31 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: GNU C Library, Adhemerval Zanella

On 09/06/2018 12:33 PM, Andreas Schwab wrote:
> 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.
> 

Committed.

Thanks.
Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-06 12:31               ` Stefan Liebler
@ 2018-09-07  7:57                 ` Adhemerval Zanella
  2018-09-07 10:33                   ` Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Adhemerval Zanella @ 2018-09-07  7:57 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: Andreas Schwab, GNU C Library

Thanks for the patch, could you check if we need to backport this fix to older releases as well? 

Inviato da iPhone

> Il giorno 06 set 2018, alle ore 13:30, Stefan Liebler <stli@linux.ibm.com> ha scritto:
> 
>> On 09/06/2018 12:33 PM, Andreas Schwab wrote:
>>> 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.
> 
> Committed.
> 
> Thanks.
> Stefan
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-07  7:57                 ` Adhemerval Zanella
@ 2018-09-07 10:33                   ` Stefan Liebler
  2018-09-07 13:36                     ` Adhemerval Zanella
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-07 10:33 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: GNU C Library

On 09/07/2018 09:57 AM, Adhemerval Zanella wrote:
> Thanks for the patch, could you check if we need to backport this fix to older releases as well?
> 
As far as I've seen, maybe_script_execute was introduced with commit 
"posix: New Linux posix_spawn{p} implementation" 
(https://sourceware.org/git/?p=glibc.git;a=commit;h=9ff72da471a509a8c19791efe469f47fa6977410)
=> first release was glibc 2.24.

Should it be backported to all versions: glibc 2.24 ... 2.28?

Bye
Stefan

> Inviato da iPhone
> 
>> Il giorno 06 set 2018, alle ore 13:30, Stefan Liebler <stli@linux.ibm.com> ha scritto:
>>
>>> On 09/06/2018 12:33 PM, Andreas Schwab wrote:
>>>> 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.
>>
>> Committed.
>>
>> Thanks.
>> Stefan
>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] Fix segfault in maybe_script_execute.
  2018-09-07 10:33                   ` Stefan Liebler
@ 2018-09-07 13:36                     ` Adhemerval Zanella
  2018-09-10 12:33                       ` [COMMITTED 2.24 / 2.25 / 2.26 / 2.27 / 2.28] " Stefan Liebler
  0 siblings, 1 reply; 14+ messages in thread
From: Adhemerval Zanella @ 2018-09-07 13:36 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: GNU C Library



> Il giorno 07 set 2018, alle ore 11:33, Stefan Liebler <stli@linux.ibm.com> ha scritto:
> 
>> On 09/07/2018 09:57 AM, Adhemerval Zanella wrote:
>> Thanks for the patch, could you check if we need to backport this fix to older releases as well?
> As far as I've seen, maybe_script_execute was introduced with commit "posix: New Linux posix_spawn{p} implementation" (https://sourceware.org/git/?p=glibc.git;a=commit;h=9ff72da471a509a8c19791efe469f47fa6977410)
> => first release was glibc 2.24.
> 
> Should it be backported to all versions: glibc 2.24 ... 2.28?
> 

Ideally yes, this is quite simple patch so I thin backport should not require extra work.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [COMMITTED 2.24 / 2.25 / 2.26 / 2.27 / 2.28] Fix segfault in maybe_script_execute.
  2018-09-07 13:36                     ` Adhemerval Zanella
@ 2018-09-10 12:33                       ` Stefan Liebler
  2018-09-10 14:13                         ` Adhemerval Zanella
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Liebler @ 2018-09-10 12:33 UTC (permalink / raw)
  To: libc-stable; +Cc: Adhemerval Zanella, GNU C Library

Hi,

I've cherry picked the commit "Fix segfault in maybe_script_execute." 
(https://sourceware.org/git/?p=glibc.git;a=commit;h=28669f86f6780a18daca264f32d66b1428c9c6f1) 
and it is now available on glibc release branches 2.24 ... 2.28.

Bye
Stefan

On 09/07/2018 03:36 PM, Adhemerval Zanella wrote:
> 
> 
>> Il giorno 07 set 2018, alle ore 11:33, Stefan Liebler <stli@linux.ibm.com> ha scritto:
>>
>>> On 09/07/2018 09:57 AM, Adhemerval Zanella wrote:
>>> Thanks for the patch, could you check if we need to backport this fix to older releases as well?
>> As far as I've seen, maybe_script_execute was introduced with commit "posix: New Linux posix_spawn{p} implementation" (https://sourceware.org/git/?p=glibc.git;a=commit;h=9ff72da471a509a8c19791efe469f47fa6977410)
>> => first release was glibc 2.24.
>>
>> Should it be backported to all versions: glibc 2.24 ... 2.28?
>>
> 
> Ideally yes, this is quite simple patch so I thin backport should not require extra work.
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [COMMITTED 2.24 / 2.25 / 2.26 / 2.27 / 2.28] Fix segfault in maybe_script_execute.
  2018-09-10 12:33                       ` [COMMITTED 2.24 / 2.25 / 2.26 / 2.27 / 2.28] " Stefan Liebler
@ 2018-09-10 14:13                         ` Adhemerval Zanella
  0 siblings, 0 replies; 14+ messages in thread
From: Adhemerval Zanella @ 2018-09-10 14:13 UTC (permalink / raw)
  To: Stefan Liebler; +Cc: libc-stable, GNU C Library

Tyvm.

Inviato da iPhone

> Il giorno 10 set 2018, alle ore 13:32, Stefan Liebler <stli@linux.ibm.com> ha scritto:
> 
> Hi,
> 
> I've cherry picked the commit "Fix segfault in maybe_script_execute." (https://sourceware.org/git/?p=glibc.git;a=commit;h=28669f86f6780a18daca264f32d66b1428c9c6f1) and it is now available on glibc release branches 2.24 ... 2.28.
> 
> Bye
> Stefan
> 
> On 09/07/2018 03:36 PM, Adhemerval Zanella wrote:
>>> Il giorno 07 set 2018, alle ore 11:33, Stefan Liebler <stli@linux.ibm.com> ha scritto:
>>> 
>>>> On 09/07/2018 09:57 AM, Adhemerval Zanella wrote:
>>>> Thanks for the patch, could you check if we need to backport this fix to older releases as well?
>>> As far as I've seen, maybe_script_execute was introduced with commit "posix: New Linux posix_spawn{p} implementation" (https://sourceware.org/git/?p=glibc.git;a=commit;h=9ff72da471a509a8c19791efe469f47fa6977410)
>>> => first release was glibc 2.24.
>>> 
>>> Should it be backported to all versions: glibc 2.24 ... 2.28?
>>> 
>> Ideally yes, this is quite simple patch so I thin backport should not require extra work.
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-09-10 14:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 13:38 [PATCH] Fix segfault in maybe_script_execute Stefan Liebler
2018-09-05 13:44 ` Andreas Schwab
2018-09-06  8:37   ` Stefan Liebler
2018-09-06  8:52     ` Andreas Schwab
2018-09-06  9:08       ` Stefan Liebler
2018-09-06  9:16         ` Andreas Schwab
2018-09-06 10:29           ` Stefan Liebler
2018-09-06 10:33             ` Andreas Schwab
2018-09-06 12:31               ` Stefan Liebler
2018-09-07  7:57                 ` Adhemerval Zanella
2018-09-07 10:33                   ` Stefan Liebler
2018-09-07 13:36                     ` Adhemerval Zanella
2018-09-10 12:33                       ` [COMMITTED 2.24 / 2.25 / 2.26 / 2.27 / 2.28] " Stefan Liebler
2018-09-10 14:13                         ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).