[Cryptography] Are dynamic libs compatible with security? was: Apple and OpenSSL

Jon Callas jon at callas.org
Mon Apr 21 21:07:14 EDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Apr 19, 2014, at 4:50 PM, Bear <bear at sonic.net> wrote:

> I have to say the OpenSSL guys really and truly had a point when they 
> pointed out that dynamic linking is not fully or easily compatible 
> with the goal of security libraries.  

What is the point?

Let's look at this purely as a software engineering issue. Any time you compile and link a program, you can either statically link or dynamic linking.

Dynamic linking lets you make a change to a library without changing any of the apps. When you are fixing a flaw, this is good. If you statically link, then you must replace all apps that are consumers of the library when you make s fix to the library. It's true that static linking prevents the case where a flaw is introduced and propagated across all apps. However, one major reason we have dynamic linking in the first place is because dynamic libraries reduce the flaw-fixing problem to O(N) from O(N*M). (Another major reason is that dynamic libraries let you share memory so that M consumers of that library take up O(N) RAM as opposed to O(N*M) RAM.)

I think that there are certainly places where it makes sense to statically linking an app and assume the cost of updating and distributing as part of the cost of doing business. I also think that it's going a bit far to say that security as general case benefits from raising the cost of patching to O(N*M).

	Jon




-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 3.2.0 (Build 1672)
Charset: us-ascii

wj8DBQFTVcDCsTedWZOD3gYRApapAJwMnuaOLRSSJmsMytBCiH8CzElTQACfSCKk
sg4A72QGdL+Q8fFP1kyvxp8=
=wZ6M
-----END PGP SIGNATURE-----


More information about the cryptography mailing list