Skip to contentSkip to conversation

IBM's Multics paper

DISCUSSION Tracy R Reed 5 participants 6 messages Sep 9, 2002 – Sep 11, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

As seen on slashdot today...

http://domino.watson.ibm.com/library/cyberdig.nsf/papers/FDEFBEBC9DD3E35485256C2C004B0F0D/$File/RC22534.pdf

I read the entirety of the first paper and parts of the second paper which is the original Multics vulnerability analysis.

At the top of page 3 of the report (page 5 in your pdf viewed) they specifically mention SE Linux. They compared Multics 768k bytes of executable code and data 1767k bytes and suggest that it is far too big to be secure and that the complexity leading to that large size needs to be corrected. I infer that due to the Linux kernels monolithic design that this may not be possible.

Is it realistic to compare a modern OS to Multics? Of course the logical requirements of multi-level OS security haven't really changed in 28 years and there is no reason why it should take more bytes to implement the same ideas so perhaps they are right.

It is also noted that their system never had any exploitable buffer overflows found due to the way the hardware segmentation worked, the direction the stack grows (away from occupied stack space instead of towards such as on x86), the implementation language which has much better array bounds handling, and the fact that the hardware would not allow you to execute memory marked as data.

There isn't much we can do about the hardware, stack direction, or implementation language at the moment. We are stuck with x86 and C for a good long time it seems. But doesn't x86 hardware now have the ability to prevent execution of data? That's what Solar Designers patch does iirc. But there has been some reason for not making it part of the standard kernel. I've heard about how it prevents intentionally executing trampoline code on the stack which some compilers use etc. but I have also heard that this can be fixed. Of course I recall Linus saying that if we disabled data execution on the stack they would just code around it. I don't understand how they would do this and if they could do it on x86 surely they could have done it on Multics unless it were very difficult and if it is that difficult then by all means include the patch in the kernel! I seem to recall a very long debate about this on the linux-kernel list some years ago. I have also heard people say that you can get around the stack direction growth problem although I don't understand how.

I think it is very interesting how Russell's paper "Partioning a Server with NSA SE Linux" starts out with "The requirement to purchase multiple machines is often driven by the need to have multiple administrators with root access who do not trust each other" when that is basically what the original Multics paper started out with also. The reason they were looking into multi-level security with mandatory access controls was so that they could allow secret, top secret, and perhaps even unclassified users, to all use the same system and thus greatly cut down on hardware acquisition costs. Having secret, top secret, and unclassified users on one box sounds rather like you would want them all in their own chroot'd environments or UML sessions. But from the point of view of the Multics designers, the steps required to set up domains/chroots or UML etc. are a rather large kludge with such complexity that it is impossible to verify that all of the code works as it should with no back doors or unintended side effects.

The parallels between then and now (27 years later) are striking. It is rather depressing that we are still trying to solve the same problems they were trying to solve and end up reinventing the wheel. What's worse is that our wheel may be rather rickety compared to theirs.

Signature · 3 lines
Tracy Reed      http://www.ultraviolet.org
"Our products just aren't engineered for security." - Brian Valentine,
senior vice-president in charge of Microsoft's Windows development 5 Sept 2002
#1 lore raw

If we're going to have much discussion about this then it may be best to move it to my selinux-talk mailing list, [email protected] for subscription requests.

Quoted 8 lines · Tracy R Reed

As seen on slashdot today...

http://domino.watson.ibm.com/library/cyberdig.nsf/papers/FDEFBEBC9DD3E35485
256C2C004B0F0D/$File/RC22534.pdf

I read the entirety of the first paper and parts of the second paper which is the original Multics vulnerability analysis.

Quoted 6 lines

At the top of page 3 of the report (page 5 in your pdf viewed) they specifically mention SE Linux. They compared Multics 768k bytes of executable code and data 1767k bytes and suggest that it is far too big to be secure and that the complexity leading to that large size needs to be corrected. I infer that due to the Linux kernels monolithic design that this may not be possible.

I wonder how they got those numbers, from dmesg on one of my systems:
Memory: 256388k/262080k available (929k kernel code, 5304k reserved, 356k data, 84k init, 0k highmem)

So it's 929K of code and 356K of data by my count...

A SE Linux policy may be 2-3M for a fully configured system, but I've cut it down to as little as 300K uncompressed.

Also I think it's a really bad idea to count policy and code size at the same time, they are different things with different issues. Code size (which is a serious issue) is related to the problems of auditing all that C code and making sure it does what it's supposed to do, and it comes from many different people with different skill levels... Policy has to be audited, but it comes from a much smaller group of people, it's always checked by at least two people with the way things work now, and the people who are writing the sample policy know what they are doing.

