opnsense-src/sys/dev/xen
Roger Pau Monné c58f43f59d xen-blkback: fix leak of grant maps on ring setup failure
Multi page rings are mapped using a single hypercall that gets passed
an array of grants to map. One of the grants in the array failing to
map would lead to the failure of the whole ring setup operation, but
there was no cleanup of the rest of the grant maps in the array that
could have likely been created as a result of the hypercall.

Add proper cleanup on the failure path during ring setup to unmap any
grants that could have been created.

This is part of XSA-361.

Approved by:	so
Security:	CVE-2021-26932
Security:	FreeBSD-SA-21:06.xen
Security:	XSA-361
Sponsored by:	Citrix Systems R&D

(cherry picked from commit 808d4aad10)
(cherry picked from commit dfb372f5d38c302953a6a4e2838179cd0a1a6438)
2021-03-02 19:49:17 +01:00
..
balloon xen: allow limiting the amount of duplicated pending xenstore watches 2021-01-29 08:50:14 +01:00
blkback xen-blkback: fix leak of grant maps on ring setup failure 2021-03-02 19:49:17 +01:00
blkfront src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
console src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
control xen: allow limiting the amount of duplicated pending xenstore watches 2021-01-29 08:50:14 +01:00
debug src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
evtchn src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
gntdev src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
grant_table src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
netback src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
netfront src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
pci src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
pcifront src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
privcmd src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
pvcpu src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
timer src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
xenpci src: clean-cut move to releng/12.1 2019-09-25 16:17:31 +02:00
xenstore xen: allow limiting the amount of duplicated pending xenstore watches 2021-01-29 08:50:14 +01:00