AZL-117247: CVE-2026-139615 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
vfio: Reject a second cdev open before mutating shared device state
The cdev single-open check lives in vfiodfopen(), which runs at the end of the bind ioctl, after vfiodfioctlbindiommufd() has already updated state shared across all opens: vfiodfchecktoken() can set the PF vftoken and vfiodfgetkvmsafe() records the caller's KVM pointer in device->kvm and takes a reference.
A second cdev bind of an already-open device runs both, only to be rejected in vfiodfopen(). The error path clears device->kvm and drops the reference, tearing down the current opener's KVM association and potentially resulting in an unbalanced reference on close or premature release, while the vftoken remains clobbered.
Move the single-open check into vfiodfioctlbindiommufd() ahead of both mutations, so a bind that cannot complete leaves the current opener's state untouched. df->group is NULL on this path, so a non-zero opencount is exactly what vfiodfopen() rejected. The test in vfiodfopen() becomes redundant and is removed.
Return -EBUSY rather than -EINVAL here. The arguments are not invalid, the device is in use, which could be a transient condition due to a delayed fput if the prior user is terminated. This provides compatibility with the group path, where a group open returns -EBUSY, and users may choose bounded polling to detect such a transient condition.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Systems using the affected Azure Linux kernel package and VFIO cdev device binding are exposed when the same device is bound through a second cdev open while it is already open. The issue concerns shared VFIO device state associated with iommufd binding and KVM association.
What does an attacker or triggering workload need to do?
It needs to attempt a second cdev bind for a device that already has an active open. The failed bind reaches shared-state updates before the single-open rejection, which can clear the existing opener's KVM association, drop a reference, and overwrite the VF token.
How can I tell whether a system is affected in practice?
Look for workloads that use VFIO cdev with iommufd and may issue concurrent or repeated bind operations against the same already-open device. A failed second bind combined with disruption to the existing opener's KVM association or device token state is indicative of this condition.