Quoted 10 lines

There isn't much we can do about the hardware, stack direction, or implementation language at the moment. We are stuck with x86 and C for a good long time it seems. But doesn't x86 hardware now have the ability to prevent execution of data? That's what Solar Designers patch does iirc. But there has been some reason for not making it part of the standard kernel. I've heard about how it prevents intentionally executing trampoline code on the stack which some compilers use etc. but I have also heard that this can be fixed. Of course I recall Linus saying that if we disabled data execution on the stack they would just code around it. I don't understand how they would do this and if they could do it on x86

The recent OpenWall patches include trampoline support. I've run it on some production servers and have not been able to find any problems caused by it.

Hopefully at some time in the near future we'll be able to combine this with SE Linux, or even better if we could have functionality equivalent to PAX in GRSEC. http://www.grsecurity.net/

The reason it's easier for Multics is that the hardware supports it, there are less bits used for storing page access in i386 and some of these things have to be hacked (EG by giving the code and data segments different memory mappings such that the code segment doesn't have the stack). It's really ugly. Hopefully new CPU architectures such as IA64 and IA32-64 will have better support for such things. I'm afraid that I can't recall the exact details of the CPU mechanisms involved, one book that I can't recommend highly enough is "A Guide to RISC Microprocessor Architecture" edited by Michael Slater. It's an old book which probably isn't in print but should be in any good university library. It is really good for background knowledge on how different CPUs do some of these things and why they do it, compare that with any book on the i386 (there are many) and you can get some good ideas on the relative merits of the CPUs.

Also as mentioned in the document there is a language issue, C is not the best language for reliable code. If we started writing everything in Ada then things would become much more secure.

Quoted 4 lines

The parallels between then and now (27 years later) are striking. It is rather depressing that we are still trying to solve the same problems they were trying to solve and end up reinventing the wheel. What's worse is that our wheel may be rather rickety compared to theirs.

It's not surprising really. Secure systems never entered the mainstream, so people with security knowledge didn't pass it on outside the security community. Until recently most universities didn't even have a shadow password file on their time sharing machines! How could they ever teach students anything about security?!?!

Some universities are offering info-sec courses, which I expect to be useless. You can't have a situation where there's no semblance of security and then just have a lecturer give some talks on security and hope for a good result!

I've been thinking about offering some university lectures on the topic of SE Linux. The idea is a lecture for all 300+ students in the course, then a few tutorials for a couple of classes of students that have special interest in the area, they would then setup some SE server machines for the other students to use. This could fit into a regular Unix course at any Uni (instead of boring the smarter students with tutorials on basic C coding etc they can do more interesting things such as learning SE Linux).

This will result in the students learning a lot about security, especially when as part of their practical work they have to put machines online and issue a public challenge to crack them...

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
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.

#4 lore raw
In reply to Tracy R Reed
Quoted 6 lines · Tracy R Reed

At the top of page 3 of the report (page 5 in your pdf viewed) they specifically mention SE Linux. They compared Multics 768k bytes of executable code and data 1767k bytes and suggest that it is far too big to be secure and that the complexity leading to that large size needs to be corrected. I infer that due to the Linux kernels monolithic design that this may not be possible.

IMHO, the comparison in the first paper seems very odd. I take their point to be that SELinux is far from being a small, verifiable, security kernel. No kidding. You can see that simply by looking at the size of the base Linux kernel, although that size can vary depending on your particular kernel configuration. It also seems questionable to blend the example policy size with the module size, as the example policy can be easily stripped down for a particular system and is merely an access matrix. If you are going to incorporate that kind of information into your size estimate, then you had better also include the size information for all of the ACLs stored on a Multics system.

Quoted 4 lines

Is it realistic to compare a modern OS to Multics? Of course the logical requirements of multi-level OS security haven't really changed in 28 years and there is no reason why it should take more bytes to implement the same ideas so perhaps they are right.

SELinux provides flexible support for mandatory access controls, which is more than just multi-level security. Other non-discretionary access control models like TE and RBAC offer definite benefits.

The authors' position doesn't seem constructive. Advocating work on structuring new systems around a security kernel is fine, but attacking efforts to incrementally improve the security of existing systems is not helpful. It also seems questionable that the two examples of security kernels (VAX VMM, GEMSOS) that the authors hold up as models for commercial products happen to have been developed by the authors themselves.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
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.

#2 lore raw
In reply to Russell Coker
Quoted 5 lines · Russell Coker

