Commit 31666358 authored by Natanael Copa's avatar Natanael Copa

main/lxc: upgrade to 3.2.1

also backport a couple of regression fixes
parent 7627256f
From 6400238d08cdf1ca20d49bafb85f4e224348bf9d Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Sat, 26 Jan 2019 01:19:29 +0100
Subject: [PATCH] CVE-2019-5736 (runC): rexec callers as memfd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Adam Iwaniuk and Borys Popławski discovered that an attacker can compromise the
runC host binary from inside a privileged runC container. As a result, this
could be exploited to gain root access on the host. runC is used as the default
runtime for containers with Docker, containerd, Podman, and CRI-O.
The attack can be made when attaching to a running container or when starting a
container running a specially crafted image. For example, when runC attaches
to a container the attacker can trick it into executing itself. This could be
done by replacing the target binary inside the container with a custom binary
pointing back at the runC binary itself. As an example, if the target binary
was /bin/bash, this could be replaced with an executable script specifying the
interpreter path #!/proc/self/exe (/proc/self/exec is a symbolic link created
by the kernel for every process which points to the binary that was executed
for that process). As such when /bin/bash is executed inside the container,
instead the target of /proc/self/exe will be executed - which will point to the
runc binary on the host. The attacker can then proceed to write to the target
of /proc/self/exe to try and overwrite the runC binary on the host. However in
general, this will not succeed as the kernel will not permit it to be
overwritten whilst runC is executing. To overcome this, the attacker can
instead open a file descriptor to /proc/self/exe using the O_PATH flag and then
proceed to reopen the binary as O_WRONLY through /proc/self/fd/<nr> and try to
write to it in a busy loop from a separate process. Ultimately it will succeed
when the runC binary exits. After this the runC binary is compromised and can
be used to attack other containers or the host itself.
This attack is only possible with privileged containers since it requires root
privilege on the host to overwrite the runC binary. Unprivileged containers
with a non-identity ID mapping do not have the permission to write to the host
binary and therefore are unaffected by this attack.
LXC is also impacted in a similar manner by this vulnerability, however as the
LXC project considers privileged containers to be unsafe no CVE has been
assigned for this issue for LXC. Quoting from the
https://linuxcontainers.org/lxc/security/ project's Security information page:
"As privileged containers are considered unsafe, we typically will not consider
new container escape exploits to be security issues worthy of a CVE and quick
fix. We will however try to mitigate those issues so that accidental damage to
the host is prevented."
To prevent this attack, LXC has been patched to create a temporary copy of the
calling binary itself when it starts or attaches to containers. To do this LXC
creates an anonymous, in-memory file using the memfd_create() system call and
copies itself into the temporary in-memory file, which is then sealed to
prevent further modifications. LXC then executes this sealed, in-memory file
instead of the original on-disk binary. Any compromising write operations from
a privileged container to the host LXC binary will then write to the temporary
in-memory binary and not to the host binary on-disk, preserving the integrity
of the host LXC binary. Also as the temporary, in-memory LXC binary is sealed,
writes to this will also fail.
Note: memfd_create() was added to the Linux kernel in the 3.17 release.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Co-Developed-by: Alesa Sarai <asarai@suse.de>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
configure.ac | 12 +++
src/lxc/Makefile.am | 4 +
src/lxc/file_utils.c | 41 ++++++++-
src/lxc/file_utils.h | 1 +
src/lxc/rexec.c | 181 +++++++++++++++++++++++++++++++++++++
src/lxc/syscall_wrappers.h | 14 +++
6 files changed, 252 insertions(+), 1 deletion(-)
create mode 100644 src/lxc/rexec.c
diff --git a/configure.ac b/configure.ac
index 8313b18d1..d43dabc0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -746,6 +746,17 @@ AM_COND_IF([ENABLE_DLOG],
])
])
+AC_ARG_ENABLE([memfd-rexec],
+ [AC_HELP_STRING([--enable-memfd-rexec], [enforce liblxc as a memfd to protect against certain symlink attacks [default=yes]])],
+ [], [enable_memfd_rexec=yes])
+AM_CONDITIONAL([ENFORCE_MEMFD_REXEC], [test "x$enable_memfd_rexec" = "xyes"])
+if test "x$enable_memfd_rexec" = "xyes"; then
+ AC_DEFINE([ENFORCE_MEMFD_REXEC], 1, [Rexec liblxc as memfd])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
# Files requiring some variable expansion
AC_CONFIG_FILES([
Makefile
@@ -974,6 +985,7 @@ Security features:
- Linux capabilities: $enable_capabilities
- seccomp: $enable_seccomp
- SELinux: $enable_selinux
+ - memfd rexec: $enable_memfd_rexec
PAM:
- PAM module: $enable_pam
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index 6ba9ecad2..dc8aa3d77 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -177,6 +177,10 @@ if !HAVE_STRLCAT
liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
+if ENFORCE_MEMFD_REXEC
+liblxc_la_SOURCES += rexec.c
+endif
+
AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
-DLXCPATH=\"$(LXCPATH)\" \
-DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
diff --git a/src/lxc/file_utils.c b/src/lxc/file_utils.c
index f89aa638d..930fd738a 100644
--- a/src/lxc/file_utils.c
+++ b/src/lxc/file_utils.c
@@ -31,7 +31,7 @@
#include "config.h"
#include "file_utils.h"
#include "macro.h"
-#include "string.h"
+#include "string_utils.h"
int lxc_write_to_file(const char *filename, const void *buf, size_t count,
bool add_newline, mode_t mode)
@@ -327,3 +327,42 @@ ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset, size_t count)
return ret;
}
+
+char *file_to_buf(char *path, size_t *length)
+{
+ int fd;
+ char buf[PATH_MAX];
+ char *copy = NULL;
+
+ if (!length)
+ return NULL;
+
+ fd = open(path, O_RDONLY | O_CLOEXEC);
+ if (fd < 0)
+ return NULL;
+
+ *length = 0;
+ for (;;) {
+ int n;
+ char *old = copy;
+
+ n = lxc_read_nointr(fd, buf, sizeof(buf));
+ if (n < 0)
+ goto on_error;
+ if (!n)
+ break;
+
+ copy = must_realloc(old, (*length + n) * sizeof(*old));
+ memcpy(copy + *length, buf, n);
+ *length += n;
+ }
+
+ close(fd);
+ return copy;
+
+on_error:
+ close(fd);
+ free(copy);
+
+ return NULL;
+}
diff --git a/src/lxc/file_utils.h b/src/lxc/file_utils.h
index 6361557a0..518a61af3 100644
--- a/src/lxc/file_utils.h
+++ b/src/lxc/file_utils.h
@@ -55,5 +55,6 @@ extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
extern FILE *fopen_cloexec(const char *path, const char *mode);
extern ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset,
size_t count);
+extern char *file_to_buf(char *path, size_t *length);
#endif /* __LXC_FILE_UTILS_H */
diff --git a/src/lxc/rexec.c b/src/lxc/rexec.c
new file mode 100644
index 000000000..396bd617f
--- /dev/null
+++ b/src/lxc/rexec.c
@@ -0,0 +1,181 @@
+/* liblxcapi
+ *
+ * Copyright © 2019 Christian Brauner <christian.brauner@ubuntu.com>.
+ * Copyright © 2019 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2, as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "config.h"
+#include "file_utils.h"
+#include "raw_syscalls.h"
+#include "string_utils.h"
+#include "syscall_wrappers.h"
+
+#define LXC_MEMFD_REXEC_SEALS \
+ (F_SEAL_SEAL | F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_WRITE)
+
+static int push_vargs(char *data, int data_length, char ***output)
+{
+ int num = 0;
+ char *cur = data;
+
+ if (!data || *output)
+ return -1;
+
+ *output = must_realloc(NULL, sizeof(**output));
+
+ while (cur < data + data_length) {
+ num++;
+ *output = must_realloc(*output, (num + 1) * sizeof(**output));
+
+ (*output)[num - 1] = cur;
+ cur += strlen(cur) + 1;
+ }
+ (*output)[num] = NULL;
+ return num;
+}
+
+static int parse_exec_params(char ***argv, char ***envp)
+{
+ int ret;
+ char *cmdline = NULL, *env = NULL;
+ size_t cmdline_size, env_size;
+
+ cmdline = file_to_buf("/proc/self/cmdline", &cmdline_size);
+ if (!cmdline)
+ goto on_error;
+
+ env = file_to_buf("/proc/self/environ", &env_size);
+ if (!env)
+ goto on_error;
+
+ ret = push_vargs(cmdline, cmdline_size, argv);
+ if (ret <= 0)
+ goto on_error;
+
+ ret = push_vargs(env, env_size, envp);
+ if (ret <= 0)
+ goto on_error;
+
+ return 0;
+
+on_error:
+ free(env);
+ free(cmdline);
+
+ return -1;
+}
+
+static int is_memfd(void)
+{
+ int fd, saved_errno, seals;
+
+ fd = open("/proc/self/exe", O_RDONLY | O_CLOEXEC);
+ if (fd < 0)
+ return -ENOTRECOVERABLE;
+
+ seals = fcntl(fd, F_GET_SEALS);
+ saved_errno = errno;
+ close(fd);
+ errno = saved_errno;
+ if (seals < 0)
+ return -EINVAL;
+
+ return seals == LXC_MEMFD_REXEC_SEALS;
+}
+
+static void lxc_rexec_as_memfd(char **argv, char **envp, const char *memfd_name)
+{
+ int saved_errno;
+ ssize_t bytes_sent;
+ int fd = -1, memfd = -1;
+
+ memfd = memfd_create(memfd_name, MFD_ALLOW_SEALING | MFD_CLOEXEC);
+ if (memfd < 0)
+ return;
+
+ fd = open("/proc/self/exe", O_RDONLY | O_CLOEXEC);
+ if (fd < 0)
+ goto on_error;
+
+ /* sendfile() handles up to 2GB. */
+ bytes_sent = lxc_sendfile_nointr(memfd, fd, NULL, LXC_SENDFILE_MAX);
+ saved_errno = errno;
+ close(fd);
+ errno = saved_errno;
+ if (bytes_sent < 0)
+ goto on_error;
+
+ if (fcntl(memfd, F_ADD_SEALS, LXC_MEMFD_REXEC_SEALS))
+ goto on_error;
+
+ fexecve(memfd, argv, envp);
+
+on_error:
+ saved_errno = errno;
+ close(memfd);
+ errno = saved_errno;
+}
+
+static int lxc_rexec(const char *memfd_name)
+{
+ int ret;
+ char **argv = NULL, **envp = NULL;
+
+ ret = is_memfd();
+ if (ret < 0 && ret == -ENOTRECOVERABLE) {
+ fprintf(stderr,
+ "%s - Failed to determine whether this is a memfd\n",
+ strerror(errno));
+ return -1;
+ } else if (ret > 0) {
+ return 0;
+ }
+
+ ret = parse_exec_params(&argv, &envp);
+ if (ret < 0) {
+ fprintf(stderr,
+ "%s - Failed to parse command line parameters\n",
+ strerror(errno));
+ return -1;
+ }
+
+ lxc_rexec_as_memfd(argv, envp, memfd_name);
+ fprintf(stderr, "%s - Failed to rexec as memfd\n", strerror(errno));
+ return -1;
+}
+
+/**
+ * This function will copy any binary that calls liblxc into a memory file and
+ * will use the memfd to rexecute the binary. This is done to prevent attacks
+ * through the /proc/self/exe symlink to corrupt the host binary when host and
+ * container are in the same user namespace or have set up an identity id
+ * mapping: CVE-2019-5736.
+ */
+__attribute__((constructor)) static void liblxc_rexec(void)
+{
+ if (lxc_rexec("liblxc")) {
+ fprintf(stderr, "Failed to re-execute liblxc via memory file descriptor\n");
+ _exit(EXIT_FAILURE);
+ }
+}
diff --git a/src/lxc/syscall_wrappers.h b/src/lxc/syscall_wrappers.h
index 42d94db28..dca4d1571 100644
--- a/src/lxc/syscall_wrappers.h
+++ b/src/lxc/syscall_wrappers.h
@@ -58,6 +58,20 @@ static inline long __keyctl(int cmd, unsigned long arg2, unsigned long arg3,
#define keyctl __keyctl
#endif
+#ifndef F_LINUX_SPECIFIC_BASE
+#define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_ADD_SEALS
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif
+#ifndef F_SEAL_SEAL
+#define F_SEAL_SEAL 0x0001
+#define F_SEAL_SHRINK 0x0002
+#define F_SEAL_GROW 0x0004
+#define F_SEAL_WRITE 0x0008
+#endif
+
#ifndef HAVE_MEMFD_CREATE
static inline int memfd_create(const char *name, unsigned int flags) {
#ifndef __NR_memfd_create
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor:
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lxc
pkgver=3.1.0
pkgver=3.2.1
_pkgver=${pkgver/_rc/.rc}
pkgrel=2
pkgrel=0
pkgdesc="Userspace interface for the Linux kernel containment features"
url="https://linuxcontainers.org/lxc/"
arch="all"
......@@ -17,7 +16,7 @@ makedepends="
linux-headers
bsd-compat-headers
docbook2x
automake
autoconf
libtool
......@@ -38,14 +37,11 @@ subpackages="
$pkgname-templates::noarch
"
source="
https://linuxcontainers.org/downloads/lxc/lxc-$_pkgver.tar.gz
source="https://linuxcontainers.org/downloads/lxc/lxc-$_pkgver.tar.gz
cgroups-initialize-cpuset-properly.patch
network-restore-ability-to-move-nl80211-devices.patch
lxc.initd
lxc.confd
6400238d08cdf1ca20d49bafb85f4e224348bf9d.patch
re-exec-of-liblxc.patch
"
builddir="$srcdir/lxc-$_pkgver"
......@@ -175,8 +171,8 @@ bashcomp() {
rmdir "$pkgdir"/etc/bash_completion.d
}
sha512sums="706cee9bc8ac57300574b59d728437e41baa4eb16c68f8548142e53b4e13679ef6698df30a4fbf8617e4f07338f898464e9f818e80d32648fe9717370dcbbb20 lxc-3.1.0.tar.gz
sha512sums="4b3046fc6c4aa497fb26bd45839e60de503184af86d3966e796d14e619203536b9a9ed67bdcd8a108cf1a548f8d095fb46dff53094a08abd8d268c866db685c0 lxc-3.2.1.tar.gz
2bebe6cc24987354b6e7dc9003c3a4df450ca10263e6dc0e9313977fdfc2eb57c0d68560da4d1071c8de2f8e3e394ed3ca17af445bea524daa5f8ae8955b3ba6 cgroups-initialize-cpuset-properly.patch
d302b7296918680901d034dc12ae0687dbbc65766800a9f7256e661f638d3dcad66bcc737aec2c6de8c27d3b9c08833e00420c2064f356d6d73efda9ae9bd707 network-restore-ability-to-move-nl80211-devices.patch
b74ffe7c3e8f193265a90ffeb6e5743b1212bc1416b898e5a7e59ddd7f06fc77dc34e2dcbb3614038ac6222a95e2b9beb9f03ab734c991837203ab626b1b091f lxc.initd
91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd
c06f7390cc9814299bf94f2e5937b8adf1963b8c83a667d0ee189f2864cdab159ad053b3c5099c39643fb9664f2674060fa241760df017643f93353a52a65a86 6400238d08cdf1ca20d49bafb85f4e224348bf9d.patch
a561a783b2232c94a675ec0f8c9ffeb2288a5ae94ccefccde8991fd23e302771283e06c2b741a28d756da2cc1d0e856ea92b3bb5ec09d407ddb9bf54f2a6067d re-exec-of-liblxc.patch"
91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd"
From b31d62b847a3ee013613795094cce4acc12345ef Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Sun, 28 Jul 2019 23:13:26 +0200
Subject: [PATCH] cgroups: initialize cpuset properly
Closes #3108.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
src/lxc/cgroups/cgfsng.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c
index 7b8fe6736f..c29c0958e9 100644
--- a/src/lxc/cgroups/cgfsng.c
+++ b/src/lxc/cgroups/cgfsng.c
@@ -496,12 +496,12 @@ static bool cg_legacy_filter_and_set_cpus(char *path, bool am_initialized)
}
if (!flipped_bit) {
- DEBUG("No isolated or offline cpus present in cpuset");
- return true;
+ cpulist = lxc_cpumask_to_cpulist(possmask, maxposs);
+ TRACE("No isolated or offline cpus present in cpuset");
+ } else {
+ cpulist = move_ptr(posscpus);
+ TRACE("Removed isolated or offline cpus from cpuset");
}
- DEBUG("Removed isolated or offline cpus from cpuset");
-
- cpulist = lxc_cpumask_to_cpulist(possmask, maxposs);
if (!cpulist) {
ERROR("Failed to create cpu list");
return false;
# Force lxc to use cgfs instead of new cgfsng.
# This is a workaround for https://github.com/lxc/lxc/issues/1095.
lxc.cgroup.use = @kernel
From 3dd7829433f63b2ec1323a1f237efa7d67ea6e2b Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Fri, 26 Jul 2019 08:20:02 +0200
Subject: [PATCH] network: restore ability to move nl80211 devices
Closes #3105.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
---
src/lxc/network.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/src/lxc/network.c b/src/lxc/network.c
index 9755116ba1..7684f95918 100644
--- a/src/lxc/network.c
+++ b/src/lxc/network.c
@@ -1248,22 +1248,21 @@ static int lxc_netdev_rename_by_name_in_netns(pid_t pid, const char *old,
static int lxc_netdev_move_wlan(char *physname, const char *ifname, pid_t pid,
const char *newname)
{
- char *cmd;
+ __do_free char *cmd = NULL;
pid_t fpid;
- int err = -1;
/* Move phyN into the container. TODO - do this using netlink.
* However, IIUC this involves a bit more complicated work to talk to
* the 80211 module, so for now just call out to iw.
*/
cmd = on_path("iw", NULL);
- if (!cmd)
- goto out1;
- free(cmd);
+ if (!cmd) {
+ return -1;
+ }
fpid = fork();
if (fpid < 0)
- goto out1;
+ return -1;
if (fpid == 0) {
char pidstr[30];
@@ -1274,21 +1273,18 @@ static int lxc_netdev_move_wlan(char *physname, const char *ifname, pid_t pid,
}
if (wait_for_pid(fpid))
- goto out1;
+ return -1;
- err = 0;
if (newname)
- err = lxc_netdev_rename_by_name_in_netns(pid, ifname, newname);
+ return lxc_netdev_rename_by_name_in_netns(pid, ifname, newname);
-out1:
- free(physname);
- return err;
+ return 0;
}
int lxc_netdev_move_by_name(const char *ifname, pid_t pid, const char* newname)
{
+ __do_free char *physname = NULL;
int index;
- char *physname;
if (!ifname)
return -EINVAL;
@@ -3279,13 +3275,20 @@ int lxc_network_move_created_netdev_priv(struct lxc_handler *handler)
return 0;
lxc_list_for_each(iterator, network) {
+ __do_free char *physname = NULL;
int ret;
struct lxc_netdev *netdev = iterator->elem;
if (!netdev->ifindex)
continue;
- ret = lxc_netdev_move_by_index(netdev->ifindex, pid, NULL);
+ if (netdev->type == LXC_NET_PHYS)
+ physname = is_wlan(netdev->link);
+
+ if (physname)
+ ret = lxc_netdev_move_wlan(physname, netdev->link, pid, NULL);
+ else
+ ret = lxc_netdev_move_by_index(netdev->ifindex, pid, NULL);
if (ret) {
errno = -ret;
SYSERROR("Failed to move network device \"%s\" with ifindex %d to network namespace %d",
From d3a9befc86113228f77c89030336faa84a5557c0 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner@ubuntu.com>
Date: Tue, 12 Feb 2019 17:31:14 +0100
Subject: [PATCH] rexec: make rexecution opt-in for library callers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
---
src/lxc/Makefile.am | 4 +++-
src/lxc/rexec.c | 4 ++--
src/lxc/rexec.h | 26 ++++++++++++++++++++++++++
src/lxc/tools/lxc_attach.c | 18 ++++++++++++++++++
4 files changed, 49 insertions(+), 3 deletions(-)
create mode 100644 src/lxc/rexec.h
diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index e1499a7ebe..ef19df9e08 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -25,6 +25,7 @@ noinst_HEADERS = api_extensions.h \
monitor.h \
namespace.h \
raw_syscalls.h \
+ rexec.h \
start.h \
state.h \
storage/btrfs.h \
@@ -180,7 +181,7 @@ liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h