Skip to contentSkip to conversation

tcb for debian?

DISCUSSION Russell Coker 1 participant 2 messages Jan 28, 2003 – Jan 30, 2003 2 messages not in the archive SELinux security module

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · Solar Designer

I've noticed your debian-devel postings on tcb via Google Groups and would like to thank you for bringing this topic up, and to comment on the postings. Feel free to forward to the list.

Thanks for that invitation, I'll quote your message entirely to the SE Linux list to solicit advice from other experts in the field.

Quoted 6 lines

Basically, I strongly disagree with Russell that the integration of the tcb scheme has to be in some way tied to access control enhancements in the kernel. In fact, I see little point in bothering to do those enhancements without first using the traditional Unix semantics for security as much as we can. The tcb scheme is a step in that direction.

Quoted 7 lines

Russell's argument is that on a typical Linux setup there're many other flawed programs which run with high privileges. While true, _this_ is something to be dealt with by teams such as Debian's. I think that we do manage to deal with them in Owl. It is possible to have a functional Owl system with mail (POP3, SMTP), ftpd, telnetd, sshd, -- offering remote shell access, -- without any SUID binary (some SGIDs) or any daemon which wouldn't deploy privilege separation.

This is where we differ. You are creating a distribution that only supports secure software. You are apparently not including any software in your distribution without first modifying it to use privsep and to drop privs it doesn't need. This is a good thing, however it's not how Debian works.

In Debian there are a large number of maintainers, most of whom are not security experts, who all have the authority to add new software to Debian provided that it meets the appropriate license criteria.

Programs can be excluded from Debian for being insecure, but they will not be excluded for being likely to be insecure! When a daemon needlessly runs as root it will not get fixed until someone files a bug report and/or offers a patch. I won't name any packages as I don't want to criticise the maintainers in this forum, but I can think of a number of packages in Debian that have programs with a bad security history running as root. For some of those packages I've been running them as non-root on my own machines for *years* without needing to make any significant changes. However running as non-root has some trade-offs in terms of functionality and managability, and the package maintainers decided not to do it.

This situation is vastly different from your own and therefore the way we manage other issues has to be different to match. So I don't disagree with you, I am just trying to achieve the same security goals in a different way and with different constraints on what I can do.

Quoted 3 lines

I also don't see how a major distribution like Debian could afford to _depend_ on an unofficial kernel. Such kernels may just be _installed_ on the system, and this is possible already.

Regarding depending on an unofficial kernel. Debian like all major distributions has a patched kernel. If "different from ftp.kernel.org" == "unofficial" then it's unofficial. IMHO a LSM patched kernel is no more unofficial than what we are currently using.

There are no plans to depend on SE Linux. When the next version of Debian is released SE Linux will hopefully be one of several options for better security. Now that I think about it, it would probably be a good idea if the standard Debian 2.4.x kernels were compiled with LSM and the OpenWall module. There is little reason for not doing this, Alexander, perhaps you could start pushing for this?

Anyway, I will be attending FOSDEM http://www.fosdem.org/ and look forward to seeing your presentation. Afterwards perhaps we can discuss this matter over lunch.

Quoted 4 lines

As for tcb, it is a userland thing and one that gets rather deep into the system(*). For most people this means that it should be provided with the distribution to be used at all (adding it to each install is more work than building and using a custom kernel).

But I suspect that it is less work than installing and using SE Linux, and we will continue to manage without SE Linux as a mandatory part of Debian.

Quoted 18 lines

BTW, even when the tcb scheme isn't used, the very use of pam_tcb and the new password hashing framework instead of Linux-PAM's pam_unix is an improvement. (Of course, pam_tcb does all pam_unix could, without requiring that you also switch to the tcb scheme.)

(*) The biggest change needed to support the tcb scheme (and not just use pam_tcb) is to the shadow suite user management tools. The patch to them that's in Owl and ALT Linux is about 55 KB. The glibc patch is tiny, it mostly just adds new stuff that comes as separate source files. There's a version for glibc 2.2.x used in ALT Linux. This is not much work for a distribution vendor, but is a bit too much to be done by a user.

Some references:

http://www.openwall.com/tcb/
http://www.openwall.com/Owl/
http://www.openwall.com/presentations/Owl/

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
In reply to a message not in the archive
Quoted 5 lines · Solar Designer

But one point I wanted to make by mentioning this was that it is possible to have a Linux system, without kernel mods, on which the SUID root on passwd(1) would be about the highest risk. It is also possible to setup a Debian system in this way, -- not using network services which came with it. I think that some Debian users do so.

There may be some such Debian users. But there's an issue of how much effort we should spend trying to help them instead of helping other groups of Debian users that are comprised of more people.

Quoted 2 lines

Similarly, I think that our approach to SUID-less crontab(1) would benefit Debian, too.

That sounds interesting.

Quoted 5 lines
Quoted 2 lines

Programs can be excluded from Debian for being insecure, but they will not be excluded for being likely to be insecure!

I understand that and it's one of the reasons I decided to start the work on Owl.

Of course it wouldn't be difficult to create a little package that conflicts with all the Debian packages that are likely to be security risks...

Quoted 8 lines
Quoted 2 lines

This situation is vastly different from your own and therefore the way we manage other issues has to be different to match.

I'm not convinced. I don't see how these are related so closely. I can understand that a package maintainer may not accept a patch to a network service that limits its functionality in the default install. But things such as support for our tcb scheme or non-SUID crontab(1) have no impact on functionality.

They do require some effort to implement, they will also cause some confusion for users, which takes more time from developers to answer the questions.

libc6 already has far too many open bug reports. I've looked at the code in the past and found it difficult enough to resolve the issues that affect me personally. I am not convinced that it is most desirable for us to have the libc6 maintainers working on adding another feature that lacks upstream support when there's so much to fix in the core functionality.

I've just checked the Debian BTS, the libc6 people are doing a really good job, there's only one important bug that's over a year old now, and only a dozen normal bugs that are over two years old. Just from quickly scanning the web page I can see a few bugs that could potentially have a security impact.

If someone wants to create a private apt repository for modified libc6 with tcb support then I would encourage them to do so. But I don't think that having the efforts of the main libc6 maintainers diverted from their current bug squashing work will benefit us at the moment.

Quoted 3 lines

Well, it seems the only thing I don't get is why you think it's right for Debian to not accept security solutions like the two I've mentioned above. I don't see how they go against any constraints the project has.

Constraints don't just come in the form of rules, they also come in terms of practical issues of managing code etc.

The more differences there are between a Debian package and the upstream source the more work it is for every release. Spending an entire day working on a Debian package to add a new upstream release is very common.

Quoted 6 lines
Quoted 3 lines

Regarding depending on an unofficial kernel. Debian like all major distributions has a patched kernel. If "different from ftp.kernel.org" == "unofficial" then it's unofficial.

But, maybe except for a few special bits, it would work with a kernel right off kernel.org, right?

Correct. I always use kernels from kernel.org because I don't agree with some of the decisions made by the Debian people in this regard.

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.