Summary: | execve(2) does not honor sysconf(_SC_ARG_MAX) in some cases. | ||
---|---|---|---|
Product: | glibc | Reporter: | Steven Drake <sdrake> |
Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
Status: | RESOLVED INVALID | ||
Severity: | critical | CC: | carlos |
Priority: | P2 | Keywords: | testsuite |
Version: | 2.13 | Flags: | fweimer:
security-
|
Target Milestone: | --- | ||
Host: | x86_64-unknown-linux-gnu | Target: | |
Build: | Last reconfirmed: | ||
Attachments: | test-skeleton.c based test case (causes execve to fail with E2BIG). |
execve is a plain system call. |
Created attachment 5974 [details] test-skeleton.c based test case (causes execve to fail with E2BIG). If execve is given an argv with a string that is larger than 131072 (coincidentally the ARG_MAX macro from linux/limits.h) but less than what sysconf(_SC_ARG_MAX) return, execve fails with E2BIG. This does not happen if the total length of the argv strings is greater than ARG_MAX but each is shorter. This is a problem if using "/bin/sh -c", i.e. system(3). I'm not sure if this is a glibc or linux issue but I am reporting it here anyway.