Slashdot Mirror


OpenBSD Gains Privilege Elevation

ocipio writes "OpenBSD's systrace now has privilege elevation support. This means binaries no longer need to be suid or sgid an longer. Applications can be executed completely unprivileged. Systrace raises the privileges for a single system call depending on the configured policy."

309 comments

  1. Serious! by Trusty+Penfold · · Score: 2, Funny

    This sounds like a serious one, I hope they fix it faster than Microsoft fixed their's

    1. Re:Serious! by FordPrfct · · Score: 3, Informative

      I think you misunderstand.

      The message referenced indicates that this is a security feature, which will allow the individual system calls to be executed with escalated privileges. This is an advantage in that you do not need to have the entire binary executed with the escalated privileges, and so reducing the number of potential privilege escalation attacks.

      --
      This signature carefully hand-crafted from recycled electrons.
    2. Re:Serious! by shird · · Score: 2, Informative

      I think you misunderstood. The parent post is clearly a joke.

      --
      I.O.U One Sig.
    3. Re:Serious! by FordPrfct · · Score: 3, Funny

      Probably. Years of IT have blurred the lines between jokes and cluelessness in others.

      IHBT. I will HAND.

      --
      This signature carefully hand-crafted from recycled electrons.
    4. Re:Serious! by Anonymous Coward · · Score: 1, Funny

      No, sir, it is you that misunderstand. Perhaps this will help clear things up.

    5. Re:Serious! by AresTheImpaler · · Score: 1, Insightful
      (Score:0, Funny)

      hehe, I love slashdot.....

    6. Re:Serious! by StillaCoward · · Score: 1

      LOL

      I nearly choked to death when I opened that link.

    7. Re:Serious! by Anonymous Coward · · Score: 0

      BSD dying?

      Speed tests?

      Jordan Hubbard leaving BSD?

      Kreskin? OH, YEAH! I get it NOW!

      BWAH HAH HAH (gasp) HAH HAH HAWW (wheeze).

      Whew.

  2. Re:*BSD is dying by Goalie_Ca · · Score: 0, Offtopic

    Ever heard of MacOSx.

    --

    ----
    Go canucks, habs, and sens!
  3. 2 things by vga_init · · Score: 2, Interesting
    BSD is not dead! It's code lives on in every modern operating system today, most noteabley MacOS X. Go BSD! :)

    ...and isn't being able to run binaries unpriviledged a security hole, or am I just not getting it?

    1. Re:2 things by kamakazi · · Score: 5, Informative

      There are things that must run as root to work. The common way to allow normal users to do these things was to make them setuid, which meant that the application always runs as its owner, no matter who launched it. Yes, this can be a security hole if not configured wisely. Stuff that requires configuring network interfaces is a good example. This method allows an application to be run as joe_user, but still access privileged system calls, depending on configuration. It is less of a security hole than what is being done now.

      --
      "Proximity to wonder has blunted our perception and appreciation of it" --Tim Hartnell in 'Exploring ARTIFICIAL INTELLI
    2. Re:2 things by CoolVibe · · Score: 2
      There are things that must run as root to work. The common way to allow normal users to do these things was to make them setuid, which meant that the application always runs as its owner,

      One nitpick. Although you are correct, the phrasing is somwhat wrong. What you _mean_ to say is that dropping the privileges of the app is the responibility of the appication that's running suid itself. Now, that most apps can't tell if they are running suid or not, is not the operating systems responsibility.

      But yes, you are correct though. Although many apps that must run as root (to bind a port below 1024 or something), usually prepare what they need to do as root (like open a socket and giving up a file descriptor that is bound to a lower port), and setuid() their way out of root land.

      An extension like this should alleviate the need for such hackery. It's no excuse to write insecure code though ;)

    3. Re:2 things by CoolVibe · · Score: 2
      Clarification: Now, that most apps can't tell if they are running suid or not, is not the operating systems responsibility.

      What I mean by this is that lots of apps don't even test if they are running as root or with elevated privileges. This can simply be done by checking with getuid and geteuid and comparing them (although it's not a foolproof method).

      Also, if an app tries something it shouldn't be allowed to do, it'll just get a EPERM and fail.

  4. Explanation? by dirvish · · Score: 0

    Anyone care to explain what this means and why it is significant? I know a little about BSD but this is giberish to me. TIA.

    1. Re:Explanation? by dirvish · · Score: 0, Redundant

      Is this a feature, a bug, a security hole or something else?

    2. Re:Explanation? by roukounas · · Score: 5, Informative
      Google is your friend, and the next link seems quite informative:

      systrace

    3. Re:Explanation? by photon317 · · Score: 5, Informative


      It's fine grained control of privelege. This is to the basic unix concept of running as a uid and setuid what ACLs are to normal unix filesystem permissions. For a really simplistic example - with this you could run your apache binary with literally zero priveleges, like "nobody" (from start to finish, no run as root then drop privs), and the explicitly enable it to have root-like privs only for the one system call it uses to listen to port 80.

      --
      11*43+456^2
    4. Re:Explanation? by Anonymous Coward · · Score: 0, Troll

      You know little about BSD? I beleive you meant: "I know little about UNIX". You run RedHat with KDE don't you?

    5. Re:Explanation? by dirvish · · Score: 0, Redundant

      How did you know?

    6. Re:Explanation? by cpeterso · · Score: 2


      Isn't this "Privilege Elevation" really just an implementation of capabilities? Given the proper capability token, the program can now access a particular priveleged resource (eg syscall).

      I've read a little about Linux's supposed support for capabilities, but I haven't read about any program that uses it..?

    7. Re:Explanation? by pnatural · · Score: 5, Informative

      What they're doing here is simple and clever. The idea is to run an executable, trap it's privileged system calls, and then create a policy file (call to uid map) from the run. After the policy is in place and the executable is run again, the system promotes the calls listed in the policy to the appropriate privilege level. Any new privileged calls generate an error, as they're most likely a security breach or some part of the executable that never got executed the first time.

      A sample apache policy is here: http://www.citi.umich.edu/u/provos/systrace/usr_sb in_httpd.

    8. Re:Explanation? by tumbaumba · · Score: 2, Interesting


      I see it to be a *good thing* indeed but does not solve all the problems and the most important running login daemons like sshd which eventually has to change to a different user and thus has be run as a root to call setuid(), on the other hand if rules allow to elevate privileges for setuid() then it is sort of meaningless. What we need is to have a possibility to change user without compromising security. Any ideas?

    9. Re:Explanation? by gehirntot · · Score: 3, Interesting
      That is a good remark.

      For system services that change privileges based on some internal state (like authentication), sandboxing does not work very well. In that case, you want to use Privilege Separation.

      On the other hand, if you have some global restrains, like root may never log in, you can use systrace to enforce them.

      A combination of both methods will give you a good fit.

    10. Re:Explanation? by BrookHarty · · Score: 4, Interesting

      Hey, interesting idea, how about expanding the policy to include which system calls, which level, and the amount of times they can use them.

      Don't know how CPU intensive, but after reading that Apache httpd ACL, you could really be anal and lock down applications. We currently use EFS on our Sun Boxes, and it locks down the boxes tighter than a drum. Sounds like a nice extension on a theme.

    11. Re:Explanation? by gehirntot · · Score: 4, Informative
      Isn't this "Privilege Elevation" really just an implementation of capabilities? Given the proper capability token, the program can now access a particular priveleged resource (eg syscall).
      Regular capability systems are more coarse grained. You can have capabilities that say this application is allowed to bind to a reserved port,etc. However, with privilege elevation in systrace, you have much finer control. The privileges are just elevated for a single system call matching specified system call arguments.

      Additionally, with systrace you can reduce the privileges of binary applications without the need to add support for capabilities in the source code.

    12. Re:Explanation? by Anonymous Coward · · Score: 0

      Hmm, shouldn't the system stop a process from becoming root if the current uid is not in the wheel group?

  5. that's 3 things by Anonymous Coward · · Score: 2, Insightful

    ...and isn't being able to run binaries unpriviledged a security hole, or am I just not getting it?

    Yes

    1. Re:that's 3 things by vga_init · · Score: 0

      OpenBSD is notorious for being security fanatics (or is that NetBSD???); what's the deal here?

    2. Re:that's 3 things by Anonymous Coward · · Score: 0

      The joke is that (a || !a) is always true. "Is this a security whole, or am I not getting it?" "Yes."

      In this case, it's yes, he's not getting it.

    3. Re:that's 3 things by vga_init · · Score: 1

      Yeah, I realize that too late...lol

  6. Why is this a good thing? by Chris_Stankowitz · · Score: 0, Interesting

    I know NOTHING about BSD, however I thought it was *nix-like and you didn't want apps running around all will-nilly ( yes I said will, nilly) with elevated rights. What makes this so news worty? Until I read the whole thing I actually thought a secutity flaw was unearthed.

    1. Re:Why is this a good thing? by coene · · Score: 5, Insightful

      Normal unix daemons (apache, bind, whatever) are started as root, and DOWNGRADE their permissions when they can.

      This systems lets them start unpriviledged (not running as root) and the kernel will upgrade the permissions on a strict need-to-have basis.

      Why give a mile when you only need an inch? That leaves a whole lot of room for error... This eliminates that problem.

      Once again, OpenBSD takes the next step towards a more secure UNIX. Only they have the bravery to touch code thats 2 decades old, modernize it with well thought-out changes, and stand behind it. Not to mention that this is code that if screwed up, could reak havok. If anyone is qualified todo these things, the OpenBSD team is.

      WOohoo!

    2. Re:Why is this a good thing? by tpv · · Score: 5, Informative
      OpenBSD takes the next step ... Only they have the bravery...

      Except this change originated in NetBSD.

      --
      Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
    3. Re:Why is this a good thing? by njchick · · Score: 2, Interesting
      There are measures in the kernel and in libc that restrict potentially harmful influence on the suid binaries, even from the user who runs them. Those programs don't get some signals from the user, they ignore most of the environment, and they are usually not writable by the user unless the sysadmin is an idiot.

      When running a suid program, you know what you are running. Except there are serious bugs in the code, the program will drop its privileges or exit.

      Now, with security elevation, somebody starts something, and that something says to the kernel - hey, I'm Apache, I want to write to the Apache logs. And then it fills the logs with some garbage. Unless there is a serious mechanism in place to authenticate the binary, I don't see how this is safer that running software designed to work safely when it's suid.

    4. Re:Why is this a good thing? by perry · · Score: 5, Informative

      The answer is you can't tell the kernel "I'm Apache." Obviously a mechanism that just let you do that would be trivial to evade. The kernel can easily know whether you are the apache program or not, however, because it knows the inode backing your executable -- there is no way to forge that. This is the same way the kernel knows that you have a suid bit -- it looks at the inode for what it is executing when it executes it.

      The systrace mechanism is a very nice one. Most on-system exploits these days are caused by suid programs being exploited before they give up privileges (and many don't give up privs ever). By only giving a program just the privs it needs, you can avoid having to have root privs available to the programs at all. You can't exploit privileges you never have had.

    5. Re:Why is this a good thing? by Random+Walk · · Score: 3, Insightful
      The kernel can easily know whether you are the apache program or not, however, because it knows the inode backing your executable -- there is no way to forge that.

      like that (overwriting will not change the inode) ?:
      cp apache apache.tmp
      cat rogue_executable > apache

    6. Re:Why is this a good thing? by Anonymous Coward · · Score: 1, Insightful

      And what privileges do you need to overwrite the apache daemon on your boxes?
      I know it's root on mine.

      This system won't protect you from someone who has root, but it will help prevent it from happening.

      Consider the sendmail daemon...
      It needs to bind to port 25, and write to people's mailboxes. What if you can restrict it to just those functions?
      It makes it much more unlikely that sendmail could be used for nefarious purposes.
      And with a modern sendmail, you only need root for the daemon to bind to port 25. If that's all it can do I;d love to see someone get root from there.

      This is indeed a HUGE step forward...

    7. Re:Why is this a good thing? by Anonymous Coward · · Score: 0
      Except this change originated in NetBSD.


      Do you hear that sound? What the hell is that? Oh, it's the sound of air rushing out of Theo de Raadt's head after you stuck a pin in it. :-)

      On a lighter side, congrats to the original author. This is quite a nice idea. Hopefully it will be ported to Linux shortly so it can get some real use. I mean, there are millions of Linux users and only a small handful of a few thousand *BSD users so it'd be a bigger boon to port this to Linux.

    8. Re:Why is this a good thing? by Cunning+Stunt · · Score: 1

      BSD has something called immutable file flags. Most binaries will have the noschg flag set and the kernel securelevel raised so that no-one (not even root) can alter the file. The only way it can be done is by dropping the securelevel in single user mode at the console. What you describe is not an issue.

    9. Re:Why is this a good thing? by Anonymous Coward · · Score: 0

      Fear not. The Linux port is almost finished!

    10. Re:Why is this a good thing? by MasterC · · Score: 1

      The concept of jailing is not new. HP's linux employs a similar mechanism (they call it compartments) and NSA's SELinux does something similar but I don't know what they call it.

      Linux has taken this step already and it wasn't the first...

      --
      :wq
  7. Re:Patch by Anonymous Coward · · Score: 0

    What the fuck are you posting this for? Not only do you not understand the meaning of this feature, but it has nothing to do with Redhat or Linux.

  8. Doesn't any READ ? by XTerm89D · · Score: 4, Informative

    It's not a bug, it's a feature !


    For example the Apache webserver, it needs to be started as root, in order to bind to port 80. Now this is no longer required, since a call to the new function will allow it to bind to 80 as an regular user, provided that the syscall is configged to allow that.

    Same goes for X, which now no longer needs to be run SUID.

    It probably won't be long before these mechanism is common good, but I wonder what happens if someone finds an exploit in THAT ?

    1. Re:Doesn't any READ ? by PotPieMan · · Score: 5, Interesting

      Same goes for X, which now no longer needs to be run SUID.

      Does this mean X will run slightly slower compared with an suid installation? It seems like there would be more code running behind each syscall to check the configured policy, but it's probably not a significant amount - at least, not for current systems. I'm merely curious.

    2. Re:Doesn't any READ ? by Marillion · · Score: 5, Informative

      Under the UID 0 approach, all calls needed to do something. I haven't peeked at the code, but if I were to solve the problem, I would frontload the overhead of the syscall policy evaluation to the exec() call, store the results in a bitmap field. From there, it's bit math. A if (priv & PRIV_SOMECALL) has no more overhead than if (uid==0)

      --
      This is a boring sig
    3. Re:Doesn't any READ ? by jolan · · Score: 1

      OpenBSD's apache already does this by default in 3.2.

      Even the parent process runs unprivileged and everything is in a chroot jail.

    4. Re:Doesn't any READ ? by Russ+Steffen · · Score: 1

      An X server shouldn't be slowed down at all by this een if there were significant overhead. An X server needs root to memory-map the video card's framebuffer and registers, and possiby to set up the communications sockets. Both of those happen once as the X server starts.

    5. Re:Doesn't any READ ? by Cryptnotic · · Score: 3, Interesting

      Why not just make it SGID kmem (or mem or whatever group owns /dev/mem and/or /dev/kmem)?

      It seems like that would be as easy a way of partitioning "root-like" permissions as any other.

      --
      My other first post is car post.
    6. Re:Doesn't any READ ? by ++good-duckspeak · · Score: 1
      It probably won't be long before these mechanism is common good, but I wonder what happens if someone finds an exploit in THAT ?

      A bug in your system lexer or parser generator could probably result in a pretty serious exploit wrt this feature.

      --
      Why is Triangle Man so MEAN?
    7. Re:Doesn't any READ ? by Saucepan · · Score: 5, Interesting

      Making the X server SGID kmem is still giving it far more privileges than it needs in order to be able to do its job. Just being able to read kernel memory is sufficient to get root in most cases (the easiest example to explain being reading the root password right out of the TTY buffers as root is logging on).

      Hopefully the new feature makes it into other OSes -- Unix has long needed a standard way of doing this kind of fine grained privilege separation.

    8. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      Doesn't any READ???

      Yeah. Nobody READ good.

    9. Re:Doesn't any READ ? by lukew · · Score: 5, Interesting

      A little offtopic, but a great security approach that I haven't seen used to often is to port-forward port 80 to a non priviledged port Apache is running on (Say, 8080). Completely removes the need for root privs.

    10. Re:Doesn't any READ ? by Sivar · · Score: 1, Offtopic

      Doesn't any?? READ ?

      Nah, too easy.

      --
      Computer Science is no more about computers than astronomy is about telescopes. --E. W. Dijkstra
    11. Re:Doesn't any READ ? by Ed+Avis · · Score: 2

      If the X server does all its root-needing stuff at startup, then surely it can drop root priveleges immediately afterwards and so a suid-root X server is not such a security risk as often seems to be implied. Of course having no root priveleges at all and relying on a systrace policy is still a step up...

      --
      -- Ed Avis ed@membled.com
    12. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      Or you could store your own syscalls table for each process. At exec(), you init the table so that all syscalls are redirected to your handler, which then performs the overhead of checking the policy. If the syscall is allowed under the policy, then the process syscall map would be updated with the proper syscall information. Future calls to the same syscall would be passed imediatly onto the kernel with no more overhead than your normal syscall mechanism.

      I have no idea how much overhead would be involved in storing a syscall table for every process, although it shouldn't be much. I also don't know any of the BSD's, so the syscall mechanism may not allow us to do this sensibly.

    13. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0
      For example the Apache webserver, it needs to be started as root, in order to bind to port 80. Now this is no longer required, since a call to the new function will allow it to bind to 80 as an regular user, provided that the syscall is configged to allow that.


      I really had to wonder why it took so long for someone to do this. It does seem to be a great idea, but I imagine the code is probably a bit buggy as with anything new. OpenSSH's privilege escalation code worked fine on OpenBSD but broke on many other platforms since there's so many situations to account for.

      By the way, why do we even stick to that old "if it's under port 1024 it's privileged so require root to bind it" anymore? Why not just let users bind any port they want and problem solved? Maybe make something read a list of ports you're not allowed to bind, but other than that, does it really matter anymore? Windows did away with this long ago and any user can bind any port.

    14. Re:Doesn't any READ ? by FroMan · · Score: 2, Interesting

      This works for httpd fairly well. However, consider procmail. It needs to be able to write to any users mail file. So for certain servers it works well. For certain ones it does not. Others that might have problems would be crond also. If crond cannot switch to the proper user when executing it will not work either.


      I don't see how this buys too much though. It doesn't explain the configuration policy. But I suppose if you can allow a certain app with the full path and maybe a checksum on the binary, then set the permissions to the app. like this: /usr/bin/procmail checksum +setuid() +setgid()

      That might work. But it seems easier to just say you will allow procmail to run setuid root. It keeps the idea simpler and does not require that the administrator know exactly what syscalls procmail makes.


      In summary, this might be a cool idea, but I think expecting a sysadmin to know exactly what syscalls an application needs to have for permissions is a bit much. Sure, you may claim that the admin should know these things, but do you really think an admin reads/understands all the source code that goes onto his system? I highly doubt it.

      --
      Norris/Palin 2012
      Fact: We deserve leaders who can kick your ass and field dress your carcass.
    15. Re:Doesn't any READ ? by lewp · · Score: 2, Informative

      It's not a "need to know" thing. AFAIK they aren't planning on taking SUID/SGID out of OpenBSD or anything.

      If you happen to know (or happen to be willing to find) the necessary syscalls you just get the advantage of a little better security. Even then, you don't have to do it if you don't want to.

      --
      Game... blouses.
    16. Re:Doesn't any READ ? by stripes · · Score: 3, Informative
      Or you could store your own syscalls table for each process. At exec(), you init the table so that all syscalls are redirected to your handler, which then performs the overhead of checking the policy. If the syscall is allowed under the policy, then the process syscall map would be updated with the proper syscall information. Future calls to the same syscall would be passed immediately onto the kernel with no more overhead than your normal syscall mechanism.

      Cool idea, and I know FreeBSD at least supports per-process syscall tables, that is how the Linux and BSD/OS "emulation" works. However having more syscall tables does have some real overhead, or could. When you do an indirect jump (table base address plus 4 times the syscall number is an indirect jump) if the jump can't be predicted you end up flushing the pipeline. Tieing that in with other slashdot articles that is 25 pipe stages times three instructions (max) for the P-III or 75 instructions worth of work or 6 cycles time 3 (or is it two?) instructions so 18 instructions for a PPC G4.

      Having another table per process may make the branch prediction much harder since you'll have many more addresses for the branch target cache to hold. Er, maybe. It won't make a difference if the BTC has to be flushed when there is a process context changed (many CPUs have something like a PID that can be used for the different caches to reduce that kind of churn). Also if the CPU does the BTC based off of the physical address this may not be such a big deal (at least if an effort is used to share the tables).

      Modern CPUs are a pain to optimize for.

    17. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      My guess is to disallow normal users from taking over ports reserved for services ran by root.

    18. Re:Doesn't any READ ? by Greebz · · Score: 1

      Much of the time it's used, you'd not know unless you worked for the company :)

      A lot of www servers behind local directors do stuff like this already, but the port translation is handled by the local director.

      Though you could just do it by forwarding the external interface's port 80 to localhost:8080 too, and it'd still be transparent to the user.
      Depends if you want to take the processor usage hit, which although small could start to get significant for a busy site...

    19. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      A little offtopic, but a great security approach that I haven't seen used to often is to port-forward port 80 to a non priviledged port Apache is running on (Say, 8080). Completely removes the need for root privs.

      Not only does port forwarding have additional overhead to it, your "solution" implies that for a server that handles both "8080" and "8443" (redirected from 443) that your mod_ssl private key is left always readable by the user that apache normally runs as. Under classic Unix security, only root can read a file and then drop to another account such that the bulk of code is run without rights to read that same file. A systrace policy may provide a better method of allowing the private key to be read-once and not require the overhead of port forwarding. While port forwarding, chroot, file system ACLs, etc. are all interesting methods to explore for a security policy they tend to also have other ramifications and are far from seemless in their impact. The systrace concept is much more interesting in the fact that suid/sgid applications can continue to run the way they expect without modifying or reconfiguring them by just providing the correct systrace policy. This achieves a much more seemless improvement of system security.

    20. Re:Doesn't any READ ? by evilviper · · Score: 2
      consider procmail. It needs to be able to write to any users mail file.
      Okay... so you want to make those files owned by procmail's group so it can write to them, and only to them.

      but I think expecting a sysadmin to know exactly what syscalls an application needs to have for permissions is a bit much.

      Oh you poor /.ers... This idea is being thrown on you all at once, with the details hidden from you (i.e. on the systrace website).

      Systrace has both a logging mode, and an interactive mode, in addition to the mode you've heard of already. So, you can run it in it's logging mode, and a week later go through the logs to see what calls it made, and use that to form your policy for that program. In the interactive mode, you get something like the Windows firewalls... The first time a program tries to make a call, you can permit it, deny it, deny it always, or permit it always. It's even got a GUI interface, so you could run all your programs that you don't quite trust (Mozilla, GAIM, etc) with systrace, and decide what you want it to be able to do, on-the-fly.

      The moral of this story... the slashdot headline doesn't tell you everything there is to know... Next time, try and find out about the program in question before critizing it.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    21. Re:Doesn't any READ ? by Luminous+Coward · · Score: 1
      [...] that is 25 pipe stages times three instructions (max) for the P-III or 75 instructions worth of work [...]
      The Pentium III was based on the P6 micro-architecture which featured a *14-stage* pipeline. Perhaps you were thinking of the P4? Another point: you are oversimplifying when you say that we'd need to squash 3*25 instructions on a misprediction, it could be more, it could be less.
    22. Re:Doesn't any READ ? by evilviper · · Score: 2

      Blah, blah, blah, overhead, security problems, complexity.

      What we really need is Unix OSes to allow certain users to bind to certain privlidged ports. That would solve all the problems, and seriously reduce the need for something like systrace. I would say 90% of exploitable services only need root so they can bind with privlidged ports. Did I mention that 78% of statistics are made up on the spot?

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    23. Re:Doesn't any READ ? by stripes · · Score: 2
      Perhaps you were thinking of the P4?

      I was, I even thought "P4" when I typed "P-III"!

      Another point: you are oversimplifying when you say that we'd need to squash 3*25 instructions on a misprediction, it could be more, it could be less.

      Yup, I'm oversimplifying wildly. There are also non-BTC effects I left out. However, what would cause more then 3*25 instructions to be thrown away? Things living in the register rename buffers? If so how many? If there a separate re-order buffer later in the pipe, or is that done with the register rename ones?

    24. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      An exploit is an exploit. But good design makes bugs less exploitable. SUID-root processes are a wide open door. Systrace is less so. Therein lies the advantage.

    25. Re:Doesn't any READ ? by blogan · · Score: 1

      If other users are on the machine, they could easily set up a program that just loops trying to bind to port 8080 and when your webserver restarts, they now have control over it. Even if it is for a little bit, they might be able to do some damage.

    26. Re:Doesn't any READ ? by Anonymous Coward · · Score: 0

      "It probably won't be long before these mechanism is common good, but I wonder what happens if someone finds an exploit in THAT ? "

      To quote Maximus: "Unleash Hell!"

    27. Re:Doesn't any READ ? by Luminous+Coward · · Score: 1
      However, what would cause more than 3*25 instructions to be thrown away?
      I've been told the Pentium 4 sports a 128-entry reorder buffer. Imagine a long latency branch (e.g. an indirect branch which misses in the cache) sitting at the top of the reorder buffer while the entire instruction window fills up. When we find out the branch was mispredicted, we'd have to squash 128 instructions. I think the CPU stalls when the reorder buffer is full, thus 128 is probably the upper bound. BTW, where did you get 25 from? I think the Pentium 4's pipeline is 20 stages long.
    28. Re:Doesn't any READ ? by tetrode · · Score: 1

      Does this also remove 90% of the internet that are behind firewall that don't allow traffice on port 8080?

      Mark

    29. Re:Doesn't any READ ? by cant_get_a_good_nick · · Score: 2

      Apache kind of already does this. Though the main (possibly root) apache does do the listen/accept, it doesn't do any reads of the data, it passed the open fd down to the child which then does the processing. root can't get hit by any buffer overflows, nothing is put into any buffers to overflow them. If you look at all the buffer overflow info for apache bugs, you'll see they pretty much say "Allows intruder to interact as apache user" not root, this is why.

      Of course, this is true in 1.3 and the PREFORK_MPM of apache 2.0. Not sure if the other modules have a "root parent" and then pass it off to a lower privileged client.

  9. Sounds like a (very) good thing by WolfWithoutAClause · · Score: 4, Interesting
    I've always hated the all or nothing priviledges that Unix uses.

    This sounds similar to a scheme that Java supports on some platforms (netscape?); I believe there is a setPrivilege() call.

    I'd like to see more of this kind of thing- restrictions to the file space that 'parts' of programs can access should be made, as well as I/O and networking restrictions. Is an email worm going to happen if the OS stops the macros from sending mail? Why should it if somebody else wrote the macro? There's a clear need for better granularity of security.

    We've seen how useful personal filewalls are for network interfaces- this needs to be extended to the other services that the OS supports.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
    1. Re:Sounds like a (very) good thing by jhouserizer · · Score: 5, Informative

      Actually, this type of security is pervasive throughout the _standard_ Java libraries ... not just tied to netscape or any other implementation.

      Java's one of the few programming languages that has security built in from the ground up.

      And yes, this new BSD feature is VERY similar to Java's declaritive security mechanisms.

      (Please let's not start a war of "Java is cool vs. Java sucks", I wanted to provide the above!)
    2. Re:Sounds like a (very) good thing by iamdrscience · · Score: 1
      I've always hated the all or nothing priviledges that Unix uses.
      You know what, you're right! I think it's time for Unix 2: Electric Boogaloo. I would be more than happy to spearhead that movement. I mean "Electric Boogaloo", words that end in an "X", it sounds so cool!!!!
    3. Re:Sounds like a (very) good thing by Anonymous Coward · · Score: 1, Insightful

      Java's one of the few programming languages that has security built in from the ground up.Wich makes me really wonder why the .NET runtime environment doesn`t do the same thing?
      That`s something I would love microsoft
      to "inovate", if outlook and internet explorer would only accept .NET attachments/client side code then these things would no longer be able to mess up the system.

      Likely they would not even be able to send mail to addresbook members like they could if you solved the outlook problem the "traditional" unix way ("runas" oulook as a low priv user).

    4. Re:Sounds like a (very) good thing by Anonymous Coward · · Score: 0

      it would be also good if outlook only ran stuff the user even clicked on, now, that would be a good start.

    5. Re:Sounds like a (very) good thing by Anonymous Coward · · Score: 0
      And yes, this new BSD feature is VERY similar to Java's declaritive security mechanisms

      i would be more apt to make the comparison between this security feature and capability systems. it seems the older Unix gets, the more like capability systems it wants to be. based on your statement about Java, it seems Java always wanted to be a capability sytem.

    6. Re:Sounds like a (very) good thing by Zeinfeld · · Score: 3, Interesting
      Java's one of the few programming languages that has security built in from the ground up.Wich makes me really wonder why the .NET runtime environment doesn`t do the same thing?

      Java was the first programming language to claim that security had been built in from the ground up. In practice the first versions of Java were not at all secure with lots of holes and a security architecture that was pretty clunky. Every call had a wrapper to check the privs separately, there was no security monitor concept, a single point of auditability.

      dotNET does have a strong security monitor concept and a very comprehensive security model. For details see Brian LaMacchia et al. ".NET Framework Security". And yes that is the same Brian who is talking on palladium in LCS today.

      I don't quite get what you mean by stating it would be good if IE only acceted dotNET attachments. Certainly it would be good if Outlook was written as dotNET managed code, or at least the attachment handling was. Then attachments could be run in restricted priv mode.

      The BSD hack appears to be much less sophisticated than Java or dotNET. It is really just adding back something that most security specialists have thought UNIX lacked all along, granular privilleges. The SUID hack has always been a kludge.

      --
      Looking for an Information Security student project suggestion?
      Try http://dotcrimeManifesto.com/
  10. Article is over most /.er's heads by Anonymous Coward · · Score: 0, Insightful

    This article is clearly over most slashdot readers' heads. 50% of the comments are asking what this means, and the other 45% are asking if this is a security flaw. Figures. With KDE and RedHat, you no longer have to be smart to run UNIX. tisk tisk, what a shame.

    1. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0

      it is a pretty obscure security item when dealing wish a desktop

      so its not a shame that people who are using it as a desktop OS are not all knowing about every single topic in the security field.

    2. Re:Article is over most /.er's heads by wilson_c · · Score: 0, Flamebait

      ... Figures. With KDE and RedHat, you no longer have to be smart to run UNIX. tisk tisk, what a shame.

      How terrible! Simply using UNIX no longer immediately qualifies you as a superior person. Whatever esoteric bit of knowledge will you find next to prop up your self esteem?

      You need a new smart-guys-club to show how much better you are. Perhaps you can join Mensa. Then you and all of the other card-carrying smart guys can congratulate each other for being so much smarter than most people.

      Whatever happens, just remember, the contributions you've made to the world are important, whether we fools recognize it or not.

    3. Re:Article is over most /.er's heads by dmanny · · Score: 4, Insightful
      I believe the comment to which you replied is fairly well on target but it is not very polite. The development is a significant benefit but I agree with you that everyone who uses a machine for the desktop does not need to be understand this subject. There are almost always many, many things that individual users do not understand about the complex systems they use. That doesn't mean that significant discusion between those that are interested in a particular area is without value.

      What the original commenter was correct in bemoaning is that the quality of the discussion here on /. is degraded by the number of coments that give evidence to the fact that their authors are not familiar with the general subject matter and have not taken the time to do basic orientation before emitting. These comments add a much value to the forum as the endless Beowulf cluster chatter and the first post idiocy.

      --
      All my previous sigs now look like this one, I wish they were permanetly recorded when used. :-(
    4. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 1, Funny

      And they hate you for pointing it out to them!

      (bfd)

    5. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0

      a lot of /. articles are over a lot of /.r's heads, eg. anything to do with physics of any sort. the people that know more about the subject share their understanding with the rest, everyone discusses it and it all works quite well. except for assholes like you. YOU are the problem here. go away.

    6. Re:Article is over most /.er's heads by Art+Tatum · · Score: 1
      That doesn't mean that significant discusion between those that are interested in a particular area is without value.

      Or the instruction of the uninformed. Many of the posters asking "Isn't this a security hole?" also seem to be genuine in their desire to understand what's going on. I like that.

      Of course, there's also a lot of crapflooding going on here too--can't deny that. I could start bumping my threshold up to 2 or more; but there are many false, silly, offensive, or stupid posts that get modded up--and many interesting posts that are stuck at 1 (or even 0 sometimes). It's one of the reasons I don't come here much anymore. :-)

    7. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 2, Funny
      This article is clearly over most slashdot readers' heads.

      Huh? I don't get it.

    8. Re:Article is over most /.er's heads by morgothan · · Score: 1

      you see the best part about this is i dont think its trolling, i think that what he was trying to say here was this argument is of similar fasion to the one of VI vs EMACS, as in pointless, and just looking for a responce.

      --
      ---
    9. Re:Article is over most /.er's heads by spakka · · Score: 5, Funny
      50% of the comments are asking what this means, and the other 45% are asking if this is a security flaw.

      and the other 5% can't even add up.

    10. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0
      There are almost always many, many things that individual users do not understand about the complex systems they use.

      I would like to think this is very much and example of stuff end users can understand. "arguments" beeing:
      • users sometimes understand filesystem permisions (really I have seen this!), "capabilities/mac/some working syscal hack" are pretty much the same thing! (OS provides function (file storage) and can be told what users can get to which file and OS provides function (networking/listen on port) and can be told which program gets which functions
      • User have been paying for a solution like this in the win32 world already, personal firewalls ask users if a program is allowed networking, and some end-user cluelevel users have made the right decisions (blocking unknown programs!)
      Now I dream of a world where end users have a nice and simple gui in wich they can fine tune their own outlook permisions (and where a real admin can make sure that only one users gets screwed if one users messes up)
    11. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0

      I run Mandrake and Gnome and I am smart. So screw you poopie-head. As soon as I figure out how to compile this code I downloaded from the Internet I'm going to crash your machine.

    12. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0
      How terrible! Simply using UNIX no longer immediately qualifies you as a superior person.


      It's not USING UNIX that is important, it's administering UNIX. Now any idiot can install Red Hat and say they are a UNIX admin when that is bullshit. When they try to setup Solaris or AIX or IRIX they end up shitting their pants because their little Gnome administration icons aren't there. Fucking clueless lusers. Stick with USING the box administered by a competent administrator or go back to Windoze.

    13. Re:Article is over most /.er's heads by thoolihan · · Score: 1

      Stick with USING the box administered by a competent administrator or go back to Windoze. That's like saying if you don't know how to use a computer, stay with a typewriter. You have to learn somewhere, coward. And you don't learn a lot by starting with a box someone else has locked down for you.

      --
      http://unmoldable.com W:"No one of consequence" I:"I must know" W:"Get used to disappointment"
    14. Re:Article is over most /.er's heads by Anonymous Coward · · Score: 0

      By not explicitly listing the remaining 5%, I think he was implying that only 5% of /. readers understand the significance of this feature. If the percentages added up to more than 100%, it would have been clear that he's incompetant at math. Why did this get modded a 5? Probably by one of the 95%.

    15. Re:Article is over most /.er's heads by Jouster · · Score: 1

      Why? Is one better than the other or something?

      Emacs is a wonderful OS, and I hear they're adding a decent text editor to it soon; meantime, I'll stick with vi.

      Jouster

  11. Interesting, but ... by yeOldeSkeptic · · Score: 4, Interesting

    how is this better than setuid, setgid? At least with setuid and setgid, control over system privileges is given on a per-application basis. With this per-system call method, the kernel somehow has to track each system call made by an application and grant or refuse privileges on some basis. (On what basis is unclear from the article.) This seems like a lot of data for a kernel to keep track of, considering the number of system calls a typical unix kernel has.

    Though I believe improvements to setuid, setgid is needed, per system call access privileges don't seem to be the right approach. I would much rather go with chroot jails for each application.

    1. Re:Interesting, but ... by alannon · · Score: 5, Informative

      chroot jails are almost completely unrelated to system-call security, unless the system call is to the file-system. chroot simply allows you to change the root of the file system so that the application cannot access part of the file-system beneath it. If the process is running as root, this helps nothing, since there are many ways of accessing the complete file-system bypassing the normal means if you are root.

    2. Re:Interesting, but ... by sholden · · Score: 1

      This also works on a per application basis.

      And has the advantage that the configuration is in a central place rather then scattered about the file system.

      How do you propose a chroot jail would allow you to not run apache as root???

    3. Re:Interesting, but ... by Soko · · Score: 4, Interesting

      Yes, chroot jails are effective, but there are times when data - possibly sensitive data - has to be kept within the jail, or the daemon needs access to something outside the jail. Chrooting a secure HTTP server that is then compromised by a buffer overflow for example, would expose the files and databases that the HTTP daemon has access to. That is more easily a "get-out-of-jail-free" card than locking down single APIs.

      I would put forth that granting setuid via this method is more effective at securing systems, since you can more easily make sure that the API calls that need privs are written well and bullet proof. Minimal exposure to security risks is what we're after, right? So, this minimises the time that apps can expose themselves to major compromises, even more than a chroot jail. Both together means even better security.

      BTW, ACLs aren't much of a strain if done well - look at NTFS 5.1, which IMHO has ACLs done very well indeed.

      Soko

      --
      "Depression is merely anger without enthusiasm." - Anonymous
    4. Re:Interesting, but ... by jolan · · Score: 3, Interesting

      Setuid / setgid requires the program to do all it's privileged dirty work initially and then drop privileges to ensure a reasonable level of security.

      This new feature in systrace reverses the whole process. Now daemons can run totally unprivileged and systrace can escalate privileges as needed for only the calls that need it.

      It's not as taxing as you think it is. Yes, there is slow down, but for the huge blanket of security it adds, I think the hit in speed is offset by the benefits.

      Chroot jails for each application isn't necessarily feasible. Take Apache for example.

      Apache in OpenBSD 3.2 runs in a chroot jail and even the parent process is run as www:www.
      Some of the apache modules in OpenBSD ports were modified to be chroot-aware. Some are hopeless.

      Properly configured Systrace policies can make the aforementioned broken modules work again and reduces the need for chroot.

    5. Re:Interesting, but ... by Fweeky · · Score: 5, Interesting

      Blegh, will people please stop using "chroot jail" when they really just mean "chroot"?

      This is jail - a syscall which puts a process inside it's own process list, user list, IP and root directory, while limiting various syscalls which might make it possible (or at least easy) to escape the jail.

      This is chroot - a syscall which puts a process inside it's own root directory. As you said, this is almost completely unrelated to system-call security.

      chroot is not jail, jail is not (merely) chroot. Calling chroot "chroot jail" actually makes it *less* clear what you're talking about.

    6. Re:Interesting, but ... by Anonymous Coward · · Score: 0

      Can't you configure applications to run both in chroot and jail to more fully contain them?

    7. Re:Interesting, but ... by Fweeky · · Score: 2
      Can't you configure applications to run both in chroot and jail to more fully contain them?

      Sure, if your chroot has jail set up inside it. It's unnecessary, though; jail already implies chroot, and if you can break out of the jail, the original chroot won't help much :)

      The BSD network stack virtualization experiment may also be of interest, btw. It goes even further than jail :)
    8. Re:Interesting, but ... by scrytch · · Score: 2

      chroot(2) has been called a "jail" for longer than the jail(2) call has been around. jail(2) just generalizes the concept (though I'm not a fan of how they bound it to network interfaces instead of some other declared entity like a mount point or even a pseudo-device)

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    9. Re:Interesting, but ... by the_B0fh · · Score: 1
      BTW, ACLs aren't much of a strain if done well - look at NTFS 5.1, which IMHO has ACLs done very well indeed.

      *SNORT* You mean, look at VMS don't you? People who have looked at actual disk structures say that NTFS looks damn similar to VMS's FS.


      the B0fh

    10. Re:Interesting, but ... by dknj · · Score: 1

      This reminds me of a question i saw in #linux once:

      i have all the hubs plugged into a 100mbit switch, where could i place a computer that would allow me to see ALL the traffice on the network? plug a small hub into the switch and a computer into that hub?

      -dk

    11. Re:Interesting, but ... by NoMercy · · Score: 1

      Weve got ACLs all we need is a standardised interface to them, and programs to allow there controll and honor them when moving/copying/editing files.

      I gave up on using acls after life just got to damn complicated having to constantly ensure X,Y and Z were readable by users P,Q and M

    12. Re:Interesting, but ... by mindstrm · · Score: 1

      Sure, those are the FreeBSD terms...
      but chroot has been around longer than FreeBSD, and the concept of a "chroot jail" did not originate with FreeBSD.

      FreeBSD expanded on the idea and wrote jail(), which is indeed cool... but freebsd jail is a common term.

    13. Re:Interesting, but ... by Anonymous Coward · · Score: 0

      The jail is meant literally, and not to imply the jail() call. Trapped within a "chroot jail" is an expression.

      -Shatai.

  12. Go OpenBSD! by snorggle · · Score: 4, Insightful

    Of course, I am biased as I run this fun little operating system on a produciton machine. 20 days away from one year uptime *ahem*. Ok, maybe that's not that great but it works well for me.

    I am glad to see that the team has forged ahead and taken a step that UNIX style operating systems have needed for quite some time. This is a wonderful step in the evoluction of security that ALL of *BSD/Linux/etc. should implement without delay. At least from an administrator's perspective, I think this should be the norm.

    For those that are unfamiliar with OpenBSD, it is a derivative of BSD that focuses its efforts onto creating a secure system without bells and whistles.

    As always this is my opinion..

    1. Re:Go OpenBSD! by lbruno · · Score: 2, Insightful
      I run this fun little operating system on a produciton machine. 20 days away from one year uptime

      PLEASE UPDATE YOUR SYSTEM, DAMMIT!

    2. Re:Go OpenBSD! by ryanvm · · Score: 1, Troll

      For those that are unfamiliar with OpenBSD, it is a derivative of BSD that focuses its efforts onto creating a secure system without bells and whistles.

      Which contrasts Windows' design of bells and whistles without a secure system.

    3. Re:Go OpenBSD! by octogen · · Score: 1

      ...and taken a step that UNIX style operating systems have needed for quite some time. ...although it's not really something new - privilege controls have been implemented in some special kind of Unix OSs years ago (for example, Trusted Solaris) - not as a syscall-trace-daemon, but directly built into the OS kernel.

      Some other OSs have always had privilege controls - for example, VMS and OS/400.

      I always told people that standard unices should have such a privilege model, and I always wondered why noone knew about these privilege concepts.

      This is a wonderful step in the evoluction of security that ALL of *BSD/Linux/etc. should implement without delay.

      However, I'd prefer a kernel-based solution over the syscall-trace daemon; i guess this would also be faster

      At least from an administrator's perspective, I think this should be the norm.

      That is true, nothing to add.

    4. Re:Go OpenBSD! by Anonymous Coward · · Score: 0

      This is a wonderful step in the evoluction of security that ALL of *BSD/Linux/etc. should implement without delay.

      Niels Provos posted to lkml the other day saying a Linux port should be ready in a matter of days.

  13. You answer your own question... by Carnage4Life · · Score: 5, Insightful

    how is this better than setuid, setgid? At least with setuid and setgid, control over system privileges is given on a per-application basis.

    Which do you think is more secure? Given a choice between having an application run as root [with all the attendant problems that this entails especially if a security problem is found in the app] versus giving the application minimal privileges [specifically all it needs to get the job done and nothing more], how could anyone think the setuid and setgid approach is better.

    The difference between both approaches is the difference between a sledge hammer and a surgeon's scalpel. In fact the only downside to the minimal privileges approach, is performance and efficiency. In this day and age where one can buy half a gig of memory for around $100 and 3.0 GHz processors are on the horizon it really is time for us to adopt techniques for building secure software that have been known for decades but unimplemented due to performance/efficiency concerns.

    1. Re:You answer your own question... by Anonymous Coward · · Score: 0

      Given a choice between having an application run as root [with all the attendant problems that this entails especially if a security problem is found in the app] versus giving the application minimal privileges [specifically all it needs to get the job done and nothing more]

      You oversimplify. An app that is setuid root can drop privileges as soon as it does what it needs to do. Now I'm not saying setuid is better, but you make it sound as though it's all or none with it.

    2. Re:You answer your own question... by yeOldeSkeptic · · Score: 5, Informative
      Which do you think is more secure? Given a choice between having an application run as root [with all the attendant problems that this entails especially if a security problem is found in the app] versus giving the application minimal privileges [specifically all it needs to get the job done and nothing more], how could anyone think the setuid and setgid approach is better.

      setuid and setgid are not perfect and the recent spate of Linux vulnerabilities certainly speaks of the need for improvements in this area. My point is that doing away with setuid and setgid and replacing it with per system call access privileges does not seem to be the right way to increase security.

      With Posix (and Linux, which is Posix compliant) it is already possible for an application to drop it's privileges. This solves the problem of an application running its entire life as root. With the posix compliant call to setuid, an application can be setuid root only for as long as it needs to access privileged resources and can drop those privileges once it no longer needs to be root.

      However, the above article talks about an application elevating its privileges and for the kernel to grant that privilege on a system call basis. The article is short on the details but elevating the privileges of an application is certainly a very dangerous process. If an application asks the kernel to elevate its privileges, how is the kernel to decide if it should grant that request? My mind-set tells me that it should check the effective user id of the running process but then isn't this setuid and setgid again? If the kernel will grant this request by checking a list of applications that is allowed to do this, then how is this different from a kernel checking if an application is owned by root?

      I have stated my preferences for chroot jails and for a good reason. Once a system is cracked, the intruder can do with the filesystem as much as he pleases. At least with chroot jails, the intruder is restricted to the chroot directory and cleaning up the mess is easier. Yes, I know this is not a cure but I think the idea of jailing applications to a particular environment is a good idea.

      I am an old hand so my mind has petrified with an imprint of the old ways of doing things. I could be wrong, but until I am fully convinced, I will be among the voices that express caution at the idea of throwing away setuid and setgid.

      Just my half cent.

    3. Re:You answer your own question... by binford2k · · Score: 1

      If an application asks the kernel to elevate its privileges, how is the kernel to decide if it should grant that request? My mind-set tells me that it should check the effective user id of the running process but then isn't this setuid and setgid again?

      In my humble opinion, this is exactly how it should be done. This would mean that only certain syscalls of certain binaries would be allowed elevated privs.

      In other words, suid application X can do A and B, but not C. Suid application Y can do C and D, but not A or B and application Z can do none of the above because it is not suid.

    4. Re:You answer your own question... by Nickus · · Score: 3, Informative

      There is no need to speculate in how it works when you can just go to the webpage and have a look yourself. http://www.citi.umich.edu/u/provos/systrace/

    5. Re:You answer your own question... by Carnage4Life · · Score: 5, Informative

      You are working backwards. Looking at it objectively, it is clear that a system where applications have to become superuser to perform certain tasks but can relinquish this authority is inferior to a system where superuser priveleges are never given to a process.

      Your position is understandable since this is how the Unix security model has worked for decades even though better mechanisms have been proposed but rarely caught on. For example, look at POSIX 1.E which is almost 2 decades for an example of a better model for handling systems permissions than the traditional Unix model. Recently there has been work done on FreeBSD POSIX 1.E capabilities as well as on the Linux front. This is a good indication that more and more people are disatisfied with the deficiencies of the Unix security model and its reliance on a "superuser" account for so many essential tasks.

      Lastly I don't think any Linux distro has ever been certified as POSIX compliant although many feel that doing so wouldn't be difficult.

    6. Re:You answer your own question... by Danta · · Score: 1

      "Systrace raises the privileges for a single system call depending on the configured policy." Simply reading the post answers your question. You have a policy file which defines which programs get which priviliges. So the improvement towards setuid and setgid is that you do not need to trust the program to drop its privileges, you only give it the ones you know it needs. This makes life difficult for rogue programmers, trojans, viruses and protects you from many dangers of sloppy programming.

    7. Re:You answer your own question... by RAMMS+EIN · · Score: 5, Insightful

      ``With the posix compliant call to setuid, an application can be setuid root only for as long as it needs to access privileged resources and can drop those privileges once it no longer needs to be root.''
      This means that the application is allowed to execute any code as root, as long as it does setuid(0) first. Easy enough to sneak some malicious code in...

      ``If the kernel will grant this request by checking a list of applications that is allowed to do this, then how is this different from a kernel checking if an application is owned by root?''
      It's _very_ different. What this new system does is selectively allowing _some_ system calls that have traditionally required root priviliges to be executed by less priviliged users. For example, a webserver is allowed to bind to port 80, and X is allowed access to graphics hardware (note that svgalib has an IMHO elegant solution for this using kernel modules). Neither the webserver nor X need root access to the filesystem, so they aren't granted this under the new scheme. With setuid, there is no choice - granting access to ports 1023 requires root privileges, which can also be used to read and modify any file on the system.

      setuid is flawed and needed revision. If OpenBSD gets it right remains to be seen, but it's good they're trying. And since the OpenBSD dev team and its users consists in large part of hard-core security freaks, I have faitht that this is going to be a win. Congratulations on yet another great innovation from the OpenBSD folks!

      ---
      After months of research, they found the solution. Typewriters. They are intuitive to use, free of security issues, not hampered by unstable software, and you never have to wait for the printing queue again.

      --
      Please correct me if I got my facts wrong.
    8. Re:You answer your own question... by cilix · · Score: 0
      My mind-set tells me that it should check the effective user id of the running process but then isn't this setuid and setgid again? If the kernel will grant this request by checking a list of applications that is allowed to do this, then how is this different from a kernel checking if an application is owned by root?
      It is different because if an application is set SUID root, then it has the ability to do anything that root can do. With this new method, it would have permission to do certian defined things as root. For example, binding to tcp ports, or even binding to just one particular tcp port.
      Quite a different thing.
    9. Re:You answer your own question... by MercuryWings · · Score: 1
      I'm of the opinion that applications, like users, should be given the absolute minimum needed to perform their tasks. Even though many applications that start suid almost immediately drop into a less privileged id, there's still that momentary opportunity for a bug or well-crafted attack could make use of the privileged id to take control of the system.

      Chroot jails are good at preventing cracks from hijacking an id and running rampant across the entire system. However, running as root even in a chroot jail is a dangerous thing - it would not take much effort to inject into the jail tools that would allow them to directly access hardware/filesystems that are normally inaccessible from within the jail. Chroot jails are definitely a wise thing to use, but they have their own weaknesses. Giving the system the ability to prevent privileged access except when explicitly necessary is a second level of prevention that I feel is important.

      I'm all for this type of feature. Root access is a powerful thing, and in my humble opinion its a good thing whenever one can control not only what apps have privileged access, but explicit privileged actions the application is permitted to take.

      For example...

      Do I really need to run a ftp daemon as root, if all I need is a privileged (<1024) access port, and no other privileged feature? Wouldn't it make more sense to run the ftpd as a normal user, with an option set that allowed the socket allocation only to run with elevated privileges?

      --
      Karma: Shagadelic (mostly affected by those tight knickers - yeah baby, yeah!)
    10. Re:You answer your own question... by iMMersE · · Score: 1

      Do I really need to run a ftp daemon as root, if all I need is a privileged (<1024) access port, and no other privileged feature? Wouldn't it make more sense to run the ftpd as a normal user, with an option set that allowed the socket allocation only to run with elevated privileges?

      Yeah, if that normal user has write permissions into every directory that the users logging into the server will want to write into ... That's the problem, a normal user won't have.

      --
      codegolf.com - smaller *is* better.
    11. Re:You answer your own question... by Beetjebrak · · Score: 1

      Not all things Windows are bad. I like the ACL's in Windows NT. They're more versatile than the unix mode bits and their 3 options and I have wondered why this isn't the default type of model on unixes ever since I started working on them. "I want to allow TWO groups access to a directory, how??" I've gotten used to the mode bits and their quirks and workarounds to get things done, but simply having a permissions flag on every object with an accompanying ACL to control acces on a per-user basis. This would require user accounts for individual daemons, but that's not a bad thing as far as I can tell.

      Just my pennies,

      Bas

      --
      Learn from the mistakes of others. There isn't enough time to make them all yourself.
    12. Re:You answer your own question... by Anonymous Coward · · Score: 0

      Hmm.

      Just how easy is it to to pervert an ACL?

      And how easy is it to pervert an ACL on a Microsoft OS?

      (But I wasn't supposed to say this in public, now, was I?)

    13. Re:You answer your own question... by Beetjebrak · · Score: 1

      I don't know how easy or hard it would be, or what exactly you mean by perverting an ACL..
      Would it be so hard to implement ACL's just as securely as the current mode bits in UNIX? I'm not a coder or a security expert, so I don't know... It's just the idea of ACL's that seems really appealing to my layman's mind.

      --
      Learn from the mistakes of others. There isn't enough time to make them all yourself.
  14. This is a good thing? by LordOfYourPants · · Score: 5, Interesting

    If a flaw is found in the syscall lookups (ie: an app can make a sequence of syscalls to give itself priveledged access anyway) doesn't this mean literally any executable is capable of ruining your machine as opposed to only the suid root ones on any other *nix OS?

    Wouldn't a combination of both be better?

    1. Re:This is a good thing? by perry · · Score: 5, Interesting

      What you're saying is "if the mechanism itself has a horrible bug might that let you break security?" Well, of course.

      However, if there is some sequence of syscalls that lets you, say, get root, well, you have root, and the game is over. What systrace means is, if you have a system with a reasonably bug free set of system calls, you can reduce or eliminate the vulnerability that misbehaving root privileged programs might cause.

      As an example, is really far better for, say, your ntpd to only have the ability to run the normally root prived ntp_adjtime call rather than to be able to do anything root could do. Systrace also lets you give up the ability to run calls like fork and exec that a given program may not need (ntpd does not need them). That way, if someone remotely breaks ntpd, well, they don't own your machine -- at best they can crash your ntpd. They can't fork a new program (a typical exploit would fork a privileged /bin/sh), and they have no access to "normal" root prived calls.

    2. Re:This is a good thing? by evilviper · · Score: 5, Funny
      That way, if someone remotely breaks ntpd, well, they don't own your machine -- at best they can crash your ntpd.

      A big bad hacker broke into my OpenBSD box and changed the time... THE HEARTLESS BASTARD!
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    3. Re:This is a good thing? by Ben+Hutchings · · Score: 2

      This could cause a serious denial-of-service by breaking distributed authentication requiring synchronised clocks, or it could cause information leakage by triggering at-jobs scheduled for the future whose existence would not otherwise be known.

    4. Re:This is a good thing? by Anonymous Coward · · Score: 0

      You've missed the point, though. Yes, if you gain access to this lone system call, you can certainly use it against the system.

      With ntpd running as root, though, you could gain control of the system.

      Neither one is good, but one is much worse than the other.

  15. Re:*BSD is dying by Crusty+Oldman · · Score: 0, Offtopic

    They don't get it.

    (snicker)

  16. Logo! by snorggle · · Score: 3, Funny
    What?!? No blowfish logo? Not that the little devil doesn't work or anything, but I'm used to seeing the blowfish associated with OpenBSD.

    And you have to admit it would bring nice little change to the front page, and maybe a few more "WTF is this?!?" posts. Especially if it was the sub logo from here :-)

    Yes... I'm a fanatic, now go away you insensitive clod.

  17. Re:Patch by Anonymous Coward · · Score: 0

    Come to think of it, it doesn't mention Perl or Japanese animation either!

  18. Re:Go OpenBSD!-Frame of reference. by Anonymous Coward · · Score: 0

    So how does this tie in with all the other security developments going on like the NSA stuff, for example?

  19. Sorry but MacOSX is based on Mach kernel and some by zymano · · Score: 0

    some Bsd and Next OS. How much , i am not sure. Pure attempt to hijack interest in open source operating systems to sell his own proprietary os. Should have gone with BE operating system Steven.

  20. Only system calls? by Virtex · · Score: 5, Informative

    This sounds similar to an idea I've floated around to a few people, except that my idea worked on library functions. The idea was to allow setuid and setgid on individual functions instead of entire programs. When you called such a function, it would run with the elevated privileges determined by the ownership of the library file itself, and when it returned, permissions would go back to what they were previously.

    The one issue I had with this was what to do if a setuid function called another function. Should the privileges be passed onto the extra function? At first thought, it seems like it should, but consider this example:

    I have a library called libprivfunctions.so. Within this library is a function to open a privileged file:

    FILE *open_priv_file(void) {
    return fopen("/etc/priv.conf", "r");
    }

    We'll say this function is set to run as a setuid root (maybe /etc/priv.conf can only be read by root). An attacker could execute a

    export LD_PRELOAD=/home/attacker/libc.so

    before running a program linked against libprivfunctions.so. This version of libc.so would have a fopen that creates a root shell. When open_priv_file() is called, it will call the falsified fopen which, if run as root, will breach the security of the system. Maybe the easiest way around this would be to disallow any LD* variables when running programs linked against setuid/setgid functions (similar to the way setuid/setgid progams work). But the logic behind this gets complicated (you don't know if you're linking against setuid functions until after you've linked. But what if that outcome was caused by one of the LD* variables?).

    I would say that allowing elevated privileges to just system calls is a good way around this problem. Hats off to OpenBSD for another sound decision.

    --
    For every post, there is an equal and opposite re-post.
    1. Re:Only system calls? by Cuthalion · · Score: 1

      Creating a root shell is a system call. So if you only have access to fopen(*, "r"), you can't open a root shell. No matter what library you ask to do it for you, it's still your processor doing the asking.

      --
      Trees can't go dancing
      So do them a big favor
      Pretend dancing stinks!
    2. Re:Only system calls? by bastard42 · · Score: 1

      Well, the problem is that libraries are mapped into the executable (or the other way around.) What makes libprivfunctions.so special? Notice that there isn't a suid libc.so.

      The kernel is seperated from user code. That's why system calls are special. In fact, the processor helps w/ this. It usually has some sort of privilege level to seperate the i/o, mmu from user land.

      <sarcasm>
      Or, we could make processors with more levels of priviliges. Ah, hell, put the string functions in the chip. Screw that, let's put the kernel in a chip.
      </sarcasm>

      Thanks,
      cts

      P.S.
      If anyone can put a "good kernel" in a chip, please do!!! Screw RISC.

      P.P.S
      I'd like to hear about more OS's like this. (I mean a good implementation of Multics)

    3. Re:Only system calls? by BlueUnderwear · · Score: 3, Insightful
      <sarcasm>
      Or, we could make processors with more levels of priviliges. Ah, hell, put the string functions in the chip. Screw that, let's put the kernel in a chip.
      </sarcasm>
      Don't laught: the common Intel processor does indeed have four levels of privilege (even though most OS actually only use two of them...). And yes, it does have special opcodes for strings (REP MOVB) too. Only thing that is still missing seems to be the kernel integrated on a chip... Ah, the beauty of CISC.
      --
      Say no to software patents.
    4. Re:Only system calls? by bastard42 · · Score: 2, Interesting

      I think that's what I'm talking about. I was trying to make a joke about how these things were already tried w/ transistors. Maybe it is time to reexamine that thinking. (Or not.)

      Thanks,
      cts

      P.S.
      Ya, I know, but when REP MOVSB was cool, so was 64k (Ok, it lasted through the 286, but you know what I mean.) And why don't we use the >2 levels of privilege? (I don't know, but it's probably on lkml. Are the other ports better w/ this?)

      P.P.S
      wouldn't "mov ip,Word Processor" be cool!!!!

    5. Re:Only system calls? by Anonymous Coward · · Score: 0

      One word: VAX

    6. Re:Only system calls? by MobyDisk · · Score: 2

      I'm not very knowledgable on *nix security, so please help me out here. Why could you not simply do this trick to any program? IE: make a fake libc.so that erases all the files on the hard drive on a call to fopen(), and then run a program that has suid root?

      Is there a good reference for how libraries are loaded (other than the man pages to ld)

      As another note, Windows has had the ability you describe since win32. Most calls take a SECURITY_DESCRIPTOR pointer that is usually NULL, but can be used to elevate priveledges of a function call.

    7. Re:Only system calls? by maraist · · Score: 2

      And yes, it does have special opcodes for strings (REP MOVB) too.

      I'm relatively sure but these op-codes are somewhat inefficient from the Pentium on; they're recoded via micro-code. While it's possible to still optimize (via utilizing closer-to-metal assembly language), this generally falls into the category of vectored complex and slow code which benchmarks rarely consider. Further, any such optimized complexities could slow down the otherwise streamlined micro-code.

      That being said, it's probably possible to achieve code-size gains (through cache conservation) due to the 8086 sized instructions. However, even this probably doesn't generally apply because both the Athlon's and the P4's try to store the assembly language decoded in pseudo-micro-code form in their lowest level caches. Therefore a required 4 -> 16 micro-ops might be larger than a gcc RISC compile version of the same string operation. (Note, read RISC as meaning non-specialized CISC instructions)

      --
      -Michael
    8. Re:Only system calls? by scrytch · · Score: 4, Insightful

      I'm not very knowledgable on *nix security, so please help me out here. Why could you not simply do this trick to any program? IE: make a fake libc.so that erases all the files on the hard drive on a call to fopen(), and then run a program that has suid root?

      root or setuid root generally ignores LD_PRELOAD as a rule on most unixen. Made it hell for Sun on their initial rollout of Sunrays, which used an LD_PRELOAD hack on yes, libc.

      The Windows NT security model is far, FAR superior to anything Unix has. The design of the thing is fabulous. The problem is, it's hardly ever used, it's been made practically or totally impossible to use by an admin by using the interface, and of course, there's the bugs, bugs, bugs...

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    9. Re:Only system calls? by Virtex · · Score: 2

      But fopen isn't a system call. It's a ANSI library function that wraps the real system call (in the case of Unix, open). What I'm getting at is that by using LD_PRELOAD, you can write your own fopen and have it execute in place of the one in libc. Then you can make it do whatever you want, including creating a root shell.

      Now in the case of OpenBSD's idea, you're right. Since only system calls can get elevated privileges, this kind of attack won't work. That's why I like their idea.

      --
      For every post, there is an equal and opposite re-post.
    10. Re:Only system calls? by cant_get_a_good_nick · · Score: 2

      We'll say this function is set to run as a setuid root (maybe /etc/priv.conf can only be read by root). An attacker could execute a

      export LD_PRELOAD=/home/attacker/libc.so


      This is a problem now, depending on how a setuid/setgid program takes their privileges. So the runtime linker can:
      ignore LD_PRELOAD (a lot of systems did this before) or libraries from "trusted" locations can be used.

    11. Re:Only system calls? by Nevyn · · Score: 1
      The Windows NT security model is far, FAR superior to anything Unix has. The design of the thing is fabulous. The problem is, it's hardly ever used, it's been made practically or totally impossible to use by an admin by using the interface, and of course, there's the bugs, bugs, bugs...

      Sure ... and I've got a bridge that's much more resistent to weather conditions and terrorist attacks to sell you, of course you have to use stilts to cross it and it sometimes falls down on it's own. But it's _far_ superior, no really.

      The big problem that ACLs, privilaged object models and fine grained capabilities have is that to use them you have to rewrite the entire world to understand them, and do the right thing.

      Something like this is nice, because it "just works", and is simple enough that people can understand and use it.

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
  21. Re:Go OpenBSD!-Frame of reference. by snorggle · · Score: 1
    So how does this tie in with all the other security developments going on like the NSA stuff, for example?

    I'm not aware of exactly what NSA stuff you are speaking of. One thing to keep in mind is that OpenBSD is based out of Canada, not the USA. And to my knowledge there is no laws involving the exportation of crytography. Enabling OpenBSD to utilize this in the fixing of security issues. Comming from the project are other such gems as OpenSSH, which we all love and use, right?

    So, unfortunatly with a generic question you get a generic answer of stuff that can be found on a half dozen links on their front page.

  22. This is very very good. by Ulmo · · Score: 5, Interesting

    This is the first I've heard of Systrace privilege elevation. However, it seems to address what has historically been one of the greatest causes of security problems in Unix.

    If you look at the major vulnerabilities we've seen in Unix operating systems and software, they usually fall into one of three categories:

    1) Bugs in the kernel.

    2) Bugs in servers running with elevated privileges (often root).

    3) Bugs in suid binaries (often suid root).

    Privilege elevation could significantly reduce the problems caused by 2 and 3. It's by no means a silver bullet that's going to eliminate vulnerabilities, but it could produce a huge improvement.

    Consider how difficult it is to write a secure suid root binary. Not only do you have to be extremely careful about your own code, you have to worry about possible bugs in any of the libraries you link with. Some people (e.g. D. J. Bernstein) seem to have the knack of producing secure code first time, but even a good programmer who is always thinking about security can make the occasional mistake.

    With privilege elevation, such mistakes are no longer security disasters that grant complete root access to an attacker. The most an attacker can do is make the few privileged syscalls that are permitted by the systrace policy.

    --
    Lachlan.
    1. Re:This is very very good. by Anonymous Coward · · Score: 0

      Oh no. The far most security holes are sysadmins, who can't configure things.
      - mysql running as root, forgot to set password,
      - telnet enabled, with root login.
      - putting arbitaery scripts in a web folder.
      - etc, etc.

    2. Re:This is very very good. by Anonymous Coward · · Score: 0

      Sendmail running as root with a security hole of the day - oh no.

      BIND running as root with a security hole of the day - oh no.

      WuFTPD running as root with a security hole of the week - oh no.

      Add your favorite hole-ridden Unix package running as root here.

  23. Question -- what if Apache code changes? by A+nonymous+Coward · · Score: 4, Interesting

    Suppose a new Apache version starts up differently, so the previous policy no longer matches. Perhaps Apache won't change that much, but there are certainly some apps which would need more complicated policies than Apache; what if they read config files in a different order, or add some new wrinkle? What about Perl or Python programs, where some module changes, or Perl itself changes?

    It would seem to me (as naive as I am to this new concept) that this could be a major pain in the butt. How much does this apply in practice?

    1. Re:Question -- what if Apache code changes? by TheSHAD0W · · Score: 5, Interesting

      Very good point; and a new feature might require a new privilege setting, which would cause errors until the policy was redone.

      The policy also doesn't protect against exploits which use privileges that were already authorized, though it's still an improvement over SUID/SGID.

      It would be nice to add a CRC-32 to the policy file, and check the CRC each time the code is run. If a difference is discovered, indicating either a hacked executable or an upgrade, a warning could be given that the policy might need to be changed.

    2. Re:Question -- what if Apache code changes? by Anonymous Coward · · Score: 1, Insightful

      Adding layers of easy to by-pass security is never a solution. Even if the crc and the program that checks crc is on read-only media, the system can still be fooled. The only solution is to put all of the binaries on read-only, but then there is no need to have the crc check.

    3. Re:Question -- what if Apache code changes? by bockman · · Score: 2, Interesting
      This method needs to be supported by packagers: when you upgrade a packet (binary or source) for a system that supports this method, the package should contain a new policy file.

      Ok, this lead to the question: what if the policy file is compromised? Even so, spotting an unneeded privilege in the policy file should be easier than spotting some rogue code in a large program.

      --
      Ciao

      ----

      FB

    4. Re:Question -- what if Apache code changes? by Nickus · · Score: 1

      If you stay with an official release of OpenBSD it usually works. If you install your own software on top of that then you are on your own.

    5. Re:Question -- what if Apache code changes? by TheSHAD0W · · Score: 2

      That may be true security-wise, but the CRC check would still add some convenience.

    6. Re:Question -- what if Apache code changes? by nightfire-unique · · Score: 2
      It might be a good idea (if this becomes standard across platforms) for daemon writers to include a standard policy file with their source/binaries (you're trusting their code anyway :).

      That way, upon installation, you have the best rule set you're likely to ever have, for that application.

      --
      A government is a body of people notably ungoverned - AC
    7. Re:Question -- what if Apache code changes? by jhantin · · Score: 1

      That's not security so much as sanity checking. Being warned "hey, the versions of Binary X and Policy X don't match" is a lot nicer than just going south at runtime. The fact that it might trip up (Tripwire up?) a naïve cracker is just a small bonus.

      --
      ...when you're writing a game...tweak the difficulty of "Easy" to something [your mother] can cope with. -- onion2k
  24. Finer-grained privs. Linux 2.5 has them too. +/-. by dwheeler · · Score: 5, Informative
    First, an explanation for those who wonder what this means: this addition is a method for gaining finer control over exactly what privileges a trusted program has. If the method is actually used by the system, the system could be more resistant to attack. That's because even if an attacker took control over a privileged (trusted) program, the privileges of that program would be more limited.

    Somewhat similar capabilities also exist for Linux. The Linux Security Module (LSM) effort adds the ability to insert an additional access control mechanism into a Linux kernel (without a recompile). You can then at run-time insert a modules to add finer control over privileges. Several modules exist, such as SELinux. This approach makes it easier to experiment or create your own access control policy. There are various LSM modules already available; none of them are exactly like this, but most provide finer-grain control. There are definitely technical differences, too, but describing those differences would take up WAY too much space here.

    There are definitely situations where finer control over privileges is very desirable. Which way is the best way is very much in doubt. The good thing about finer control is that you can give a program only the privileges it needs. The bad thing about finer control is that it takes more work to set up. "Learning" from program runs helps, but it doesn't fully solve the problem - there are usually many conditions that aren't triggered by simple runs yet can happen in real life.

    Anyway, this kind of capability is a good thing. It will be interesting to see what happens over the years as people try out various ways to add finer control - the trick will be to add finer control while still keeping the system easy to administrate. It's not even clear that there is a single solution.

    --
    - David A. Wheeler (see my Secure Programming HOWTO)
  25. Er, this was added to NetBSD first by perry · · Score: 5, Informative

    I really hate to say it, but:

    1) The story in no way credits Niels Provos, the author of systrace.

    2) The story does not mention that this feature was added to NetBSD first.

    I don't mean to claim "NetBSD is better" or anything, but at least say "OpenBSD and NetBSD" or "NetBSD and OpenBSD" or something, not "OpenBSD". Also, PLEASE credit the guy that did the work, eh?

    1. Re:Er, this was added to NetBSD first by DrJolt · · Score: 0

      True, but IIRC NP is responsible for adding it to both OSes, so presumably the fact that it went into NetBSD had more to do with logistics than anything else.

    2. Re:Er, this was added to NetBSD first by Anonymous Coward · · Score: 0

      It seems Provos lost his commit access on OpenBSD.

  26. ...Except it didn't appear in OpenBSD first. by perry · · Score: 5, Informative

    I hate to be a bitch here, but the feature was added to NetBSD first. I don't mean to imply NetBSD is better than OpenBSD, but maybe some equal billing would have been in order? And by the way, what happened to crediting the author of the code? The work was all done by Niels Provos, who's a damn good security guy.

    1. Re:...Except it didn't appear in OpenBSD first. by Geekboy(Wizard) · · Score: 5, Informative

      Niels Provos was originaly an OpenBSD developer, and started the priv-elevation code on OpenBSD. He hasn't commited to OpenBSD in several months (current theory: fight with Theo). He commited the code to NetBSD, and Itojun commitied it to OpenBSD something like 2 days later.

      Niels also wrote systrace for OpenBSD, and ported it to NetBSD.

      You are right, he is a great security guy.

  27. Moderation? by VTg33k · · Score: 5, Funny

    "This means binaries no longer need to be suid or sgid an longer."

    Doesn't Slashdot have any moderators who speak English? I'll gladly volunteer to read over the stories before you guys post them to the main page if it'll rid us of these ridiculous grammar, spelling, and style absurdities.

    1. Re:Moderation? by maw · · Score: 1
      Lots of people would like to help in this way. The problem is that they simply don't care. The slashdot editors don't feel like they have to listen to their readers, and they never have.

      There are sites where the editors do listen, although none of them have the same focus which slashdot does. Unfortunate.

      It's frustrating every time I see some nitwit say "if yu want good grammer go to cnn," precisely because cnn, which usually grammatically correct, has lacks the focus that slashdot has. Oh, and it's cnn.

      --
      You're a suburbanite.
  28. Appeared in NetBSD first by jolan · · Score: 3, Informative

    Niels Provos was an OpenBSD developer until recently. He's the same guy who did the PrivSep code for OpenSSH.

    It actually appeared in NetBSD first.

    http://mail-index.netbsd.org/current-users/2002/ 10 /11/0039.html

    1. Re:Appeared in NetBSD first by Anonymous Coward · · Score: 0

      hm, joran's message has a comment "redundant".
      but is it really redundant?

      isn't it a news that niels doesn't work for openbsd anymore?
      and why he doesn't work for openbsd?
      does he have a problem for openbsd?
      or openbsd has a problem for him?

    2. Re:Appeared in NetBSD first by Anonymous Coward · · Score: 0

      Provos is still listed as any OpenBSD developer, and it isn't unusual for developers to do double duty with NetBSD. I'm curious as to where you get your information that he is no-longer an OpenBSD developer?

      (That said, it is true that Systrace has become a NetBSD based project. It says as much on Provos's homepage. It is still maintained and supported in OpenBSD as well.)

    3. Re:Appeared in NetBSD first by Anonymous Coward · · Score: 0

      Duh. Have you read the CVS commit mesage?
      Idea from discussions with Perry Metzger, Dug Song and Marcus Watts.
      Dug Song and Marcus Watts are OpenBSD developers. Perry Metzger is a NetBSD developer. Niels Provos is an OpenBSD and a NetBSD developer.

      Systrace is developed for both NetBSD and OpenBSD!

    4. Re:Appeared in NetBSD first by jolan · · Score: 1

      He doesn't have commit anymore.

      Why would itojun (who primarily does ipv6 for OpenBSD) commit systrace work if Niels had commit?

      Think about it.

  29. Re:Finer-grained privs. Linux 2.5 has them too. +/ by Anonymous Coward · · Score: 0


    Couldn't the developers provide a list of syscalls
    and argue why they need each. You could then
    use it as your config file.
    The developer could explain exactly why each call
    is needed. Simple apps would just auto-generate the
    list.

  30. Re:Patch by houseofmore · · Score: 1

    I knew BSD users were losing their sense of humor about the same pace as their hair, but there is nothing wrong with a bit of friendly on where to obtain an upgrade.

  31. ACL's, MAC's and more by fbsderr0r · · Score: 3, Interesting

    ACL's, MAC's and more http://www.trustedbsd.org/

  32. Re:Go OpenBSD!-Frame of reference. by Xtifr · · Score: 2

    I'm not aware of exactly what NSA stuff you are speaking of.

    I suspect he's referring to SELinux, the NSA's "Security Enhanced Linux", which is basically a set of patches (libre) to add ACL support to a Linux kernel and a few select utilities. SELinux is basically just evidence that the NSA has its share of geeks excited by all this free/libre/open-source stuff too.

    From the FAQ:

    20. Are there any export controls on it?

    There are no additional export controls for Security-enhanced Linux over any other version of Linux.


    In answer to the original question, I think that the main difference is that SELinux is building the access controls into various syscalls, while this new OpenBSD feature is putting a wrapper around syscalls in general. The overall effect should be fairly similar, but there may be tradeoffs on either side. But don't quote me on that.

  33. Re:Sorry but MacOSX is based on Mach kernel and so by Anderlan · · Score: 3, Interesting
    Huh?

    http://www.apple.com/macosx/jaguar/unix.html
    ... Jaguar integrates features from state-of-the-art FreeBSD 4.4...

    --
    KLAATU, BORADA, NIh*ahem*
  34. What is the policy? by njchick · · Score: 3, Interesting
    Sorry for stupid question, but I cannot find any explanation of how the policy is configured. What should the program do to authenticate with the kernel and get the permissions defined in the policy?

    Using the executable file of the process would be dangerous because the attacker could use compromized shared libraries. Any passwords would require changes in the software (i.e. you'll have to recompile apache so that it could authenticate).

    The only thing I can think of is a token in the process environment that can only be set by root (maybe an additional group ID). So apache would still have to be run by a program with root permissions (init script) to be able to listen to port 80.

    1. Re:What is the policy? by perry · · Score: 5, Informative

      The method employed is somewhat fiendish. A systraced program is "mastered" by a systrace daemon that gets information on all its system call activities and either thumbs up or thumbs down particular requests. (For performance reasons, things get fast pathed in many instances so the upcall doesn't have to happen.)

      Because of the way that this works, via a userland policy engine, the systrace daemon (which is user code) can use any method it likes to determine how to implement the policy. The way it is currently implemented, the systrace program reads a policy file associated with particular programs and makes decisions that way.

      There is no need for a program to authenticate to the kernel because the program itself has no knowledge of the policy and cannot evade it in any reasonable way.

      The mechanisms involved are still evolving a bit, but Niels has come up with a bunch of really good tricks here. I don't know that systrace is a finished mechanism as much as a toolkit for building new and more interesting mechanisms that are in the tradition of ACLs but much more flexible.

    2. Re:What is the policy? by rweir · · Score: 2

      IIRC, you run the program through once, and the kernel stores all the priveleged calls in the policy file. This defines the set of allowed operations. During subsequent runs, the kernel checks this file to see if each priveleged operation is allowed.

    3. Re:What is the policy? by Permission+Denied · · Score: 2
      The way it is currently implemented, the systrace program reads a policy file associated with particular programs and makes decisions that way.

      Stupid question: how does this work? How do you figure out what program is running? Are you checking device + inode? Simple string comparison on filenames may not work correctly with chroot. Device + inode may not work correctly with hard links.

      Just curious.

    4. Re:What is the policy? by Anonymous Coward · · Score: 0
    5. Re:What is the policy? by njchick · · Score: 1

      That page doesn't explain how the kernel knows that it's the same binary and that it's not "under influence" of corrupted shared libraries or environment.

  35. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0


    Uh, no.

    BeOS has some nice features, but it was also horribly broken in a number of ways, most notably security...

    NeXTSTeP *WAS* BSD, btw. BSD with a nice GUI/desktop... just like MacOS X, in fact.

  36. Except.... by perry · · Score: 3, Informative

    I'll say it again: the change appeared in NetBSD first, so one should mention both NetBSD and OpenBSD here, and please give credit to Niels Provos, the author of systrace and thus the guy who's been doing all the hard work here.

  37. Real security by octogen · · Score: 2, Interesting

    This is the first real kernel-level security feature in OpenBSD.

    Earlier versions of OpenBSD had only application-level security (secure applications, but running as root, and therefore no effective OS-level security below the application-level).

    Granting certain privileges to an application instead of all-powerful superuser-privileges is IMO the most-important security feature of a secure operating system - this is a standard feature on every trusted unix system, and actually i believe it should be a standard feature on every unix platform.

  38. false sense of security by g4dget · · Score: 3, Insightful
    UNIX has evolved for nearly 30 years around the idea that processes either have root privileges or they have user privileges. It's a sound and simple system. If, against that background, you add support for giving processes individual privileges, you risk doing more harm than good. Existing programs will assume that if a process demonstrates one privilege that traditionally only a root process posesses, then it must also have all the others. So, if you give a process specific privileges, you risk that it can acquire more because other processes will give it more trust than it deserves.

    In fact, even for OSes that start out with lots of different privileges, it's far from clear that it helps--programmers seem to have trouble understanding all the implications of all the different bits. For example, VMS, with its much-vaunted mess of security bits, ended up succumbing to a domino effect: you get one bit, then using that, the next one, then one more, until you can do whatever you want. The trouble is that when you tell a programmer that his code runs with "restore from backup privilege" (an example from a privilege happy OS of yore), they assume that's all they get and don't even consider all the other weird implications that that privilege may have. And who can blame them? Who can keep all the weird effects and interactions of dozens of different privileges in their head?

    The simple UNIX privilege system is good: when programmers write code that runs as root, they know exactly what that code can do: everything. And they try to take appropriate care.

    1. Re:false sense of security by perry · · Score: 5, Insightful

      Your comment is rather vague. Let me be more specific.

      Lets say that you have an smtp daemon. With systrace, I can very easily elevate it to be able to open port 25 on the system, and restrict it so that it can't fork or exec any programs and can do no i/o other than writing to files in /var/mail.

      Sure, you can theorize about how evil and complicated this is, but the truth is in one fell swoop I've made it fiendishly difficult to exploit the smtp daemon -- and in most cases I don't even need to have the daemon be the least bit aware of how systrace works. Once I've done this, I can't make the smtp daemon fork a /bin/sh for me, I can't make it write to random files on the system, indeed, I can barely write a remote exploit for it at all. Add in a little chroot and other magic and suddenly you have a very hardened program.

      Most of your comment seems to consist of platitudes about simplicity, not any actual experience with using systrace in a practical system. It very much adds security to the way systems run, and it is completely in the spirit of most modern security aware code, like the Postfix mailer or privilege seperated ssh.

    2. Re:false sense of security by octogen · · Score: 1

      The simple UNIX privilege system is good: when programmers write code that runs as root, they know exactly what that code can do: everything.

      This does not mean, that the privilege system is good - it just means, that the privilege system is very simple.

      However, then we'd have to say that Windows 98 is better than unix, because there is no security at all, and so programmers don't need to think about privileges anyway..

      programmers seem to have trouble understanding all the implications of all the different bits

      This is not an operating system problem;
      However, privileges are commonly granted to binaries by the administrator/ISSO, not by programmers.

      And they try to take appropriate care.

      Yes, they try, and they fail frequently, that's why we have buffer overflows in applications

    3. Re:false sense of security by g4dget · · Score: 2
      Lets say that you have an smtp daemon. With systrace, I can very easily elevate it to be able to open port 25 on the system, and restrict it so that it can't fork or exec any programs and can do no i/o other than writing to files in /var/mail.

      First of all, your logic is invalid. If there exist cases in which the consequences of elevating specific privileges are easy to understand, that does not mean that the consequences of elevating specific privileges are easy to understand in most cases.

      but the truth is in one fell swoop I've made it fiendishly difficult to exploit the smtp daemon

      Even though you hand-picked SMTP as an example to illustrate your argument, it even breaks down there. If I can acquire this privilege set you think of as so restrictive, for example by compromising the SMTP daemon, all of a sudden, I can intercept any mail message and deliver it to myself. That is very likely enough to break into someone's account because either passwords or information useful for social engineering get sent through the mail system.

      On the other hand, if the SMTP daemon runs as root, the threat analysis for a user of it is much simplified. If the SMTP daemon is already compromised and runs as root, it doesn't matter whether I send information through it that might give an attacker root privileges on this machine.

      Most of your comment seems to consist of platitudes about simplicity,

      Most of your comments are platitudes that show little actual experience in how systems are skillfully broken into. Beyond script kiddies exploring spectacularly gaping holes in poorly written C programs that just give them root shells, systems are compromised carefully and incrementally, exploring one subtle flaw after another.

    4. Re:false sense of security by g4dget · · Score: 2
      However, then we'd have to say that Windows 98 is better than unix, because there is no security at all,

      When I need a car to get me from point A to point B, a ham sandwich won't do. But among cars, I still prefer the ones that are safer.

      Yes, they try, and they fail frequently, that's why we have buffer overflows in applications

      And those buffer overflows won't go away through a complicated system of privileges. We need to get rid of the buffer overflows themselves, not make imperfect attempts to mask them.

    5. Re:false sense of security by Jouster · · Score: 2
      but the truth is in one fell swoop I've made it fiendishly difficult to exploit the smtp daemon

      Even though you hand-picked SMTP as an example to illustrate your argument, it even breaks down there. If I can acquire this privilege set you think of as so restrictive, for example by compromising the SMTP daemon, all of a sudden, I can intercept any mail message and deliver it to myself. That is very likely enough to break into someone's account because either passwords or information useful for social engineering get sent through the mail system.

      On the other hand, if the SMTP daemon runs as root, the threat analysis for a user of it is much simplified. If the SMTP daemon is already compromised and runs as root, it doesn't matter whether I send information through it that might give an attacker root privileges on this machine.

      You've got to be kidding me.

      Are you honestly suggesting that it is worse to expose a small portion of the system than to expose the whole system in one monolithic chunk, simply because it would make it harder for you to write threat analysis reports?

      Anything a malicious user could do under a privilege elevation system could be done "better" (so to speak), faster and easier under a setuid system.

      Most of your comments are platitudes that show little actual experience in how systems are skillfully broken into. Beyond script kiddies exploring spectacularly gaping holes in poorly written C programs that just give them root shells, systems are compromised carefully and incrementally, exploring one subtle flaw after another.
      Two things:
      1. Most malicious users are script kiddies. Learn to deal, modify your security policy accordingly, and you'll eliminate 99.9% of security-related incidents. If a real hacker wants in, on the other hand, your only hope is closely watching logs and hoping you're good enough to notice the subtle signs of an elite's exploit.
      2. Having broken into my fair share of systems and analysed dozens more intrusions, I can say that most non-script-kiddie exploits occur in one or two steps, the traces of each of which are covered by the triggering of the next. A hacker once abused an incorrect MySQL installation to put an exploit in place that waited for someone to "su - " into a tape backup account. It sent out a single UDP packet (yes, UDP, and no, he didn't check for loss--the second mistake he made) to let him know the system had been compromised. The first mistake he made was a mispelled "rm" (he put "rn") when trying to cover his tracks, which showed up on the screen of our backup user and caused a call to my office. Later, when playing with the executable--which, by looking at backups, we dated as being from six months previous--I triggered its UDP send, just to see what would happen. Within seconds, a flurry of UDP datagrams occured, and I was flooded with a hundred UDP requests to ports over 32768. The UDP packets synced a random number generator seed that was used to determine the ports the exploit would listen on. The instant it received a datagram on a port, it would close that port and listen on the next one. Thus, to our very sensitive IDS, what would otherwise have shown up as an elevated level of activity showed up as a relatively harmless port scan, albeit odd insofar as it used UDP. The data sent was in the form of DNS queries, with the hostname containing sixteen nibbles of hex followed by ".google.com"--no responses were sent. The hundredth port was reserved for communicating a new random seed for port numbers. From looking at the data that was sent, it appeared he was auto-updating the executable to the latest version. In my summary of the incident, I noted that, if we ever found this guy, I wanted to hire him and all his friends.

      Conclusion: Yes, incremental, subtle attacks are much harder to detect and prevent than other attacks, but I've investigated three dozen or so "real" attacks, and probably half a million port scans and script kiddies running the latest 'sploit from BugTraq against a Class A at a time. Your guess as to who I spend most of my time fighting.

      Jouster
    6. Re:false sense of security by g4dget · · Score: 2
      Are you honestly suggesting that it is worse to expose a small portion of the system than to expose the whole system in one monolithic chunk,

      I'm saying that the way to deal with security problems is to fix the software in question, not to make the problem even more complex with yet another software layer.

      simply because it would make it harder for you to write threat analysis reports?

      Understanding threats isn't some tedious exercise in satisfying management, it's something you have to do in order to be able to write secure software.

      Your guess as to who I spend most of my time fighting.

      And that won't change until people who write software (1) make an effort to understand security and threats and (2) address security problems by fixing the root cause rather than adding even more complex softawre into the mix.

    7. Re:false sense of security by mindstrm · · Score: 1

      How are you going to compromise the SMTP daemon? If only the bind() syscall is handled as root, as well as mail delivery to each user, you won't be able to do much of anything.

      You won't be able to replace the SMTP daemon, you won't be able to read anyone's mail, and you won't be able to modify anything.

      Are you actually suggesting it's better to have ALL syscalls executed as root than just chosen ones? No matter what, more control over what is executed is good.

      Obviously that should not lull programmers into getting sloppy... but it's yet another tool for them, and a good one.

  39. Finer-grained privs. Linux 2.5 has them too.-U-M-L by Anonymous Coward · · Score: 0

    I'm wondering wouldn't all this work best with the Linux "sandbox" idea I believe it's know as UML?

    Put all the dangerous stuff in the sandbox, and use this method to control the access points between the two? The fewer and tighter control will make it easier to audit for security. Also one doesn't have to go through the untrusted code with such a fine comb.

  40. Kernel on chip by Lenolium · · Score: 1

    Well, actually, it looks like the guys at IBM are going that way. Not sticking the entire kernel on chip, but a bunch of helper functions ( I would imagine task swapping to be in there ) to assist the kernel, think of it as MMX for the kernel code. From the roadmap that was linked to from slashdot a few days ago, it looks like the kernel-accellerators are being built into the POWER5 series. Oh, and as for put string functions in the chip, it appears that is the next phase. In the POWER6 series they are planning on adding accellerator functions for DB2 and Websphere (I think a hardware accellerated DB2 is really gonna give Oracle a run for it's money). Just FYI

    1. Re:Kernel on chip by bastard42 · · Score: 1

      Lenoluim,

      Thanks.

      But will it emulate a 360??? I hope it will (or won't as that code should die)

      The Power series is no longer under the RISC/Station 6000. I don't know if it ever was properly RISC.

      That being said, one of the Power4 w/ 4 processors on a chip just sounds cool.

      Thanks,
      cts

      P.S. I read realworldtech.com for my processor news. What do you read?

  41. URLs would help by Anonymous Coward · · Score: 5, Informative

    The URL describing this stuff is

    http://www.citi.umich.edu/u/provos/systrace/

  42. Using ssh to rid oneself of suid/sgid by OoSync · · Score: 4, Interesting

    I've used ssh to rid myself of things like "su -l" and "sudo" before. I think the basic idea can be used to get rid of necessary suid/sgid programs with elevated permissions. The basic theory is each application is actually called by a wrapper using ssh. Public keys from the application's user or group (root, apache, wheel, etc.) are provided to a user with genuine need to access these apps and placed in the ~/.ssh/authorized_keys(2) file. Then the user's public key is provided to the application user's ~/.ssh/authorized_keys(2) file. When the user calls the application, they are allowed access using RSA key authentication. No need for blind SUID/SGUID apps as only those users who need to use it have the permission. Furthermore, these permissions can be easily revoked by a.)changing the app's private/public keypair without providing them to the user, or b) commenting/deleting the user from the authorized file. Additionally, with ssh-agent, keychain, and authorization forwarding, these priveledges can be locked down tight. I'm not sure if openssh authorization forwarding will allow the authorization to be okayed from a remote machine. Just a random thought that seems appropriate here. Let me know what you think.
    --Wes

    --

    I always get the shakes before a drop.
    1. Re:Using ssh to rid oneself of suid/sgid by Zigg · · Score: 2

      All good and well (and I use it at work to perform tasks as the Oracle user, especially those that have X clients), but it doesn't solve the problem that you still have to give root access to certain programs to perform certain functions. There are set[ug]id-specific attacks this can mitigate, but quite frankly, you're not gaining much if your target program is insecurely written.

  43. please someone explain by master_p · · Score: 2, Interesting

    It seems like a good idea, but since I am no Unix expert, could you please someone explain why, for example, accessing port 80 (web access) needs root access ?

    1. Re:please someone explain by Observer · · Score: 5, Informative
      ... why, for example, accessing port 80 (web access) needs root access ?
      Basically, because ports used for 'well-known' services, like port 80, shouldn't be readily available to arbitary programs, because that would allow a mischievously constructed program to bind to such a port and start serving inapproriate results (or, indeed, just do nothing). The standard IP stack implementations reserve port numbers under 1000 for these well-known services, and typically require that a process attempting to bind to them has some sort of (OS-dependent) privilege. Unfortunately, under classic Unix, 'privileged' equates to root access - it's an all or nothing thing.

      Separating the various functions whose use should require privileges into catagories that can be granted individually (or in groups) to different userids is definitely a Good Thing: it probably won't eliminate the need for a super-user and a few godlike system maintainance users, but it allows the system administrators to keep the really dangerous 'own all data' and 'devour all resources' functions to be kept under tighter control than the all-or-nothing approach. (Arguably, you shouldn't even consider handling sensitive information on a platform that cannot administer privileges in a reasonably fine-grained way, but that's another argument.)

    2. Re:please someone explain by Zigg · · Score: 4, Informative

      The standard IP stack implementations reserve port numbers under 1000 for these well-known services...

      In the interests of pedantry, it's actually ports below 1024.

    3. Re:please someone explain by rweir · · Score: 2

      The standard IP stack implementations reserve port numbers under 1000 for these well-known services

      Uh, 1024, of course. 2^10, after all.

    4. Re:please someone explain by listen · · Score: 2

      And this whole "privileged ports" concept was created back when the evil-doers were local users. Nowadays it adds very little security, given that any evildoer will have thier own machine. Even back in the day, it was a kind of broken concept.

      The things it prevents are eg someone managing to crash httpd, and start a new one from any old user. I think it caused a whole lot of more serious problems.

      In my opinion, the best way to do this was the Plan 9 approach, IIRC, a special filesystem - eg /tcp/bind// for binding, ( meaning you can set permissions for individual ports).

      The new feature is nice, but it does seem a tad heavyweight for some uses.

  44. Crude syscalls? by Rosmo · · Score: 1

    Wouldn't this require more fine-grained syscalls in order to be effective? Without knowing how it actually works, I assume this system is dumb in the sense that it only allows certain syscalls to be executed throughout the program.

    1. Re:Crude syscalls? by Anonymous Coward · · Score: 0
      Wouldn't this require more fine-grained syscalls in order to be effective? Without knowing how it actually works, I assume this system is dumb in the sense that it only allows certain syscalls to be executed throughout the program.
      Actually, this technology is a lot more powerful than you assume. Check out the URLs and the config language.
  45. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0

    We all see how well going with BeOS worked out for Be. :)

  46. Re:ha ha ha! OPENBSD = DEAD!!!111 by Anonymous Coward · · Score: 0

    Oh, wait just a moment, I believe the discussion as actually about privilege elevation, which is not a security hole, but rather a useful fine-grained access control for possibly dangerous system calls. My mistake.

    Yours and 99% of the readership of Slashdot, it appears. I think this story has finally proven that the huge majority of the Slashdot readership is both clueless and stupid. I think I'll just carry on trolling.

  47. what is root good for at all? by duplicatedAccount · · Score: 2, Interesting

    Operating systems should not have any super user (root) account at all.

    Why?
    Those super priviledges are an anachronism which doesn't fit the world. Most of us live in a democratic society. Democracy has historical won over the hierarchical societies - for a reason. Now if we want to model the real world, we are orced to map it to a kingdom like world. If there was no super user to hack a lot of vulnerabilities where gone.

    But we need administration! Yes, we need even more fine grained access control, but no entral authority. We need to grant and revoke rights and subrights among each other.

    How? The Paper Askemos - a virtual settlement describes (among other aspects of Askemos) a set theory based priviledge system which handles that. (You might also look at the slides from the most recent talk at the netobjectdays.org conference here
    (there only temporary).

    1. Re:what is root good for at all? by Corporate+Troll · · Score: 2, Informative
      Well, you might be right.. This only works on big systems where you *can* distribute different privileges over different persons This won't work for the single IT guy that has to manage the network of a small bussiness.
      Also consider this: who decides whom should get granted what rights? Well, that person is automatically superuser, because he simply can give himself all the rights without telling anybody. The problem with a System Administrator is simply that it should be a "person of trust", if you don't trust him, you should get rid of him. It's that simple.

      I can only say: I like being a tyrant on my systems. But I'm a fair and good tyrant for I respect my users and don't go and meddle with their data.

      You can have my root account if you pry if from my cold dead hands.

    2. Re:what is root good for at all? by bockman · · Score: 1
      Most of us live in a democratic society. Democracy has historical won over the hierarchical societies - for a reason.

      The reason has to to with ethics, human nature and emotions. Not with logic.

      Most of us work in some company,and companies have a hierarchical structure - for a reason: it is more efficient and, in theory, it is easy to spot where the fault is (in practice it is not, because power and responsibility are not coherently assigned : some have power, others get the blame when things go wrong).

      --
      Ciao

      ----

      FB

    3. Re:what is root good for at all? by Anonymous Coward · · Score: 0

      UserA : Hey UserB, I vote we reboot the system.
      UserB : Sounds good to me. I vote for it too.

      System: Going down for reboot NOW!!

      UserC : Hey!!

  48. Re:Finer-grained privs. Linux 2.5 has them too. +/ by pseudonymouse · · Score: 1
    A corollary to the 'more work to set up' issue you mention is that a method that adds 'finer grained security' can actually reduce security by adding too much complexity to be easily reviewed and maintained by sysadmins. The two errors I've observed have been either failing to apply a complex system properly, or granting permissions too broadly in order to simplify or speed up a necessary configuration change. This is especially bad when more than one person is involved in maintaining the configuration, but it can happen over time to a single sysadmin.

    The standard Unix security model, despite the 'courseness' of the method, is admirable for the ease with which one can set up a security policy, as well as audit the effects of an existing arrangement.

    I would agree that some finer control over root privilege is probably worth the cost in complexity, and 'systrace' looks like one promising contender in providing a means of doing that.

    --
    In a free society you are who you say you are. -- Mumford
  49. Re:Go OpenBSD!-Frame of reference. by quigonn · · Score: 1

    It's not ACLs. Think about it as some kind of evolution. First, there was the not-too-flexible Unix privilege system (users,groups, rwx bits). Then there were Access Control Lists. And the last step in the "evolution" is a role-based system with cool things like "there is no superuser". This is really a huge leap forward in the security of Linux.

    (although, OpenBSD's system call sandboxing via systrace is still nifty! :-)

    --
    A monkey is doing the real work for me.
  50. EROS: The Extremely Reliable Operating System by Anonymous Coward · · Score: 5, Interesting

    Security in UNIX can be messy. It is hard to add security late in the prosses without making it hard to use and understand.
    EROS (GPL) was designed for fine tuned privileges from day one. This is a natural part of the capability system.

    "EROS is a pure capability system. Authority in the system is conveyed exclusivly by secure capabilities, down to the granularity of individual pages."

    This is a secure design and a OpenSource OS.
    http://www.eros-os.org/

  51. That'll ensure the need of trained sysadmins again by Anonymous Coward · · Score: 2, Interesting

    I just wonder, why so complicated ? Mandatory Access Controls, Priviledge Elevation ... some administrative nightmare. Probably more security holes by misconfiguration that bad code. Think sendmail.
    Why do certain applications need to have root priviledges at all ?

    Wouldn't it be more wise, to allow certain users to actually perform certain tasks. Fighting the cause but the symptom.
    Like, defining e.g. via sysctl that user "named" is allowed to bind to port 52 on IP 1.2.3.4.
    (You could still use capabilities to disallow sysctl.conf when in multiusermode)

    That would be, only user "named" could bind, not even root to that ip/port.
    So instead of "lifting" a binary to temporary root priviliedges with some black magic to allow some syscalls, why not telling the kernel that this user may do this and this ...

    The difference is, you need no whatsoever "root faking". Don't let an application ever become root or needing rootpriviledges (when configured), no matter for how little time it may be.
    Instead, be able to grant privileges to users at lowest level, insteat of cheating on the higher ones.

  52. Democratic/Autocratic rule by nuggz · · Score: 3, Insightful

    An effective management system needs a heirarchy to direct and control it, "too many chefs spoil the soup".

    In Canada we choose representatives, who then as a group run the country without any real requirement for further consultation. For most people the democratic process ends after election day.

    Yes the ongoing stuff afterwards and the threat of not being elected, and protests are part of it too. But basically we choose our leaders, then they do what they want with little or no input from us.

  53. OpenSSH by dr00p · · Score: 1

    Too bad OpenSSH has too many if ( uid == 0 ), and it won't work unless launched as root.
    I tried to do a server with priviledge escaladation on linux, using RSBAC .But I failed on doing so because OpenSSH refuses to work as a nonpriviledged user .

  54. Assumptions by nuggz · · Score: 3, Interesting

    Existing programs will assume that if a process demonstrates one privilege that traditionally only a root process posesses, then it must also have all the others

    Assumptions cause trouble, lets assume that this buffer is "more than big enough for anything someone will put in there", that worked out REALY well didn't it?

    A proper program should check for each individual requirement, and act appropriately. Bad code has lots of assumptions, an assumption is a bug that hasn't been found yet.

    Most of my code isn't proper, I'm lazy.

    1. Re:Assumptions by g4dget · · Score: 2
      Assumptions cause trouble

      If you are saying that all assumptions cause trouble, that's logically absurd. Or do you write your code assuming that assumptions cause trouble? Well, then you better stop right now making that assumption.

      What it comes down to is that some assumptions lead to less security, other assumptions lead to more security. In particular, writing your program as if it were run as root--"assuming the worst case"--makes it more secure. On the other hand, writing your program assuming that something like systrace will protect the system even if your program has bugs will lead to less security overall. That's my point, and it seems that, except some confusion around the term "assumption", you actually agree with me.

    2. Re:Assumptions by mindstrm · · Score: 1

      Existing programs won't use this new system; it has to be programmed in.

  55. ntpd is critical Re:This is a good thing? by WolfWithoutAClause · · Score: 2

    Actually it can cause big issues. Many crypto systems rely on knowing what the tme is, so that certificates can be ignored if they are out of date. So if you spend 5 years cracking a certificate, the certs are probably then out of date, but then you hack the ntpd server and suddenly they work again, and ssh succumbing is moments away.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
    1. Re:ntpd is critical Re:This is a good thing? by evilviper · · Score: 2
      but then you hack the ntpd server and suddenly they work again, and ssh succumbing is moments away.

      I might believe that if I had no clue how SSH worked... Indeed, there are many other methods used to prevent replay attacks. If there were not... then replaying an SSH packet immediately after the original, would work. AFAIK, SSH doesn't even need clock sync between server and client. It does not use the clock at all.

      Kerberos requires the time to be close to syncronized to allow authentication... but again, a clock that has been adjusted will not suddenly allow a replay attack.

      Perhaps months later, you've been able to decrypt the encrypted packet, but so what? If you've decrypted the password, you aren't in need of changing the clocks to use it, and the password has likely been changed already anyhow.

      Perhaps you'd like to enlighten me as to some method you've got in mind, where changing the clocks can result in anything more than a possible DoS... I know many common network encryption systems quite well, and I can't think of anything very significant.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    2. Re:ntpd is critical Re:This is a good thing? by WolfWithoutAClause · · Score: 2
      Perhaps months later, you've been able to decrypt the encrypted packet, but so what? If you've decrypted the password, you aren't in need of changing the clocks to use it, and the password has likely been changed already anyhow.

      No it's an attack on certificates. Most certificates have an expiry date, because you think they could have been cracked. Once they have expired, if you have cracked a (presumably relatively short) public key and retrieved the private key you can misrepresent yourself but only if the time reference can be subverted, since the certificate will probably have expired by the time you've managed to do this.

      As you noted, Kerberos also has had issues in the past.

      Secure systems really need cryptographically signed time references.

      --

      -WolfWithoutAClause

      "Gravity is only a theory, not a fact!"
    3. Re:ntpd is critical Re:This is a good thing? by evilviper · · Score: 2
      mindstrm has it right... There are mechanisms such as certificate revocation lists in case one is mis-issued, or stolen.

      if you have cracked a [...] public key and retrieved the private key you can misrepresent yourself but only if the time reference can be subverted

      Well, hell... If you have the capability of finding private keys frome the public key, just get verisign's public key, then you can go about finding their private key. So instead of breaking one key for one site... you can break one key, and generate your own certs for any site.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  56. FreeBSD port? by Anonymous Coward · · Score: 0

    Is someone porting this to FreeBSD?

  57. I Think You Misunderstand by Anonymous Coward · · Score: 0

    Microsoft again is well ahead of the game!

    It seems that all of their privileges can be escalated by anybody to any level desired. Now how can you beat that? (chortle)

  58. It allosw for arguments checks, also by bockman · · Score: 2, Informative
    I had the same thought ('if it only checks the access to the system calls, how can I prevent/grant the access to single files/directories/port numbers?).
    Then I went to read the actual thing here, and I found that it also checks for syscall arguments, including some sort of pattern-matching (you can even change dinamically the system call arguments, making a sort of chroot-on-the-fly).

    It looks like a promising idea. My only concerns are :
    1 - performances
    2 - setting up a policy file requires a good knowlwedge of system calls, and not many programmers (not to speak of users or sysadmins) have that. The interactive policy setup helps a little, but it is _you_ that have to say 'yes' or 'no'.

    --
    Ciao

    ----

    FB

  59. Further complicating the *nix security system by Peaker · · Score: 5, Insightful
    Will never make it as close to the principle of least privelege as capability systems such as EROS, or KeyKOS. (And no, by "capabilities" I mean EROS-like capabilities, not the POSIX re-definition of the word "capability").

    True security will never be achieved in the *nix way (Complicated ACL's attached to every 'command' or 'system call'), due to problems such as The confused deputy.

    True security can only be achieved when there is complete identity between what requests a process can express, and what the process is authorized - only possible without a global namespace such as the set of system calls or the file system. Only capability systems are of this nature.

    OpenBSD may be secure in the sense that it has few bugs, where almost every bug in the every-growing code base regarding *nix security is a security hole, but its not secure in the sense that truly secure systems such as EROS are secure - by having (to sum it up):

    A small, finite, debugged code base that deals with security - and no extra security code.

    Simple security paradigm with a single simple-logic security test per request.

    Identity between what a process can request, and what the process is authorized to do.

    Fine-grained access control, with each process having capabilities to the exact objects it needs to access.

    Mathematically-found model, that has mathematically provable properties.

    The principle of least privelege (Your mp3 player cannot delete your files, your email client cannot listen on any port, etc).

    Flexible security: The complicated authorization graph is between processes, and not between users and objects. The concept of "user" is not part of the operating system. This is also achievable because capability systems often have orthogonal persistence, that is transparent persistence (sort of like Hibernation Mode, in its functionality), which tends to be of much better disk performance.

    No global namespace: There is no global namespace file system that all applications have access to. Perhaps a database of objects for the user's convinence that points via capabilities to the user's objects which are then passed on selectively. But there is no global file namespace that processes can access. All requests by processes must be carried out by activating a capability, whose mere existence authorizes the request. This instead of activating a system call from a global namespace of system calls, allowing any process to request almost anything, hoping that the security code regarding that request will properly deny that request. The global namespace allows extra communication and exploitation between processes that needn't be possible.

    1. Re:Further complicating the *nix security system by octogen · · Score: 2, Interesting

      There are still a lot of problems with capabilities.

      * Simple security paradigm with a single simple-logic security test per request.
      What if you delete an object? You'd have to revoke capabilities on all processes, or otherwise these processes could gain access to re-allocated space - this would compromise the object-reuse-protection mechanismn.

      The principle of least privelege (Your mp3 player cannot delete your files, your email client cannot listen on any port, etc).
      But you would have to define different capabilities for the same program used by different users, because you don't want user A to read user B's files with the mail program that both users share. Still not very simple.

      No global namespace
      Another thing which makes it pretty complicated. How do you manage your data? You could only manage mail files with your mail program, sound files with your mp3 player, and so on ..

      The catch is that user A has no way to know what other programs are running on behalf of user B. All of these programs will gain access to C when userB is added to the access list for C. There is no way to grant object access to a single program B without potentially granting access to other programs as well.

      In a capability system, the transfer is restricted to program B, because the capability is transfered only to program B. The default situation is that other programs do not gain access to the object.
      (http://www.eros-os.org/faq/basics.html#wha tis-capability)

      As soon as you break into a program which has a certain capability, you can transfer this capability to another program.

      The result is exactly the same: You're potentially granting access to all other applications. Still not secure.

      The most secure solution for very restricted data sharing is still compartment mode and information labeling.
      Modern unix environments use a combination of access lists (for access to objects), capabilities (for process privileges) and capability inheritance controls. One of these systems is the only Operating System which is evaluated at the TCSEC B3 level by NSA (for those who don't know it: that means ZERO DESIGN FLAWS)

      ---

      There are a lot of other problems with capability-based systems, especially when you want to share data between processes (and that's probably why you're using ONE computer for two programs and not TWO computers for two programs. Commercial applications need to share data).

      IBM's S/38 (the predecessor of the AS/400) had a capability-based access control, which needed only one initial security check, and then used the capability to allow access to a certain object.
      Object reuse protection was available, because neither S/38's nor AS/400's ever reuse a virtual memory address.

      On the AS/400 the capability flag in object pointers can't be used by user space applications any more, because of the problems related with revoking access to objects after a process has been granted access to an object by giving it a capability. Only the SLIC kernel allows itself to hold capabilities.

      Another very important thing (perhaps the most important thing at all) is, that a capability is nothing else than a piece of data which can be used by a program - for example, a pointer with a certain bit set or cleared, indication valid authority (security checks performed) or invalid authority (security checks not performed).

      Therefore you also need to protect these pointers from modification (IBM's AS/400 has pointer protection for object pointers built into the hardware, but don't confuse this with space pointers - this has only little to do with protection from buffer overflows and such, it's more like protected mode on other platforms, because AS/400s have a virtual single level store and for this reason you need some kind of protected pointer; complicated, as u can see).

      So how do you protect a program which has some capability from modifying some pointer or other data structure which has something to do with the capability? You still need something like a system call everytime you use a capability, because you need to go into kernel mode to be able to work with capabilities that are protected from modification by user space processes.

      ---

      I'd recommend you read 'Fortress Rochester'. This book was written by Frank Soltis, the system architect of the S/38 and the AS/400; in his book he explains some of the problems involved with capability-based access control, and why capabilites have been moved out of (even hardware protected!) system pointers on the AS/400.

    2. Re:Further complicating the *nix security system by Peaker · · Score: 2

      What if you delete an object? You'd have to revoke capabilities on all processes, or otherwise these processes could gain access to re-allocated space - this would compromise the object-reuse-protection mechanismn.

      This is an implementation detail. In EROS, for example, pages are never deleted. The "object" capabilities that actually refer to another process's object, are actually START capabilities that are easily deleted (or more accurately invalidated) efficiently, without risking reuse of revoked access. To support page deletion, you have to simply add another indirection level, which is not very expensive.

      But you would have to define different capabilities for the same program used by different users, because you don't want user A to read user B's files with the mail program that both users share. Still not very simple.

      Ofcourse different processes that obey the same code (the same program, so to speak) (in other words, different instances of the program) have different sets of capabilities. This is not at all complicated.

      Another thing which makes it pretty complicated. How do you manage your data? You could only manage mail files with your mail program, sound files with your mp3 player, and so on ..

      I have discussed this -- There is no global namespace accessible to all processes. There can easily exist a program that implements a namespace (database or hierarchy-like file system) for the user's convinience, but it still does not lend a global namespace for all processes. Then, the user can take capabilities to objects from this namespace, and pass them on selectively to both his mp3 player and his mail client - not limiting his options at all.

      As soon as you break into a program which has a certain capability, you can transfer this capability to another program.

      The result is exactly the same: You're potentially granting access to all other applications. Still not secure.


      I believe you have failed to understand the point behind the cited text. Bugs are not being discussed here - but the level of fine-grained security. Its merely saying that user-based access control lists force me to grant access to all of dan's programs, if I want to grant access to any of them. I cannot select which program I want to grant access to.

      If you have two-way communication with a program, you can still exploit/abuse it, but in capability systems, you can restrict the communication of programs such that they can only communicate with a select few.

      TCSEC B3 level by NSA (for those who don't know it: that means ZERO DESIGN FLAWS)

      This is highly subjective and depends on your definition of a "design flaw".

      There are a lot of other problems with capability-based systems, especially when you want to share data between processes (and that's probably why you're using ONE computer for two programs and not TWO computers for two programs. Commercial applications need to share data).

      There is nothing particularly difficult about sharing data in a capability system - you can easily share memory by passing a capability to the same page and mapping it into both of your address spaces.

      So how do you protect a program which has some capability from modifying some pointer or other data structure which has something to do with the capability? You still need something like a system call everytime you use a capability, because you need to go into kernel mode to be able to work with capabilities that are protected from modification by user space processes.

      Yes, capabilities are protected by the small trusted kernel-level code base. Yes, this requires a system call per-invocation. But capabilities are only invoked to perform IPC and to request kernel-level services so this is not worse in performance than a *nix variant.

    3. Re:Further complicating the *nix security system by octogen · · Score: 1

      Bugs are not being discussed here

      Ok, but in real life we have got bugs in software. Only adding security features without any assurance, that these features can be effectively enforced by the TCB is rather worthless in real life use.

      you can restrict the communication of programs such that they can only communicate with a select few.

      You can do the same by using Mandatory Access Controls, and this is actually more effective, because MAC protection is not only enforced on objects (data containers), but rather on the information contained inside objects, depending on the sensivity of the information.

      We always want to protect some piece of information. By using capabilities you just turn access to an object on or off. By using MAC you define a security policy, which automatically manages access to sensitive information, no matter in what kind of object it is contained or where it comes from.

      Yes, capabilities are protected by the small trusted kernel-level code base.

      As on all other operating systems. There are unix operating systems that are virtually impenetrable (however, as we know, nobody can guarantee a 100% secure solution).
      If you don't want to let programs access data which does not belong to the program - simply lock it down into its own compartment and all the problems are gone.

      There are only few way which allow for hacking a high-assurance OS:
      * Administration mistakes
      (No difference between capability based and access list based systems)
      * Kernel bugs
      (No difference here...)
      * Exploitation of highly privileged processes
      (Which may or may not exist on both types of system, depending on how the system is used)

      I'm still not convinced that capabilities are really better than what we already have. EROS lacks information labeling, and it seems to be even more difficult to administer. It's just not flexible enough. To me it looks more like a data sharing network between multiple LPARs on a Mainframe or something like that, and that is absolutely not a very useful solution for handling sensitive data.

  60. This looks like a good idea... by Anonymous Coward · · Score: 0

    ... but it must be carried out well. I think that servers should be a combination of the old suid method and the new systrace. For example, If I run an apache server as user apache, and don't setuid in it, then if some one else finds an intrusion vector, let's say an openssl exploit, and then gets a shell as user=apache, he can then KILL the apache SERVER and all its threads. Then, the intruder can run her own server and bind it to port 80. Instead of running it this way, I think the apache server should be run as the old way, but setuid to a different user, apachea for example, then drop privilages for each of the client threads. This way, the intruder cannot kill the server (just the client threads... I've got some good code to do that) and cannot bind to 80 except in the httpd binary... So just because there's a new method for security doesn't mean that you shouldn't use the old as well.... Have fun hacking, ~DW~

  61. ACLs on users rather than binaries? by Anonymous Coward · · Score: 0

    Would/could it be a good idea to apply the acls to users or groups instead of binaries? As I see it it would make administration easier...!?

    JC

    1. Re:ACLs on users rather than binaries? by octogen · · Score: 3, Informative

      It's not about ACLs, it's about privileges.

      There are different kinds of philosophy regarding privilege management.

      Granting privileges to binaries, authorizations to users
      Trusted Unices commonly grant privileges to binaries, but only let the process use the privilege, when the user who executes the binary has got a certain authorization.

      For example, there is one Authorized Privilege Set (APS) and one Privileged Authorization Set (PAS). You put the PV_FS_MOUNT privilege into the APS, and you put the MOUNT authorization into the PAS.
      If the user who executes the binary has a MOUNT authorization, then the process gains the PV_FS_MOUNT privilege, and the user can use the program to mount or unmount filesystems.
      If the user who executes the binary does not have a MOUNT authorization, then the process does not gain the PV_FS_MOUNT privilege, and therefore the user can't mount or unmount filesystems.
      (This explaination is a bit simplified, because you would also have to look at the limiting privilege set or limiting authorization set, but that does not matter here)
      This is how Pitbull .comPack works, which is an EAL4 (exceeding B1) kernel security addon for Solaris and AIX.

      Granting privileges to users, running processes with adopted authority
      The other way is to grant privileges to users, and then to let a binary run with the privileges of a specific user added to the privileges of the current user (Adopted Authority).

      For example you put the ALLOBJ privilege into the privilege set for user 'John', and you give some binary an adopted authority from user 'John'.
      User 'Mark', who does not have the ALLOBJ privilege, executes the binary, and the process gains (adopts) all privileges from user 'John', so user 'Mark' can run the program with the ALLOBJ privilege.
      This is how the SLIC part of OS/400 works (SLIC is the operating system kernel of OS/400, running on IBM AS/400 computers).
      [Tell me if I got something wrong here, I'm not an OS/400 expert]

      Granting privileges to users makes administration easier and it's powerful enough for almost any scenario; granting privileges to binaries makes it a bit more difficult but also more powerful, and i guess that's why it is the preferred method used by Trusted Operating Systems.

  62. Questions by kanthoney · · Score: 1

    1. Is this going to be in the new 3.2 release in November?

    2. Do programs have to be re-written to take advantage of this feature?

    1. Re:Questions by Anonymous Coward · · Score: 1, Informative

      1. Is this going to be in the new 3.2 release in November?

      Yes. November 1st, actually. http://www.openbsd.org/items.html#32

      2. Do programs have to be re-written to take advantage of this feature?

      No. http://www.citi.umich.edu/u/provos/systrace/

    2. Re:Questions by Anonymous Coward · · Score: 0

      1.) No, systrace is only in -current, the code for 3.2 is frozen.
      2.) No.

  63. Re:Finer-grained privs. Linux 2.5 has them too. +/ by tweakt · · Score: 2
    The bad thing about finer control is that it takes more work to set up. "Learning" from program runs helps, but it doesn't fully solve the problem - there are usually many conditions that aren't triggered by simple runs yet can happen in real life.
    It would seem to me, given source code, one could easily determine each and every syscall the program could possibly make. Perhaps programs could progamatically drop those certain priveledges it doesn't need, just like now how apache will drop from uid root after binding to port 80? The "fork" privelege, once dropped lets say, can never be reaquired. It would be really nice in an auditing sense, to be able to look at a process and see the list of priveledged syscalls.
  64. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0

    The key word there is "integrates."

    Notice is doesn't say that Jaguar "is state-of-the-art FreeBSD". It says that it "integrates features from ... FreeBSD". If Mac OS X were BSD, it wouldn't need to "integrate" anything.

  65. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0

    NeXTSTEP was Mach with a BSD system call layer and pieces of a BSD userland.

    Just because an OS has pieces of BSD doesn't mean it is BSD. If I coded a kernel module for Windows, with an 80h interrupt handler for BSD system calls, would that make it BSD? Because that's basically what Apple did for Mac OS X.

  66. Don't get me wrong, I like capabilities security.. by scrytch · · Score: 5, Interesting

    But really, it needs to get out of the ivory tower and start giving us examples that work. The Confused Deputy is about compilation, sounds like it was an issue from a VAX box from the 80's, and not only is so utterly irrelevant to Joe User, it's not even all that terribly accessable a metaphor to people using gcc!

    The erights folks are using more accessable examples (a web browser), but in their examples paint a picture of the land of popup hell, where every app has to ask to do every single operation. Write to one file, one popup. Write to another file, another popup. Open your address book, another popup. Experience shows that users click "yes" or "ok" on popup dialogs or whatever button they can just to make the damn things go away and make them stop coming back. My own mother would ask me, "how do I keep this from asking me these questions all the time?".

    I know it doesn't have to work this way -- an installer can give an app a pre-set list of capabilities that one should be able to verify, log, change, audit, revoke, etc. Roles can be created out of capability groups to put some of the ease of ACL's back into the equation. But their their own example stories don't even make that clear. It's ivory tower, all about security theory without an ounce of human factors other than "the user will learn" and some laughable user education story about POLA.

    The average server is reasonably secure right now, since it performs dedicated tasks and is administered by what one presumes are trusted people. It's the desktop that's providing fertile ground for attacks. Thousands of infected desktops hitting one server, and well, wouldn't it be nice if those desktops were secure? They won't be if security doesn't take the human factor into account.

    --
    I've finally had it: until slashdot gets article moderation, I am not coming back.
  67. Multiple privilege levels by coyote-san · · Score: 2

    I've often wished that *nix would add a third privilege level between the kernel and user-space. It would be ideal for trusted libraries.

    As a specific example, think of libc. This library is always in memory and is used by almost every program. It would be trivial to have the kernel load it, plus a few other key libraries, into a special 'ring' between the kernel and user-space as part of the boot process. These libraries could be appended to the kernel image (e.g., via an embedded tar file).

    User-space programs could call it as usual, but internally these libraries could never depend on user-space (instead of other trusted) libraries and could never be corrupted by user-space applications.

    (Background: the Intel rings follow the standard protocol that a higher ring can call a lower ring, but can't modify data in it. Contrawise, a lower ring can modify the data in a higher ring but can't call it. Ring 3 is user space, and ring 0 is the kernel.)

    --
    For every complex problem there is an answer that is clear, simple, and wrong. -- H L Mencken
  68. Re:Finer-grained privs. Linux 2.5 has them too. +/ by Anonymous Coward · · Score: 0

    And the failure to apply security policy using standard Unix facilities.

  69. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 2, Insightful


    At least in the case of MacOS X, it's not Mach. It's a stripped down version of Mach with a BSD personality. And only that personality. It incorporates a large amount of BSD's kernel and userland.

    It's as BSD as NetBSD/OpenBSD/FreeBSD are. It's BSD.

    Windows, on the other hand, would be Windows with a BSD compatibility layer.

    To quote Apple on the subject:
    "The stability of Mac OS X begins with Darwin, an Open Source, UNIX-based foundation. Darwin is a complete BSD UNIX implementation, derived from the original 4.4BSD-Lite2 Open Source distribution. Darwin uses a monolithic kernel based on FreeBSD 4.4 and the OSF/mk Mach 3, combining BSD's POSIX support with the fine-grained multithreading and real-time performance of Mach."

    Now, repeat after me: "BSD is an operating system, not a kernel."

  70. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0


    What tosh!

    So if you ever add to the code of anything, it ceases to be what it was?

    FreeBSD's current kernel differs substantially from BSD4.4 - but it's still FreeBSD.

    There's far more BSD than Mach code in Darwin - and NetBSD used to contain Mach code. So, by your standards, NetBSD isn't a BSD either?

    And, of course, at one time Linux had BSD code in there too - but it was still Linux. And Linux is just the kernel, to boot.

    Get real.

    "If Mac OS X were BSD, it wouldn't need to "integrate" anything."

    MacOS X isn't FreeBSD. MacOS X is BSD.

  71. Re:I'm sick of weekly Linux kernels, I'm going BSD by Anonymous Coward · · Score: 0

    What weekly Linux kernels?? *BSD is no better than Linux for all intents and purposes.

    Everything has its time and place -- and you'll note that Linux seems to be much more in demand, as well as having more momentum in most areas of development.

  72. Style. by Grendel+Drago · · Score: 2

    Well, you might want to start by changing "grammar, spelling, and style" to "grammar, spelling and style" to conform to the official AP article-writing style.

    (I worked at a newspaper; there were posters everywhere reminding us not to add that comma.)

    --grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
  73. Cerber module for FreeBSD by dagooncrn · · Score: 1

    As I know, the idea was taken from Cerber kernel module developed for FreeBSD (started long time ago). Available at http://cerber.sourceforge.net/

    --
    -- mg
  74. Re:Using ssh to rid oneself of suid/sgid (Bad!) by Anonymous Coward · · Score: 0

    Just be careful with it! This is something a lab I worked at about 15 years ago did using rlogin. We gave a different password to each job. For example, "rlogin -l dcollector localhost" restarted one of the data collectors that had to run as root since it used a low port. The problem comes when you can use one of the tools as an exploit. For example, one of our lab equipment's data collection server programs would allow you to edit certain files by opening-up vi. Then using vi, you do the ":! /bin/sh" command, and you have a root shell. Another example, we had a user (who had just been fired) overwrite /etc/passwd by specifing that file as the output file for one of our root privileged commands ("SELECT ... FROM table WHERE ... INTO OUTFILE /etc/passwd"). Do you really trust all of the applications you're allowing the users to run? Neat idea, but it can be dangerous.z

  75. Its behind... by Penguinoflight · · Score: 1

    For instance, Microsoft has had Privilege Elevation scince the beginning of networking!

    --
    "And we have seen and do testify that the Father sent the Son to be the Savior of the World"
    1 John 4:14
  76. Cheap: Re:Doesn't any READ ? by Black+Copter+Control · · Score: 2
    Does this mean X will run slightly slower compared with an suid installation?

    You shouldn't have any extra code running on most system calls. System calls could run exactly as normal. The only time you have to do any extra checking is when a call would (otherwise) cause an exception.

    The first thing that the exception code would have to do is see if there is a priv exception for that call (in which case it would be allowed). Otherwise you would get a normal error. Voila! all done.

    Under this model, priv elevation would only cause a real performance hit if you did a huge number of 'dangerous' calls. The standard for most current SUID programs is to front load the dangerous stuff and then drop prives. In other words, most SUID program only have a couple (or a couple dozen) 'root' calls. Any programs that do more than that are likely be non-SUID (and need you to be root before you start them).
    Apache, for example, might only need an elevation check when opening port 80 and (perhaps) the log files, not on (the more numerous) write/read calls. Similarly with X.

    --
    OS Software is like love: The best way to make it grow is to give it away.
  77. We can't credit NetBSD.. by Anonymous Coward · · Score: 0

    Theo will have a cow.

  78. Different reasons. by mindstrm · · Score: 1

    Most certificates have expiry dates so that the issuing companies can make more money selling you a new one.

  79. Re:That'll ensure the need of trained sysadmins ag by Dogcow · · Score: 2, Interesting

    The flaw with this is that your named can still be subverted, and run any number of other syscalls, for things like reading files, creating files (albeit in places with 777 perms), binding other ports, exec a shell, fork some other app (a trojan that was uploaded to /tmp?), and so many other things.

    You're talking about minimal uid privilege, which isn't really "minimal" at all.

    systrace is about minimal syscall privilege - unless you as the sysadmin have explicitly allowed all of those things above, named can do nothing whatsoever. The policy would perhaps elevate privileges to bind to port 53/udp&tcp only on a single IP address, read configuration files from a certain path only, load certain shared libraries (libc is the obvious one), read /etc/localtime and write to certain network sockets (syslogd? nameserver queries/responses?). It can't write to /tmp, can't exec, can't fork, can't read other files in /home or /etc or elsewhere, or any of the sorts of potentially dangerous things that vulnerable apps have been known to do (the Apache/OpenSSL worm comes to mind).

  80. Re:That'll ensure the need of trained sysadmins ag by mindstrm · · Score: 1

    So what happens when someone finds an exploit for named, gaines access to your system as named, then decides to run their own version of the daemon? Why should their program be allowed to bind to that port?

  81. Better yet... by TheSHAD0W · · Score: 2

    I wasn't thinking about how nice *nix is at managing files... Just check the binary's last changed date. No need to parse through it to calculate the CRC on each execution.

    This WOULD be easier for a hacker with root to spoof, but that wouldn't be its main purpose.

  82. Re:*BSD is dying by Anonymous Coward · · Score: 0

    Imagine that, *BSD died. What would Linux and Windows do? Oh, and OpenBSD's OpenSSH that they ported to Linux and other OS's.

  83. Re:That'll ensure the need of trained sysadmins ag by Anonymous Coward · · Score: 0

    Like, defining e.g. via sysctl that user "named" is allowed to bind to port 52 on IP 1.2.3.4.


    You can do this with systrace's priv esc code:

    native-bind: sockaddr eq "inet-[1.2.3.4]:52" then permit as root

  84. Re:Sorry but MacOSX is based on Mach kernel and so by Anonymous Coward · · Score: 0

    Besides which, Mach was itself an offshoot of BSD -- an attempt to rearchitect the monolithic BSD kernel as a set of user-mode servers running on top of a microkernel, with the BSD userland running on top of those servers.