|Colman Reilly||Jul 5, 1997 3:43 am|
|Adam Shostack||Jul 5, 1997 8:17 am|
|Colman Reilly||Jul 5, 1997 2:33 pm|
|Jordan K. Hubbard||Jul 5, 1997 4:47 pm|
|Christopher Petrilli||Jul 6, 1997 11:27 am|
|Jonathan M. Bresler||Jul 6, 1997 2:50 pm|
|Brian Mitchell||Jul 6, 1997 3:20 pm|
|Jonathan M. Bresler||Jul 6, 1997 5:13 pm|
|Colman Reilly||Jul 7, 1997 1:45 am|
|Duane H. Hesser||Jul 7, 1997 7:48 am|
|Robert N Watson||Jul 7, 1997 10:08 am|
|Brian Mitchell||Jul 7, 1997 10:58 am|
|Adam Shostack||Jul 7, 1997 11:03 am|
|Sean Eric Fagan||Jul 7, 1997 11:37 am|
|Robert N Watson||Jul 7, 1997 11:46 am|
|Jonathan M. Bresler||Jul 7, 1997 11:53 am|
|Robert Watson||Jul 7, 1997 1:04 pm|
|Kenneth Stailey||Jul 7, 1997 1:05 pm|
|Brian Mitchell||Jul 7, 1997 1:38 pm|
|pro...@suburbia.net||Jul 7, 1997 2:29 pm|
|Jim Shankland||Jul 7, 1997 3:46 pm|
|Daniel O'Callaghan||Jul 7, 1997 4:20 pm|
|Mark Newton||Jul 7, 1997 4:47 pm|
|Adam Shostack||Jul 7, 1997 5:58 pm|
|Adam Shostack||Jul 7, 1997 6:09 pm|
|Poul-Henning Kamp||Jul 7, 1997 11:10 pm|
|Robert Watson||Jul 8, 1997 8:45 am|
|Robert Watson||Jul 8, 1997 8:58 am|
|Colman Reilly||Jul 8, 1997 12:33 pm|
|Ollivier Robert||Jul 8, 1997 1:20 pm|
|George Robbins||Jul 8, 1997 1:59 pm|
|Mark Newton||Jul 8, 1997 5:29 pm|
|Robert Watson||Jul 9, 1997 9:09 am|
|Eivind Eklund||Jul 9, 1997 9:57 am|
|David Holland||Jul 9, 1997 3:09 pm|
|Wes Peters||Jul 9, 1997 10:07 pm|
|Subject:||Re: Security Model/Target for FreeBSD or 4.4?|
|From:||Robert Watson (rob...@cyrus.watson.org)|
|Date:||Jul 8, 1997 8:45:36 am|
On Mon, 7 Jul 1997, Adam Shostack wrote:
My thought was that you could make programs setgid portbind. Seems intuitively cleaner than making them setuid something. Also, allows you to have a simple implementation with just a list of ports that portbind can bind to (dns, http).
I'd leave everyone under a different user who can't do anything, to avoid having daemons running kill each other.
As far as sendmail goes, I think that if you use setuid procmail as your delivery agent, sendmail doesn't need to be root. (Use qmail!)
Running the daemons as different users would be a must, but using a common portbind group could allow a web server to prevent proper mail service by binding the port at an appropriate time (e.g., the mail server reloads, but the penetrated web server binds the port, as it has rights to do, which allows it to intercept all mail, and deny service, etc.)
Similarly, if the web server runs as www.portbind, all cgi programs inherit binding rights to any of the reserved ports, and that is a bad thing. While portbind sounds like a good simple setup, I'd like to see the facility that allows us to link (port,protocol) to a specific gid. Possibly a specific interface, if there is a clean way to do that (so that different web servers running virtual domains could run as different users, and not be allowed to interfere with one-another, etc.) E.g., this web server is only allowed to bind to 127.0.0.1:80, not 127.0.0.2:80.
With regards to sendmail -- the only program with a lack of suid on sendmail is local mail delivery: pine (and others) rely on calling /usr/sbin/sendmail -etc if not using smtp (and not all clients support smtp). That sendmail attempts to deliver, but if it fails, puts it in /var/mqueue (possibly more complicated behavior here), and cannot do that if it is not suid-something (could be made sgid mail?) For actual delivery, mail.local is already suid-root, I believe. This continues to be fine behavior as far as I'm concerned.
Well, the question also to ask is the value of all this work? I think you get a fair bit of benefit from creating a portbind group, and then the additional benefits give you progressively less value for your time.
I don't think that a general port control facility is as worthwhile; the system is the way it is because the implementors decided not to bother pushing it through the filesystem, and fixing it properly will take a fair bit of work.
I don't debate the diminishing returns theory, but I think diminishing returns may be more of an issue if we push socket permissions onto the file system in /.../inet/tcp/port, etc, than a gid/port pair list.
With regards to gid vs. uid -- is either one of this preferable for any particular reason? gid may be more flexible, I guess, as it would allow multiple users to bind the same ports, but without having rights to each others processes, and as such allow a simpler minimum configuration.