The recent OpenWall patches include trampoline support. I've run it on some production servers and have not been able to find any problems caused by it. Hopefully at some time in the near future we'll be able to combine this with SE Linux, or even better if we could have functionality equivalent to PAX in GRSEC. http://www.grsecurity.net/

Actually, as you touched that topic, for a quite long time I was thinking how good would it be to have combined functionality of GRsecurity and SElinux. GRsecurity has many general system hardening functions (including Openwall and PAX for non-executable stack) and a MAC/ACL system. However, the latter seems to be much more complete and mature in SElinux.

As for the Openwall and PAX, there's no good answer for which system to use, as PAX seems to be more actively developed but has bigger performance overhead (up to 10% AFAIK) than OW. Currently I'm using OW with several PAX features (address space randomizing) in production embedded systems and it works well.

Also, it might be interesting for all of you - one such device (Linux based) is being now evaluated for E2 level by ABW (Polish NSA equivalent).

Signature · 8 lines
Paweł Krawczyk, Kraków, Poland  http://echelon.pl/kravietz/
crypto: http://ipsec.pl/
horses: http://kabardians.com/

--
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
Quoted 5 lines · Paweł Krawczyk

As for the Openwall and PAX, there's no good answer for which system to use, as PAX seems to be more actively developed but has bigger performance overhead (up to 10% AFAIK) than OW. Currently I'm using OW with several PAX features (address space randomizing) in production embedded systems and it works well.

Ideally you would be presented with a choice of what level of stack/memory protection to have, varying from the basic stack-smashing protection in OpenWall to the full PAX support.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
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.

#5 lore raw

RE: IBM's Multics paper (let's not confuse assurance and mandatory security)

In reply to Tracy R Reed

I for one would like to thank Tracy for bringing this topic to the list; it's is a central topic and should not shunted off this list.

I suggest that readers try to separate the ideas of "mandatory security"
mechanisms and "assurance" of correctness and completeness. To their
credit, I do not believe that any of the SE Linux papers, and I personally know that none of the SE Linux developers (despite Steve's comments earlier), have asserted that SE Linux was a high-assurance OS implementation. Perhaps the one fault with Roger and Paul's paper is that it might leave the reader with that impression. I believe SE Linux was offered as an open-source implementation of DTE (and optionally MLS) mandatory mechanisms, and was not offered as an example of a high-assurance OS implementation.

If the reader is interested in making Linux/Unix easier to "harden" and strengthen, then I endorse exploration of SE Linux (as we are doing). Type-enforcement mechanisms are a good foundation for strong security, and while there is great complexity in security policies, continued work towards managing security policies will help us gain some control over that complexity. I do believe that a SE Linux, once complete and reasonably tested and analyzed, provides a much better platform for hardened applications than vanilla Linux/Unix.

However, if the reader is interested in high-assurance OSes, then I strongly recommend reading Roger and Paul's papers (and all those they reference!). Don't fool yourself into believing that the addition of mandatory security equates to high-assurance (or even "medium" assurance). As they aptly point out, Multics didn't even achieve the definition of high-assurance, and its fundamental protection mechanisms far exceed anything in Unix-like kernels. I will even say that the one Unix-like OS that also achieved a "medium" assurance B2 rating like Multics (Trusted XENIX, for which I'll admit significant involvement), paled in comparison to Multics protection robustness, and in many people's opinion, lowered the bar of what is "medium" assurance. And neither of these were high-assurance. Even some of the attempts to use mainstream micro-kernels as baselines for high assurance (e.g., TMach, which I'll also admit significant participation, and later DTMach, a direct antecedent to SE Linux I believe), did not in my opinion approach levels of assurance beyond Multics, despite claims at the time.

So I would like to offer two points of encouragement:

1. For all those Linux/Unix folks trying to make their system more security robust, let's keep working on SE Linux and make it better. The type-enforcement mechanisms gives me great hope that we can significantly increase the security strength of a large percentage of computer systems in the near future.

2. For all those trying to solve extremely sensitive data sharing problems (e.g., multiple levels of classified national secrets), then go into SE Linux with open eyes. It certainly has more potential than vanilla Unix/Linux, or even the compartmented-mode workstations you may be used to, but it is not high, or even medium assurance, and not likely to have a chance of even medium robustness any time soon (if at all). So at a minimum, understand these assurance weaknesses and recognize the residual risks and take appropriate counter-measures. And perhaps even consider re-starting some high-assurance research if we can convince ourselves of a chance of success this time.

Frank Mayer

--
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.