FreeBSD-SA-21:04.xen : Xen grant mapping error handling issues
Versions Affected : All versions prior to TrueNAS 12.0-U3
Description
A malicious or buggy frontend driver may be able to cause resource leaks in the domain running the corresponding backend driver.
Grant mapping operations often occur in batch hypercalls, where a number of operations are done in a single hypercall, the success or failure of each one reported to the backend driver, and the backend driver then loops over the results, performing follow-up actions based on the success or failure of each operation. Unfortunately, when running in HVM/PVH mode, the FreeBSD backend drivers mishandle this: Some errors are ignored, effectively implying their success from the success of related batch elements. In other cases, errors resulting from one batch element lead to further batch elements not being inspected, and hence successful ones to not be possible to properly unmap upon error recovery.
Workaround
No workaround is available. FreeBSD systems not using Xen are not affected.
Mitigation
- Upgrade to TrueNAS 12.0-U3 or later.
Commit
- FreeBSD Revision : r369358
- TrueNAS Commit : 4c18bc7
- TrueNAS Commit : 42c7377
- JIRA Ticket : NAS-109604