coredump: lock down EnterNamespace= mount even more
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Nov 2024 09:03:26 +0000 (10:03 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 1 Nov 2024 09:05:53 +0000 (10:05 +0100)
commit4c9c8b8d09eff18df71ba4aa910df4201f9890a0
treea933595636eabb051fa8f3a0835befd058e0a29e
parente64ccd2242ab8e961ca6e683927757b6786b1cf5
coredump: lock down EnterNamespace= mount even more

Let's disable symlink following if we attach a container's mount tree to
our own mount namespace. We afte rall mount the tree to a different
location in the mount tree than where it was inside the container, hence
symlinks (if they exist) will all point to the wrong places (even if
relative, some might point to other places). And since symlink attacks
are a thing, and we let libdw operate on the tree, let's lock this down
as much as we can and simply disable symlink traversal entirely.
src/coredump/coredump.c