Re: High UID support for Linux

Glynn Clements (glynn@sensei.co.uk)
Thu, 3 Dec 1998 17:44:37 +0000 (GMT)


Brandon S. Allbery KF8NH wrote:

> In message <7446vb$g5g$1@palladium.transmeta.com>, H. Peter Anvin writes:
> +-----
> | Then your customer's program is buggy, unless it intends to refer to
> | the HOME and USER of the *user who started the setuid program*.
> +--->8
>
> Setuid programs should not trust environment variables, as a general
> security principle. getpwuid(getuid())->pw_dir is not unreasonable as an
> alternative.

That's not the issue. The situation here is that a setuid program
spawns various processes under various uids, but doesn't set HOME
appropriately. The result is that the spawned processes quite possibly
can't write to (or even read from) $HOME.

As Peter said, the bug is in the setuid parent, not in all of the
children which are referencing $HOME.

-- 
Glynn Clements <glynn@sensei.co.uk>

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/