Skip to main content
Menu
Advisories

Migration peers can force unbounded memory allocation on the receiving daemon

GHSA-27JM-9QW5-JR8WPublished Updated GitHub

Description

Reported from github.com/lxc/incus/security/advisories/GHSA-r69q-f272-2qmr

The migration protocol reads each incoming message fully into memory with no upper bound, and the migration websockets set no read limit of their own. A peer can therefore make the receiving daemon allocate as much memory as it chooses to send.

Details

An authenticated client allowed to start a migration, or the peer on the other end of one, can make the receiving daemon allocate memory far larger than any legitimate protocol message. A single 64 MiB message was measured to raise the daemon's peak memory by about 160 MiB. Repeated or concurrent messages can exhaust the host's memory and get the daemon killed, interrupting the API for every project.

Push mode migration from a restricted project is one way to reach this and is the subject of GHSA-chhj-pwx6-9cx3; the unbounded read itself is reachable through any migration.

Proof of concept

An authenticated client allowed to start a migration, or the peer on the other end of one, can make the receiving daemon allocate memory far larger than any legitimate protocol message. A single 64 MiB message was measured to raise the daemon's peak memory by about 160 MiB. Repeated or concurrent messages can exhaust the host's memory and get the daemon killed, interrupting the API for every project.

Push mode migration from a restricted project is one way to reach this and is the subject of GHSA-chhj-pwx6-9cx3; the unbounded read itself is reachable through any migration.

Impact

None beyond restricting who may start migrations.

References

GitHub · canonical/lxd