Re: [Full-disclosure] Multiple OS kernel insecure handling of stdio file descriptor



On Sat, Jan 20, 2007 at 08:43:33PM +0300, eugeny gladkih wrote:
well, but what is used for stdout if it's closed in the parent
process just before fork(2) call?!

If I recall correctly, setuid and setgid programs with closed stdin,
stdout or stderr will open /dev/null during exec.

This fix was added to AIX back in 1999 or so.

--
Troy Bollinger <troy@xxxxxxxxxxxxxx>
Network Security Analyst
PGP keyid: 1024/0xB7783129
Troy's opinions are not IBM policy



Relevant Pages

  • Re: Getting a processs output
    ... > function takes parameters like exec(), calls fork(), waits for the ... > process to complete, and returns the process's stdout, stderr, and exit ...
    (comp.lang.python)
  • Re: [Full-disclosure] Multiple OS kernel insecure handling of stdio file descriptor
    ... stdout or stderr will open /dev/null during exec. ... This fix was added to AIX back in 1999 or so. ...
    (Full-Disclosure)
  • Re: [Tcl] exec like in a shell
    ... >>Without special effort I get stdout and stderr joint in one variable. ... > exit code, because in the program above I explicitly return 0. ... which is determined by what exec does. ...
    (comp.lang.tcl)
  • Re: switch stdout and stderr
    ... > The exec builtin can be used to redirect a shell's own I/O. ... > echo test 1 ... echo This will be stdout, ... echo This will be stderr, ...
    (comp.sys.hp.hpux)
  • Re: sftp-server problems
    ... Marek> stderr instead of stdout. ... which can also break things; the right way to fix it is to not print ... messages intended for humans when there's no human there to read it, ...
    (comp.security.ssh)