Re: [PATCH 2.6.18 try 2] net/ipv4: sysctl to allow non-superuserto bypass CAP_NET_BIND_SERVICE requirement

From: David Miller
Date: Fri Sep 22 2006 - 14:04:38 EST


From: William Pitcock <nenolod@xxxxxxxxxx>
Date: Fri, 22 Sep 2006 03:27:22 -0500

> * The software is untrusted by the end user, in the event that the
> software is not trustworthy, the amount of damage it can do running
> as a normal user is less than as a superuser. As it is, the bind()
> may have failed before the CAP_NET_BIND_SERVICE capability was
> granted to the process.

You have the power to exec() the daemon in question with
CAP_NET_BIND_SERVICE capability inherited from the parent,
and that will be the only "extra" capability the process will
have.

So there is in fact an existing mechanism for doing this.

If you have the power to set the sysctl, you have the power
to give the capability to an arbitrary process which you
want to get lower ports but do not trust to run completely
as root.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/