OpenBSD 6.0 released
41–50 of 139 posts
Re: OpenBSD 6.0 released
#42Talking about security, I'm hoping for a bound-checking memory-safe C compiler to eventually made it into something like OpenBSD or FreeBSD and be used by default for all ports and packages. Almost no software there would suffer from the overhead, and OpenBSD doesn't even promise or try to be very fast, it's a perfect place for it.
Is a "bound-checking memory-safe C compiler" even possible in the general case without implementing a new Rust-like language?
Re: OpenBSD 6.0 released
#43Earlier quoted context omitted.
Use mprotect(2) on the region of memory that the program wants to make executable. http://man.openbsd.org/OpenBSD-current/man2/mprotect.2 This is good portable programming practise anyway...
So they should create a writeable mmapping, write the code into it, then change it to W^X using mprotect? How does this stop an attacker doing the same via ROP? ADDED: The approach that comes to my mind is that they could have two processes. One process has the sourcecode, and pages where it can write code. The other process can execute the code. The code updates performance counters which the JITing process can read…
Wait, isn't that backwards? Doesn't the use of W^X necessitate the use of ROP? Right now a JIT has lots of memory that is W&X so you just need a memory exploit to inject some code and then find a way to jump to it, no need for ROP.
But if you implement W^X this won't work because now you can't inject code with just a memory exploit, you also have to set it to executable with mprotect(2). So instead you use ROP, and inject only data which includes jumps to carefully selected sections of code in libc, etc, that implements an exploit. I mean you could probably use ROP to run mprotect, but by that point it's pointless because you're already running code on the system right?
Re: OpenBSD 6.0 released
#44Talking about security, I'm hoping for a bound-checking memory-safe C compiler to eventually made it into something like OpenBSD or FreeBSD and be used by default for all ports and packages. Almost no software there would suffer from the overhead, and OpenBSD doesn't even promise or try to be very fast, it's a perfect place for it.
Is a "bound-checking memory-safe C compiler" even possible in the general case without implementing a new Rust-like language?
The way it works is that the C89 spec defines memory in terms of objects, and it's illegal to even think about a pointer that doesn't point into an object (or to the byte after). That is, it's not just illegal to dereference it, you're not even allowed to create one.
So, because you know that every pointer must point at an object (or NULL), you encode the object and length of the object into the pointer. So pointers end up being a tuple of three words: object, object length, and offset. Now you have enough information to bounds check all accesses while still allowing pointer arithmetic within an object.
Of course, in real life, people do all kinds of wrong things which de-facto C allows but which de-jure C doesn't, such as pointer arithmetic between objects. But the spec does allow bounds checking.
(I abused this to implement a C to Perl compiler.)
Incidentally, fun fact: the 286 memory segmentation system supports mostly-bounds-checked pointer accesses in hardware.
Re: OpenBSD 6.0 released
#45Probably not going to happen, but it runs on some other ARM7 SBCs. Mine is running FreeBSD currently, but where is the geek cred in that?
Re: OpenBSD 6.0 released
#46Re: OpenBSD 6.0 released
#47For those of you who are looking at a reason to play around with openBSD, there might be some progress at getting it to run at the Raspberry pi 2 and 3: http://marc.info/?l=openbsd-cvs&m=147059203101111&w=2 Probably not going to happen, but it runs on some other ARM7 SBCs. Mine is running FreeBSD currently, but where is the geek cred in that?
Re: OpenBSD 6.0 released
#48Earlier quoted context omitted.
CDs are read-only, whereas a USB stick has (generally insecure) firmware that can be modified. So in a setting where the user is concerned about persistent USB malware, it can make sense to use them. It's a niche concern of course, but I suspect it's a little bit more common in the OpenBSD community than in many others. Of course it shouldn't be too hard for those users to build their own install boot CDs with the ta…
What happens if your cd that comes in the mail is swapped out for a different cd by a malicious actor?
Re: OpenBSD 6.0 released
#49This seems like a big deal: One thing to note: this will be the last version of OpenBSD to be pressed on CD. The project will now focus on internet-only distribution, giving much more flexibility in the release schedule.
Re: OpenBSD 6.0 released
#50This seems like a big deal: One thing to note: this will be the last version of OpenBSD to be pressed on CD. The project will now focus on internet-only distribution, giving much more flexibility in the release schedule.
It is - I did not know this. I purchased a USB-DVD player for the sole purpose of getting a physical delivery of OpenBSD. Sad to see it go by the wayside.