Skip to content

Commit 3ec6266

Browse files
George DunlapWei Liu
authored andcommitted
docs: Fix dm_restrict documentation
Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information. Add a man page entry for device_model_user. Update qemu-deprivilege.pandoc: Changes in missing feature list: - Migration is functional - But qdisk backends are not Add a missing restriction list. The following statements from the man page are dropped: - Mentioning PV; PV guests never have a device model. - Drop the confusing statement about stdvga and cirrus vga options. - Re-used domain IDs are now handled. - Device models should no longer be able to create world-readable files on dom0's filesystem. Signed-off-by: George Dunlap <[email protected]> Acked-by: Wei Liu <[email protected]> Release-acked-by: Juergen Gross <[email protected]>
1 parent 3389a8d commit 3ec6266

File tree

2 files changed

+16
-96
lines changed

2 files changed

+16
-96
lines changed

docs/features/qemu-deprivilege.pandoc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ See docs/design/qemu-deprivilege.md for technical details.
110110

111111
The following features still need to be implemented:
112112
* Inserting a new cdrom while the guest is running (xl cdrom-insert)
113-
* Migration / save / restore
114-
115-
dm_restrict is totally unsupported and may have unexpected security
116-
problems if used with a dom0 Linux kernel earlier than 2.6.18.
113+
* Support for qdisk backends
114+
115+
A number of restrictions still need to be implemented. A compromised
116+
device model may be able to do the following:
117+
* Delay or exploit weaknesses in the toolstack
118+
* Launch "fork bombs" or other resource exhaustion attacks
119+
* Make network connections on the management network
120+
* Break out of the restrictions after migration
117121

118122
Additionally, getting PCI passthrough to work securely would require a
119123
significant rework of how passthrough works at the moment. It may be

docs/man/xl.cfg.5.pod.in

Lines changed: 8 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,104 +1316,20 @@ connectors=id0:1920x1080;id1:800x600;id2:640x480
13161316
Restrict the device model after startup,
13171317
to limit the consequencese of security vulnerabilities in qemu.
13181318

1319-
With this feature enabled,
1320-
a compromise of the device model,
1321-
via such a vulnerability,
1322-
will not provide a privilege escalation attack on the whole system.
1319+
See docs/features/qemu-depriv.pandoc for more information
1320+
on Linux and QEMU version requirements, device model user setup,
1321+
and current limitations.
13231322

13241323
This feature is a B<technology preview>.
1325-
There are some significant limitations:
1324+
See SUPPORT.md for a security support statement.
13261325

1327-
=over 4
1328-
1329-
=item
1330-
1331-
This is not likely to work at all for PV guests
1332-
nor guests using qdisk backends for their block devices.
1333-
1334-
=item
1335-
1336-
You must have a new enough qemu.
1337-
In particular,
1338-
if your qemu does not have the commit
1339-
B<xen: restrict: use xentoolcore_restrict_all>
1340-
the restriction request will be silently ineffective!
1341-
1342-
=item
1343-
1344-
The mechanisms used are not effective against
1345-
denial of service problems.
1346-
A compromised qemu can probably still impair
1347-
or perhaps even prevent
1348-
the proper functioning of the whole system,
1349-
(at the very least, but not limited to,
1350-
through resource exhaustion).
1351-
1352-
=item
1353-
1354-
It is not known whether the protection is
1355-
effective when a domain is migrated.
1356-
1357-
=item
1358-
1359-
Some domain management functions do not work.
1360-
For example, cdrom insert will fail.
1361-
1362-
=item
1326+
=item B<device_model_user=USERNAME>
13631327

1364-
You should say C<vga="none">.
1365-
Domains with stdvga graphics cards to not work.
1366-
Domains with cirrus vga may seem to work.
1328+
When running dm_restrict, run the device model as this user.
13671329

1368-
=item
1330+
NOTE: Each domain MUST have a SEPARATE username.
13691331

1370-
You must create user(s) for qemu to run as.
1371-
1372-
Ideally, set aside a range of 32752 uids
1373-
(from N to N+32751)
1374-
and create a user
1375-
whose name is B<xen-qemuuser-range-base>
1376-
and whose uid is N
1377-
and whose gid is a plain unprivileged gid.
1378-
libxl will use one such user for each domid.
1379-
1380-
Alternatively, either create
1381-
B<xen-qemuuser-domid$domid>
1382-
for every $domid from 1 to 32751 inclusive,
1383-
or
1384-
B<xen-qemuuser-shared>
1385-
(in which case different guests will not
1386-
be protected against each other).
1387-
1388-
=item
1389-
1390-
There are no countermeasures taken against reuse
1391-
of the same unix user (uid)
1392-
for subsequent domains,
1393-
even if the B<xen-qemuuser-domid$domid> users are created.
1394-
So a past domain with the same domid may be able to
1395-
interferer with future domains.
1396-
Possibly, even after a reboot.
1397-
1398-
=item
1399-
1400-
A compromised qemu will be able to read world-readable
1401-
files in the dom0 operating system.
1402-
1403-
=item
1404-
1405-
Because of these limitations, this functionality,
1406-
while it may enhance your security,
1407-
should not be relied on.
1408-
Any further limitations discovered in the current version
1409-
will B<not> be handled via the Xen Project Security Process.
1410-
1411-
=item
1412-
1413-
In the future as we enhance this feature to improve the security,
1414-
we may break backward compatibility.
1415-
1416-
=back
1332+
See docs/features/qemu-depriv.pandoc for more information.
14171333

14181334
=item B<vsnd=[ VCARD_SPEC, VCARD_SPEC, ... ]>
14191335

0 commit comments

Comments
 (0)