coredump: lock down EnterNamespace= mount even more (#34975)
authorLuca Boccassi <bluca@debian.org>
Fri, 1 Nov 2024 12:25:35 +0000 (12:25 +0000)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 12:25:35 +0000 (12:25 +0000)
commitc77f4f5df7a01d101b69189f70a2671713cd1f65
tree5f6bd460b314591b5ef14e07da262626cb53f01f
parent593b125a3073c72a47b64b509cce4019d7c2f9c7
parent00f7398049c45db562c4c0aa611e55cf7375d499
coredump: lock down EnterNamespace= mount even more (#34975)

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.