Race condition: compute intermittently corrupts base images on download from glance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
In Progress
|
High
|
Tony Breeds | ||
OpenStack Security Advisory |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Under certain conditions, which I happen to meet often on my Icehouse single node setup, uploaded images or snapshots fail to boot. See also https:/
Reason: When first instantiating a QCOW2 image, it's
(1) downloaded as QCOW2 to /var/lib/
(2) converted to RAW format base /var/lib/
The step (1) is performed in nova/image/
Proposed fix: enforce fsync on output File object before returning from download. Patch attached.
Security considerations:
* Due to the race between resources shared between users and tenants (compute node network and filesystem IO) a failure can be triggered across tenants, implying the risk of DoS.
* To make things worse -- with the default setting of not cleaning the image cache -- any corrupted image will remain in cache until replaced with fresh upload using a new image ID. Affected snapshots remain unusable forever, until ex- and re-imported manually under better conditions.
* Base image corruptions here are not detected and cannot be caught. Theoretically (a bit esoteric, quite unlikely, but not impossible), an attacker might modulate resource usage to precisely create an incompletely written image, that boots and runs, but has access control information stripped.
summary: |
- Race condition: compute intermittanty corrupts base images on download + Race condition: compute intermittently corrupts base images on download from glance |
description: | updated |
tags: | added: compute |
tags: | added: libvirt security |
description: | updated |
information type: | Public → Public Security |
Changed in nova: | |
importance: | Undecided → High |
status: | New → Triaged |
Thanks for the report, the OSSA task is set to incompete pending for additional security detail from nova-coresec.
What is the likeliness to trigger this race in production ?