b4ff8b5f63
distinct file descriptors, but the rump kernel thinks they are both the same. Now, if either one is closed by the application, "both" will be closed in the rump kernel. To fix this, maintain an alias-mask. It's not a perfect solution, though (consider e.g. F_SETFL). Maybe we should actually dup the fd and maintain a mapping table? Also, prevent the host from opening file descriptors onto the places in the fd namespace that have been dupped. These together fix "cat < /rump/foo" in a hijacked /bin/sh. (the first one makes sure stdin is open in cat and the second one makes sure it doesn't try to cat something from /usr/share/locale instead of stdin) |
||
---|---|---|
.. | ||
hijack.c | ||
Makefile | ||
rumphijack.3 | ||
shlib_version |