about summary refs log tree commit diff
path: root/src/misc/initgroups.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2019-07-08 23:47:15 -0400
committerRich Felker <dalias@aerifal.cx>2019-07-08 23:47:15 -0400
commit759900403d33baba313ae96d410d3a6807a694cc (patch)
treed68bfe0e6f5dc9a501c84b15c0ff9aee7c697ffb /src/misc/initgroups.c
parent9b83182069cc3b213277104a992e195982060146 (diff)
downloadmusl-759900403d33baba313ae96d410d3a6807a694cc.tar.gz
musl-759900403d33baba313ae96d410d3a6807a694cc.tar.xz
musl-759900403d33baba313ae96d410d3a6807a694cc.zip
prevent dup2 action for posix_spawn internal pipe fd
as reported by Tavian Barnes, a dup2 file action for the internal pipe
fd used by posix_spawn could cause it to remain open after execve and
allow the child to write an artificial error into it, confusing the
parent. POSIX allows internal use of file descriptors by the
implementation, with undefined behavior for poking at them, so this is
not a conformance problem, but it seems preferable to diagnose and
prevent the error when we can do so easily.

catch attempts to apply a dup2 action to the internal pipe fd and
emulate EBADF for it instead.
Diffstat (limited to 'src/misc/initgroups.c')
0 files changed, 0 insertions, 0 deletions