rexec: make rexecution opt-in for library callers
We cannot rexecute the liblxc shared library unconditionally as this would
break most of our downstreams. Here are some scenarios:
- anyone performing a dlopen() on the shared library (e.g. users of the LXC
Python bindings)
- LXD as it needs to know the absolute path to its own executable based on
/proc/self/exe etc.
This commit makes the rexecution of liblxc conditional on whether the
LXC_MEMFD_REXEC environment variable is set or not. If it is then liblxc is
unconditionally rexecuted.
The only relevant attack vector exists for lxc-attach which we simply reexecute
unconditionally.
Reported-by:
Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
Showing
src/lxc/rexec.h
0 → 100644
Please
register
or
sign in
to comment