llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/lxc/incus/v7/cmd/incusd

GHSA-9C46-V3HW-V6M8

Rebuilding a never-started container makes it boot without a user namespace, running as privileged

Parche disponible
Descargar PNG JSON
CVSS 3.1
8.8
Alta
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónv7.6.0
Exposición21 dDesde la divulgación, 29 oct 2026, 5:14 p. m.
Detección20 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
29 oct 26
19 nov 26
29 oct 26
4 nov 26
9 nov 26
14 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-9C46-V3HW-V6M8 divulgada · CVSS 8.8 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

A container that is rebuilt before it has ever been started boots with no user namespace while its configuration still says it is unprivileged. In-container root is then uid 0 on the host, and because the privileged-container hardening is keyed on the `security.privileged` configuration (not on the actual ID map), none of it is applied. The result is a container the operator believes is unprivileged but which has full host root, retained dangerous capabilities, no device cgroup restriction, `/dev/zfs` exposed, and only the permissive "unprivileged" AppArmor profile.

Details

`incus create` allocates and persists an ID map at create time for an unprivileged instance:

internal/server/instance/drivers/driver_lxc.go:331   lxcCreate sets volatile.idmap.next (and volatile.idmap.base)

`volatile.idmap.current` is only written on start, so a never-started instance has `next` but no `current`.

`incus rebuild` resets the map, deleting both the pending map and the on-disk map state:

internal/server/instance/drivers/driver_common.go:750   delete(instLocalConfig, "volatile.idmap.next")
internal/server/instance/drivers/driver_common.go:751   delete(instLocalConfig, "volatile.last_state.idmap")

After a rebuild of a never-started instance, all of `next`, `current` and `last_state.idmap` are absent. `NextIdmap()` resolves through a fallback chain that then yields `nil`:

driver_lxc.go:9372   NextIdmap()    -> next absent    -> CurrentIdmap()
driver_lxc.go:9351   CurrentIdmap() -> current absent -> DiskIdmap()
driver_lxc.go:9360   DiskIdmap()    -> last_state absent -> (nil, nil)

On first start, the map is only (re)allocated when one already exists:

driver_lxc.go:2124   if nextMap != nil && d.state.OS.IdmapSet != nil && !d.state.OS.IdmapSet.Includes(nextMap) { ... findIdmap ... }

With `nextMap == nil` the block is skipped, no map is allocated, and `initLXC` emits no `lxc.idmap` entries (it only does so for a non-nil set, `driver_lxc.go:1096`). The container therefore starts with an identity map.

The hardening is then gated on `IsPrivileged()` (the config), which is false, so:

  • `lxc.cap.drop` is not applied (`driver_lxc.go`, under `IsPrivileged()`) — container root keeps `sys_module`, `sys_rawio`, `sys_time`, `mac_admin`/`mac_override`;
  • the device cgroup `deny a` is not installed (under `IsPrivileged()`);
  • `/dev/zfs` is bind-mounted (the `!IsPrivileged()` branch);
  • the "unprivileged" AppArmor profile is selected, which permits `mount` and `pivot_root`.

The state is sticky: the first (unmapped) start writes `volatile.idmap.current` to an empty set, so later starts keep resolving to no map until a config change forces reallocation.

Proof of concept
incus create --empty poc
incus rebuild images:alpine/3.21 poc
incus start poc

# in the container, root is uid 0 on the host with full capabilities:
incus exec poc -- cat /proc/self/status | grep Cap   # CapEff/CapBnd = 000001ffffffffff
incus exec poc -- id                                  # uid=0 mapped to host uid 0

The trigger is "rebuild before first start"; the `--empty` create is one way to reach it, but any rebuild of a never-started unprivileged instance behaves the same. An instance that was started at least once before rebuild is unaffected (its `volatile.idmap.current` survives and the fallback uses it).

Impact

A container the operator configured as unprivileged runs with no user namespace, i.e. as a privileged container without even the privileged-container hardening. Any root process inside it — the whole point of unprivileged confinement being untrusted workloads — is host root with `sys_module` and raw I/O, so it can load a kernel module or write host devices and fully compromise the host. It is silent: nothing in the config or status indicates the instance is unmapped. Long-standing behavior, not a recent regression.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:L
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:C
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
github.com/lxc/incus/v7/cmd/incusd< v7.6.0
v7.6.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Gogithub.com/lxc/incus/v7/cmd/incusd
Corregida v7.6.0 — —
Versiones corregidasv7.6.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/lxc/incus/security/advisories/GHSA-9c46-v3hw-v6m8

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.