Messages in this thread | | | Date | Sun, 18 Jul 2004 16:15:49 -0700 | From | Paul Jackson <> | Subject | Re: question about /proc/<PID>/mem in 2.4 (fwd) |
| |
> What exactly is passed then ...
The patch /proc/self/mem will be evaluated just once, on the open by the original shell. Whatever bucket of bits that resolves to will remain the source for fd == 0 reads.
That original shell's mem file will be read by whatever follows, exec or not. The 'exec' just stops the shell from forking before it exec's, and certainly won't cause the path that was used earlier to open fd 0 to be re-evaluated.
The setuidapp will see the shell's memory. In general, a app, setuid or not, should make no assumption that any open fd's handed to it at birth were opened using the same priviledges that the app itself has.
Or, more to the point, no higher priviledge app, when calling down to a lessor priviledge app (say a setuid or root app invoking a less trusted app) should allow any open file descriptors across the fork or exec, except those open on files to which it determines the lessor context has rights.
-- I won't rest till it's the best ... Programmer, Linux Scalability Paul Jackson <pj@sgi.com> 1.650.933.1373 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |