]> xenbits.xensource.com Git - xen.git/commit
memory: fix XENMEM_exchange error handling
authorJan Beulich <jbeulich@suse.com>
Tue, 8 Dec 2015 13:11:08 +0000 (14:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 8 Dec 2015 13:11:08 +0000 (14:11 +0100)
commit2432628c93b8a2c819d4b827c4379fb30a20d489
tree2f540b48d94c68f98d680ec17131f27507f70330
parentdcbb31d041ccdb8331e7dc556e2abcd5d7ea7d5f
memory: fix XENMEM_exchange error handling

assign_pages() can fail due to the domain getting killed in parallel,
which should not result in a hypervisor crash.

Reported-by: Julien Grall <julien.grall@citrix.com>
Also delete a redundant put_gfn() - all relevant paths leading to the
"fail" label already do this (and there are also paths where it was
plain wrong). All of the put_gfn()-s got introduced by 51032ca058
("Modify naming of queries into the p2m"), including the otherwise
unneeded initializer for k (with even a kind of misleading comment -
the compiler warning could actually have served as a hint that the use
is wrong).

This is CVE-2015-8339 + CVE-2015-8340 / XSA-159.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
master commit: eedecb3cf0b2ce1ffc2eb08f3c73f88d42c382c9
master date: 2015-12-08 14:01:43 +0100
xen/common/memory.c