From TFA:
> This is a great opportunity to remind everyone: don’t use generic function names like this in your shared libraries, at least not in your exported symbols! You could easily run into a situation similar to this one. In my opinion, prefixes are definitely a good idea for your library’s exported symbols. In this case, both libusbmuxd and Samba were breaking that guideline.
> (...) dynamic libraries on Linux export all symbols by default unless you specify otherwise.
> libusbmuxd already fixed this on their end quite a while ago — they now only export functions intended to be public, which have a usbmuxd_ or libusbmuxd_ prefix
any solution that depends on the goodwill of a third party is a 100% no-go
This seems like a weak argument as an update could easily introduce new bugs with a security impact as well. Static linking gives a tested, known good executable. Running untested combos of libraries gives me some anxiety.
But when linking happens in some poorly maintained script, inside a custom build systen, written in two or more languages, running inside a docker container, executed by some year-old CI integration, patching security issues becomes impossible.
Given many dynamically linked binaries, it's relatively easy to patch say OpenSSL on a system.
If all binaries are statically linked, you need to relink all binaries and push new versions of each one.
bar.c:(.text+0x0): multiple definition of `socket_send'
at compile time.
(edit: I mean static linking everything including third party libraries)the issue was caused by another dynamically linked library referencing a different library at run time on a different linux distro than it was built on.
even says as much in the article.
Yeah, there are probably a lot of ways this would still cause issues. In any larger project with non-trivial dependencies, C-ABI generates a lot of extra work. At least without decorated (= mangled) function names...
Way to show you didn't read the linked article. Because in it he even mentions he used static linking.
So that alone won't always save you.
One of many reasons that reliable systems use static linking.