@pr1ntf KARL is interesting research. However, I probably wouldn't take that approach. Kernel exploits are typically for local privesc. Randomization techniques (whether ASR, ASLR, KSR, KASRL, or KARL) are nullified by information disclosure vulnerabilities, which kernels are notorious for having all over the place.
I'd be interested in a long-term efficacy study.
@canadianbryan @pr1ntf Yup. And, with how far behind #FreeBSD is with regards to exploit mitigations, we at #HardenedBSD need to spend a whole bunch of time playing catch up to secure userland first. The vast majority of attackers will gain initial entry through userland.
With PaX ASLR, PaX NOEXEC, CFI, and SafeStack, we're doing great at catching up. But we're still not where we want to be.
@canadianbryan @pr1ntf Switching subjects, but while you're here:
Is OpenBSD planning to switch amd64 to clang/llvm as the default compiler and lld as the default linker?
If so, porting over the sanitizer framework to gain SafeStack (and possibly CFI with more work) might be of interest to OpenBSD.
@lattera @pr1ntf I'd expect sooner or later it'll happen, both clang/lld are in -current amd64/i386 snaps. And arm64 has no working GCC! :-)
The ports guys have been doing bulk builds, coaxing the USE_WXNEEDED stuff, making it easier to select a modern C11/C++ compiler. It'll probably happen after 6.2. Maybe? 🤞
@canadianbryan @pr1ntf The next question will hit a sore spot and may seem like a troll question, but I'm genuinely curious:
OpenBSD doesn't like when exploit mitigations require toggles for certain applications. We've talked before about using mprotect to switch between pages between RW and RX.
Now that OpenBSD has a form of a toggle via WX_NEEDED, would OpenBSD be in favor of hardening mprotect like PaX does in NOEXEC?
@lattera @pr1ntf It's not a user toggle, it's a combination of linker and mountpoint options that allow W^X violating software to work, at the same time shaming them. :-)
I still don't know what mprotect semantics you think OpenBSD lacks here, but the mailing lists would be a better place to bring that up. In summary though, no programs in base can violate W^X, and also a majority of them are pledge as well, and cannot make any page executable.