News for hackers. Stuff that matters.
Re:I Built an Ld_preload Worm by AnonymousPlanet on Tuesday April 30, 2024 @04:55AM (#40208690)
I don't understand what you think pip, npm etc. have to do with dynamic linking. Those libraries get loaded in the respective interpreter, the linker doesn't come into action at all. And security wise npm, pip and the likes are nightmares waiting to be exploited xz style. No static linking will save you from it.
Re:I Built an Ld_preload Worm by josephg on Tuesday April 30, 2024 @09:02AM (#40210570)
It maps.

If you throw a nodejs or python package in apt, you can either include all of its js / python dependencies in the package itself or make separate apt packages for each of the projects dependencies and have the apt package depend on those packages. The difference is pretty similar to static / dynamic linking. Including the dependencies gives the package author explicit control over the versions of all your dependencies. But depending on external apt packages means you can install security updates to shared libraries system wide. (Think log4j or xz). And as I understand it, that is what Debian prefers.

In JavaScript projects it’s even become common practice to use a bundler to “compile” server side JavaScript (with all your dependencies) into a single large unreadable .js file. Doing that can reduce memory usage and dramatically improve startup time. The bundled code usually has dead code elimination. It’s more or less identical to static linking - except the resulting artifact is another JavaScript file.

Re:I Built an Ld_preload Worm by AnonymousPlanet on Tuesday April 30, 2024 @01:04PM (#40213297)
Ah, it was an analogy. That makes sense, thanks!