It is also a good reminder of how true security has to be baked in to the entire design, entire development chain, entire process; and not just added on top as an afterthought.
This particular vulnerability/exploit shows how dynamic linking mechanisms can be used via a library required by a library required by the actual target binary. The
ifunc mechanism allows this without using an interposing
constructor function using the
dl library; it was mostly used for obfuscation. Renaming the target function and using a
weakref alias would have raised eyebrows.
As an attack pattern, it means that
every library is security sensitive when a binary executed with privileges is considered.
As it is not realistic to expect every single library to be fully vetted for security –– we do not have enough willing eyeballs for that –– the only viable approach is
privilege separation. That requires
modularity, and when combined, directly leads to
minimalism to limit the security sensitive surfaces, including library dependencies (direct and indirect). Add the
KISS principle as a reminder, and you get the
Unix philosophy.
Which is why I so snarkily referenced CVE-2021-3560, which was a seven-year wide open privilege escalation flaw, resulting exactly from rejecting the points in the above paragraph. Security is not a
thing you can add, it is a fundamental approach to the entire task chain.