Slashdot Mirror


OpenBSD Gets Even More Secure

Telent writes "As seen in this post by Theo de Raadt, OpenBSD is getting even more secure, working on smashing script kiddies running buffer overflow exploits dead. Tightening PROT_* according to the POSIX standards and creating a non-executable stack on most architectures are just two of the recent enhancements, most of which are in -current now."

24 of 362 comments (clear)

  1. linux should have non-exec stack by defualt by stonebeat.org · · Score: 4, Interesting

    I like the way, BSD makes non-exec stack default. I think in the latest linux kernel, you can make it non-exec at compile but it is not default.

  2. open source security by calib0r · · Score: 3, Interesting

    I think its good that organizations such as OpenBSD are taking the initiative to combat DoS/DDoS attacks. I see a lot of companies such as ISS and SecureWorks blowing smoke about "preventing hacker intrusion" when the real threat these days is worms such as Slammer. I really don't know a whole heck of a lot about DDoS attacks, but I've seen a lot of systems crumble under them, even if the os installed on the systems is unaffected. Wonder when Cisco will start doing things like this with IOS? (Unless they already are?) Discussion encouraged.

    --
    -===- "Those who would sacrifice freedom for security deserver neither" -===-
  3. Interresting...(might be OT) by Mathness · · Score: 3, Interesting

    This, and other recent, articles about BSD have made me consider giving BSD a test run on one of my computer. It appears to have some interresting posibilities. And it should be worth getting to know better, it could be the right tool (OS) for some types of "jobs".

    The problem is always where to start, I assume there is no BSD flavor as easy to install as Mandrake (just to pick one), but then I am a happy user of Debian (2.2) floppy installer. A few hints to start out on, for instance a install/easy of use comparison of the various BSD's would probably be helpful to more than a few readers.

    --
    Carbon based humanoid in training.
    1. Re:Interresting...(might be OT) by nuintari · · Score: 5, Interesting

      I'm gonna have to disagree with you on several points here.

      1. I have found Open is actually easier to install than Free. Granted, this could be due to my love of purely simple methods, which the Open installer is. net is, in my mind, the hardest of the three, with free being very much in the middle.

      2. I fail to see how Open is slwoer and more limited. It is true that Free has the most amazing tcp stack in production today, but Open's is pretty tight, and is plenty efficient in disk I/O and CPU usage. Its also not limited in any way. The stock install has a lot less "stuff" in it than most other OS's, but I consider that a definate bonus. "Ports" in a few extras, and you have an awesome, httpd, ftp, mail, dns, whatever server. In my company, we have dual purpose dns/mx backup OpenBSD machines.

      3. While it is true that OpenBSD makes a dandy firewall, and quite frankly, I would use nothing else but OpenBSD for said purpose, that's not all its good for, and this "typecasting" has to stop. Does just fine in any other role too, hell, I have an OpenBSD DESKTOP. DESKTOP!

      4. As for an Open box getting owned, not surprising. The final step in a secure OS, is knowing how to maintain it, and miantaining Open is no picnic, once free is up and running it is far easier to lean to patch it. Both are fairly simple once ya get the hang of it, but the free learning curve is much faster. And quite frankly, a lot of businesses deploy tons of freebsd machines, lots of admins know it. Open is a newer project, with a smaller real world footprint.

      Just my unspellchecked thoughts. Its almost my birthday, I no longer feel compelled to check my typos out.

      --

      --Nuintari

      slashdot : where an opinion can be wrong.

    2. Re:Interresting...(might be OT) by shamilton · · Score: 3, Interesting

      1. I can't really comment, I've only watched it be installed. I would agree that NetBSD is the hardest, the installer doesn't really seem to flow. Personally I would prefer to just receive a shell when I put the CD in. I can fsck, disklabel, fstab, and untar all by msyelf, thank you very much.

      2. OpenBSD and NetBSD are definitely a lot slower than FreeBSD. NetBSD feels a lot less responsive than FreeBSD. Both take much longer to boot. I believe the reason is simply that speed hacks are hard to port and are potentially insecure.

      3. My original post was going to address OpenBSD desktops, but I decided not to. Using OpenBSD as a desktop is sort of like using a weed whacker to mow your lawn, then saying "Weed whackers do just fine in any other role!" Maybe so, but there are better solutions available.

      4. This wasn't a maintainence thing. As I recall, it was the sshd thing. It got hit right away (as the sshd vulnerability was being announced) by a script which hit all our boxes. The irony is that the FreeBSD boxes were not vulnerable, because of patches to OpenSSH made by the FreeBSD developers. This is actually something of a recurring theme with FreeBSD: major application is vulnerable except for the one shipped with FreeBSD, due to local patches. Personally I trust the network security of FreeBSD better than I do OpenBSD, but I believe it would be easier for a user to break root on a FreeBSD box than an OpenBSD one.

      I enjoyed your sig.

      sh

      --
      "[A] high IQ is like a Jeep; you will still get stuck, just farther from help!" --Just d' FAQs, c.g.a
  4. Because for many, many years... by leonbrooks · · Score: 5, Interesting

    ...Microsoft's goal has been to add more saleable features and more handcuffs for their users. Bill has a moneymaking mania. Then they expect a month of bugfixing to make up for over 100 months of bugmaking.

    OpenBSD, on the other hand, probably has 100 months of bugfixing up its collective sleeve. I wonder if they expect that a month of portting applications will make them more popular? (-:

    IRL, a month of porting applications would simply mean an order of magnitude more security holes to fix.

    Making OpenBSD completely thread-safe in preparation for multi-CPU stuff is probably a steep hill to climb, too. However, the kind of stuff that OpenBSD does well probably means that very few single-CPU OpenBSD machines will be CPU-starved until long after they're disk-I/O or net-bandwidth-saturated. Which means that it makes more sense to cluster than to proliferate CPUs in an already-saturated environment.

    --
    Got time? Spend some of it coding or testing
  5. it will be impossible to JIT code on OpenBSD by Anonymous Coward · · Score: 1, Interesting

    Say goodbye to JVMs which do on the fly instruction creation. Can this OpenBSD page protect mumbo jumbo be set on a program by program basis?

  6. Thank goodness - it's about damnned time! by mbessey · · Score: 2, Interesting

    I never did understand why this particular set of problems was allowed to exist on most x86 UNIX-like operating systems.

    It's too bad that they weren't able to completely seperate executable and readable memory, but it's good to see somebody finally taking these problems seriously.

    And as a bonus to making the system more secure, these changes will make it easier to debug stack-smashing bugs.

    -Mark

  7. Re:Why not Windows by PetWolverine · · Score: 3, Interesting

    Because they're making their OS for profit, and they find they can sell a shitty OS. It costs extra to make it not be shitty, and it's not worth it to them.

    Notice that it's apparently worth it to Apple--hence the move to a Unix base. This is OpenBSD; Darwin is based on FreeBSD, right? But maybe somebody will find a way to incorporate these changes into Darwin, or maybe Apple will do it themselves. I would certainly appreciate it if they did.

    --
    I found the meaning of life the other day, but I had write-only access.
  8. But What About...? by ewhac · · Score: 4, Interesting

    Theo de Raadt writes:

    W^X is a short form for "PROT_WRITE XOR PROT_EXEC". The basic idea here is that most buffer overflow "eggs" rely on a particular feature: That there is memory which they can write to, and then jump to.

    What if there was no such memory? Does a normal Unix process have memory that is both writeable and executable? Turns out they do: [ ... ]

    But do they need it? [ ... ]

    If you're running a JIT compiler/interpreter or other dynamic code assembly, you sure as hell do.

    I can see how you might be able to write dynamically generated code to a page, then turn off PROT_WRITE and turn on PROT_EXEC before jumping to it. However, this is almost certainly two trips into the kernel, each involving tons of permission checking. So performance will likely suffer, which negates the whole point of doing JIT in the first place.

    I like his survey of MMU architectures, though.

    Schwab

    1. Re:But What About...? by epine · · Score: 2, Interesting


      There are too many presumptions in this comment about JIT. The protections Theo is using are imposed by the VM system, which means the protections are relative to a *view* of memory. It's not obvious to me that the JIT compiler needs to share the same view of memory as the process for which it compiles. I can't bring myself to believe that for a typical invocation of the JIT compiler, one process transition is a dominant cost.

  9. What about other BSDs? by PetWolverine · · Score: 3, Interesting

    Anyone know how portable these modifications are to other BSDs, notably Darwin?

    --
    I found the meaning of life the other day, but I had write-only access.
  10. Oh joy... over bufferflow by Woodrose · · Score: 5, Interesting

    Ancient and venerable 24-bit CDC 3150 machine in 1970 solved buffer overflow problems by pre-writing return jump to execover (pass control to data area and bang, you're dumped) instruction throughout user space. When you got the dump, the ASCII interpretation was "ojoy". So you got about thirty pages of blue-bar printout saying "ojoyojoyojoyojoy...".

    --

    Thou hast damnable iteration, and art indeed able to corrupt a saint - Henry IV, Act I scene II

  11. Re:Why not Windows by Penguinoflight · · Score: 2, Interesting

    Oh, they certainly can, even though a closed source model is much harder to be secure, given the smaller test, and development base. The problem is, it's simply not a high ENOUGH priority at most businesses. And why should it be, when people buy for marketing schemes, pretty graphics, and "but I just want my $10 modem to work" stuff.

    Security isn't just a unix/windows war though, Solaris has had big trouble with security in the past, and so has IRIX. I haven't heard much about AIX, or HP-UX, but likely those machines wont be used for external servers anyway, so it's not QUITE as big a issue.

    --
    "And we have seen and do testify that the Father sent the Son to be the Savior of the World"
    1 John 4:14
  12. Re:We are much more secure by Ryan+Amos · · Score: 3, Interesting

    I don't think anyone claims OpenBSD is not an innovator. But it really isn't that hard to secure a *nix box from most security breaches. The biggest part is keeping current on patches and staying away from software such as BIND and sendmail. I can still exploit root on an OpenBSD machine with a crappy CGI. If you need to hack the data on a machine, there are low level exploits (though if you have data someone would want to hack, you should be encrypting your filesystems.)

    I do admire OpenBSD's approach to software development; it can be called responsible if nothing else. It's just that for volunteers who basically code other *nix OSes, code auditing is not nearly as much fun as porting your OS to a Nintendo. :)

  13. You can do JIT by ^BR · · Score: 5, Interesting

    You just have to explicitly mprotect(2) the memory where it happen with PROT_EXEC|PROT_WRITE. The fact that on some OSes it can work without doing that is actually a bug in these OSes.

    What the change is doing is the right thing, using a minimum privilege way to achieve more security. If some static code actually contain data that look like machine code it could be executed this wont be possible anymore.

    Non executable stack by itself was far from enough as most program have some way of putting things on the heap or elsewere for an attacker and he could jump there instead of jumping on the stack. Coding an exploit for OpenBSD will get real tough now, even if there's an actual buffer overflow.

  14. Re:Most Secure OS by modulo · · Score: 4, Interesting

    Theoretically, a capabilities-based OS like EROS would be even more secure than OpenBSD, if the implementation was as careful. Of course, the same tradeoffs that OpenBSD makes would be even more extreme (application support definitely, performance probably I would think)

    --

    ...but the language is MUMPS, which I will not utter here

  15. Re:oh ya, right by Loki_1929 · · Score: 3, Interesting

    OpenBSD, and BSD in general is so much more secure than any version of Windows, it's laughable to even compare the two. This isn't about tightening up their own code, this is about tightening their code to prevent poorly-written 3rd-party applications from becoming launching platforms for attacks against OpenBSD machines. Microsoft's main problem with security isn't 3rd part apps, it's the millions of lines of unsecure and buggy code in highly integrated applications such as Internet Explorer and Windows Media Player.

    To compare this to Trusted Computing is like comparing apples and black holes.

    --
    -- "Government is the great fiction through which everybody endeavors to live at the expense of everybody else."
  16. Re:Nice, but doesn't address the bigger problem. by dmiller · · Score: 4, Interesting

    The bigger problem is that the principle of least privilege is not adhered to in world of Unix. Programmers will always write bugs and applications will always have vulnerabilities that can be manipulated. Manipulation of services should only effect the service being manipulated, not the whole system. For example, services should have NO access to anything by default.

    That is very much the approach that OpenBSD is taking - e.g. with privilege separated OpenSSH. If you exploit OpenSSH before authentication, you are unprivileged in a chroot that you can't write too. While this is not invulnerable (you may still abuse kernel bugs to escalate your privilege), it is a good deal better than before. OpenBSD also provides you tools with which you may further protect yourself: systrace - a system call policy checker.

  17. You're sort of right by anonymous+cupboard · · Score: 4, Interesting
    Theo doesn't like to enable functionality on OpenBSD until he is fairly certain that it is secure. The process isn't perfect, for example, he has also seen the OpenSSH problems - but most of the time it works.

    Forget about security through obscurity, this is security through paranoia. Sometimes, it is justified.

  18. Re:Why not Windows by geekoid · · Score: 3, Interesting

    "Windows was meant to be more of a "user-friendly consumer OS"."

    that is no reason for it, that is just an excuse.

    Windows is written to meet demand, not to exceded it. It could be secure, but they really don't care.

    There starting to care, unfortunatly they would have to do a real redsign from the ground, by people who where experts, and had never seen any other windows code.

    Do you think Car companies would care about safety if you were forced to sign a waiver and couldn't sue them? Hell, you'ls be lucky if the brakes worked after a month.

    I'd rather hace to do an update once in a while by hand, then an update every couple of months with push button convience.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  19. Re:Nice, but doesn't address the bigger problem. by ctr2sprt · · Score: 3, Interesting
    The problem is simple: the controls we have right now are far too coarse for the things we want to do with them. Running daemons as root is like putting out a match with a lake. They never need all the privileges of root. We need a way for root to drop its privileges selectively - or, better yet, a way to confer specific privileges to regular users. "The user apache can bind to port 80 without being root." "The user ftpd can chroot without being root." And so on.

    It would also be lovely to see the tool which manages all this unify all the ACL-like aspects of the system into a single interface. Firewalls, filesystem ACLs, and privilege delegation are all remarkably similar, it'd be great to be able to define them selectively in groups (I think SELinux calls them "contexts") and confer them to various processes. Daemons can bind to ports, but not regular users? Easy: set the firewall ACL policy to deny, then grant the "daemon" context an exemption. Then tie in other useful privileges, like the ability to write to /var/run and send messages to syslogd. All these things are obviously related conceptually, but currently you'd need 3 tools to do it all (I don't think it's possible to regulate syslogd access this way, period, but I'm being optimistic and assuming it is).

    Unfortunately, from what I saw of SELinux when I last used it, all this is some time off... especially the part where it's easy to administer and use. But to end on a positive note, there are a bunch of people who recognize this problem and are working hard to correct it.

  20. More Examples (incl. Linux) by modulo · · Score: 3, Interesting
    Some others that have come up for discussion before (?) are:

    Trusted Solaris

    and

    Pit Bull from Argus Systems

    IIRC, these are more common Un*ces that are patched to provide "capabilities" - that is, instead of the root being the one-size-fits-all user that has enough privileges to get anything done, different kinds of access are broken down so that if a running program getw 0wned, it limits the damage.

    Theo's answer to that probably would be, "code it right in the first place and it won't GET 0wned!!!", which is a valid point, the devil (no pun intended) is in the details.

    BTW, I first came across EROS comes from Alan Cox in an interview with Robert Metcalfe a few years ago (remember the "Open Sores" series of articles? Great trolling, Bob!), in response to a question of what he thought was going to be the next big thing after Linux. He was impressed with the response (having previously accused Linux-y types of monomaniacal zeal), but it didn't overturn his opinion at the time that Linux was doomed. Oh well. (This comes to you courtesy of the similarly fated Internet.)

    --

    ...but the language is MUMPS, which I will not utter here

  21. Re:What I use BSD for by nitehorse · · Score: 2, Interesting

    Just had to comment on this line:

    FreeBSD clings too much to traditional Unix.

    Heh.

    And what did you expect it to cling to? Traditional VMS? Don't forget that FreeBSD IS UNIX. FreeBSD is a direct descendent of the code from the original 4.4BSD. THIS IS UNIX. Love it or leave it.

    (Personally, I love FreeBSD and 5.0 kicks major ass. Linux is cool, but I use Gentoo, which is arguably more BSD-like than any of the other distros except for maybe Slackware.)