nova/etc/nova/rootwrap.d
Nikola Dipanov d416f4310b Avoid the possibility of truncating disk info file
Commit dc8de42 makes nova persist image format to a file to avoid
attacks based on changing it later. However the way it was implemented
leaves a small window of opportunity for the file to be truncated before
it gets written back to effectively making it possible for data to get
lost leaving us with a potential problem next time it is attempted to be
read.

This patch changes the way file is updated to be atomic, thus closing
the race window (and also removes the chown that we did not really
need).

It is worth noting that a better solution to this would be
to allow the code calling the imagebackend to write the file (once!)
and make it impossible to update after the boot process is done. This
approach would require more refactoring of the libvirt driver code, and
may be done in the future.

Partial-bug: #1221190
Change-Id: Ia1b073f38e096989f34d1774a12a1b4151773fc7
2014-04-09 09:44:11 -07:00
..
api-metadata.filters Configurable exec_dirs to find rootwrap commands 2012-12-03 15:12:06 +01:00
baremetal-compute-ipmi.filters Strip exec_dirs prefix from rootwrap filters 2013-05-18 00:01:57 +02:00
baremetal-deploy-helper.filters Add mkfs to the baremetal-deploy-helper rootwrap 2014-02-15 14:17:30 -05:00
compute.filters Avoid the possibility of truncating disk info file 2014-04-09 09:44:11 -07:00
network.filters Plug Vif into Midonet using Neutron port binding 2013-10-07 02:48:56 +00:00