This is the mail archive of the glibc-bugs@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]

[Bug libc/19534] New: execl{e,p}


https://sourceware.org/bugzilla/show_bug.cgi?id=19534

            Bug ID: 19534
           Summary: execl{e,p}
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

GLIBC execl{e,p} implementation might use malloc if the total number of
arguments exceed initial assumption size (1024).  This might lead to issue in
two situations:

1. If execl/execle is stated to be async-signal-safe by POSIX [1].  However if
execl is used in a signal handler with a large argument set (that may call
malloc internally) and the resulting call fails, it might lead malloc in the
program in a bad state.

2. If the functions are used in a vfork/clone(VFORK) situation it also might
issue malloc internal bad state.

The straightforward fix is to avoid dynamic memory allocation and rather just
use stack one for argument handling.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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