Description
LXC is a userspace interface for the Linux kernel containment features used to create and manage system containers. In LXC 7.0.0 and earlier, lxc-copy and the public liblxc clone() API can follow attacker-controlled symbolic links while updating /etc/hostname in a copied container root filesystem. The affected surfaces are lxc-copy and liblxc's public lxc_container::clone() API. The privileged cloning process must run as root. The source rootfs must be attacker-controlled or less trusted. A symlink can be placed at etc/hostname or in an intermediate component. The clone operation preserves the symlink before updating the hostname. The vulnerable write truncates and overwrites an existing file outside the destination rootfs. When root clones an untrusted container without LXC_CLONE_KEEPNAME, the copied symlink can resolve outside the destination rootfs and cause the privileged process to overwrite an existing host file with the destination container name. Unprivileged use and managers with independent cloning implementations are not affected. LXC_CLONE_KEEPNAME avoids the hostname update and therefore the affected write.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| lxc | lxc | <= 7.0.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | lxc | 1:7.0.0-3 | — |
| Debian 13 | lxc | No fix yet | — |
| Debian 12 | lxc | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | lxc | No fix yet | — |
| Ubuntu 14.04 LTS | lxc | No fix yet | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 26.04 LTS | lxc | No fix yet | — |
| Ubuntu Pro 24.04 LTS | lxc | No fix yet | — |
| Ubuntu Pro 22.04 LTS | lxc | No fix yet | — |
| Ubuntu Pro 20.04 LTS | lxc | No fix yet | — |
| Ubuntu Pro 18.04 LTS | lxc | No fix yet | — |
| Ubuntu Pro 16.04 LTS | lxc | No fix yet | — |