By the way, our first two publications on evaluating mitigations are out. Both of these papers evaluate some amd64 anti-ROP mitigations: specifically changing the register selection order and semantically equivalent rewriting of instructions that may produce a potential polymorphic gadget instruction. This tracks a paper by mortimer@ back in 2019 at AsiaBSDCon.

The TL;DR is "OpenBSD can shrink binaries a little and gain a little performance without any security loss simply by reverting these mitigations." The mitigations did not hold up to independent evaluation.

The first paper did an exact 1:1 port of these mitigations to FreeBSD and found that register reallocation eliminates only about 0.3% of unique gadgets, for a 0.5% increase in binary size (mortimer@ claimed 6% reduction and "entirely free"). It is useless at best but more likely actively detrimental, as it produces a false sense of security. It also found the instruction rewriting reduces unique gadgets by about 3.5% with a binary size increase of about 1.8% (mortimer@ claimed 5% reduction with 0.15% binary size increase).

We then did a separate implementation of the instruction rewriting mitigation to GCC in the second paper. Our GCC implementation does the older <xchg; op; xchg> dance, as that's what mortimer@'s paper described. This is way worse; producing about a 3% performance hit for no security benefit at all.

The only part of both mitigations worth saving is for basic arithmetic, OpenBSD LLVM now takes advantage of the fact that basic arithmetic has two forms. For example, the newer instruction rewriting mitigation turns
addq %rax, %rbx (48 01 c3)
into
{load} addq %rax, %rbx (48 03 d8)

The new instruction rewriting mitigation is genuinely free in terms of binary size and execution speed, but doesn't move the security needle, so this one can stay as it is harmless. Other rewritings still have the flaw of increasing binary size and reducing performance for no security benefit.

Anyhow feel free to read the papers:
ieeexplore.ieee.org/abstract/d
researchgate.net/publication/4

I'll be speaking at NYC*BUG on June 3. So... show up? You can show up online, no expensive flight to Manhattan needed.

nycbug.org/

New post alert!

I muse about research some of my grad students and I did around independently evaluating some anti-ROP mitigations, and I bid farewell to being an OpenBSD developer.

briancallahan.net/blog/2026032

New post. Let's write a peephole optimizer for that operates on assembly code. Three years ago, we did this for assembly code. But now that I have Arm machines, we can replicate the effort for another CPU architecture.

briancallahan.net/blog/2025090

You ever buy a Blu ray of a TV show on a whim, figure you'll watch one episode, then end up watching the whole thing in one sitting, only to realize that while you did also buy the second season, you won't have it for a week.

This is me right now :flan_sad:

I finally after multiple years of procrastination added dark mode to my website. It currently does auto-detecting based on your system; I'll have to add a little button or something. But it works.

Two posts in less than one week!

It was considered known that there is no support within GNAT (Ada) for illumos. We cross-build a complete native binutils+gcc toolchain for illumos to test out this claim.

...only to discover that illumos has full support within GNAT. Not a single test fails.

briancallahan.net/blog/2025081

A new post appears!

I discovered that the GNU D compiler has been broken on FreeBSD 14 for over a year and it seems no one noticed. Let's discover the issue and brainstorm some solutions to it.

A great case study for why operating system package maintainers matter.

briancallahan.net/blog/2025081

Mfw some good software by @cadey just randomly appears in my YouTube shorts feed: youtube.com/shorts/qcosij0dZcU

:flan_guitar::flan_whmage::flan_cheer:

(It's about Anubis: anubis.techaro.lol/)

Someone ported oksh to ! That marks the last remaining mainstream to get support for everyone's favorite ksh.

Finally got around to refactoring my little NYT Spelling Bee clone. No functional difference: github.com/ibara/freebee-cli/r

I am building gcc-15.1.0 on my iMac G4 (Tiger) machine. It is on stage2, which is a good sign.

It will include C, C++, Fortran, Modula-2, Objective C, and Objective C++ compilers.

It will depend on my new PowerPC Mac OS X modernization library, libpcc: github.com/ibara/libppc

I'll write a blog post about how to use it once it is all compiled; my goal is to produce a turnkey solution that just works(TM), including assembler, linker, and other utilities, as recent as possible for PowerPC.

And libppc can be instantly extendable to incorporate more C11 and later features. Hopefully others in the retro Mac community are interested in building that up with me.

My ultimate goal is to build some flavor of WebKit some day and have a modern web experience (even if slow, and possibly using X11). But in the meantime we will probably build a lot of excellent modern software to keep these machines going.

Show older
BSD Network

bsd.network is a *BSD-adjacent Mastodon Instance. We have a code of conduct.