If the lesson you take from xz is "systemd bad" then you've really missed the wood for the trees.
They attacked the weakest link, and systemd was just a small pawn in that game. Sure, a smaller attack surface is better, but it's not like OpenSSHd has a small attack surface even without libsystemd. Not even in projects with a similar possibility of obscure "test data."
Except for libz, they are only linked indirectly through libsystemd.
> I don't see why linking to libxz would be so outrageous
The XZ Utils library is called liblzma, not libxz.
Ah, that invalidates my point re. obscure test data. Sloppy use of ldd. (I'm guessing it would be much harder making such an attack on a crypto library.)
Thanks.
The xz linkage was indirect through a systemd library that some systemd systems link into sshd.
The free-standing implementation: https://github.com/openssh/openssh-portable/commit/08f579231...