# CVE-2026-139615: vfio: Reject a second cdev open before mutating shared device state

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 9% of CVEs (2026-12-01)
- Published: 2026-11-30T13:36:23.347Z
- Modified: 2026-11-30T14:19:44.123Z
- Assigned by: Linux

## Description

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 vfio_df_open(), which runs at the
end of the bind ioctl, after vfio_df_ioctl_bind_iommufd() has already
updated state shared across all opens: vfio_df_check_token() can set
the PF vf_token and vfio_df_get_kvm_safe() 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 vfio_df_open().  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 vf_token remains clobbered.

Move the single-open check into vfio_df_ioctl_bind_iommufd() 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 open_count is exactly what vfio_df_open() rejected.  The test
in vfio_df_open() 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 839e692fa4eb7da5c541a65155f1dbc237d8afaa before e5026289a555bc89647dd6476b8ab86556cf7adc; from 839e692fa4eb7da5c541a65155f1dbc237d8afaa before 52478ef75b37c264991119612ca06cb5217e4189; from 839e692fa4eb7da5c541a65155f1dbc237d8afaa before 258ba46543abdd36844f04bba8b4022a5731d873; 6.6 (not affected: before 6.6; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/e5026289a555bc89647dd6476b8ab86556cf7adc>
- <https://git.kernel.org/stable/c/52478ef75b37c264991119612ca06cb5217e4189>
- <https://git.kernel.org/stable/c/258ba46543abdd36844f04bba8b4022a5731d873>

## Sources

- CVE List: [CVE-2026-139615](https://www.cve.org/CVERecord?id=CVE-2026-139615), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139615](https://nvd.nist.gov/vuln/detail/CVE-2026-139615), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139615 · Whole record: https://cve.day/CVE-2026-139615.json · Rebuilt by cve.day 2026-11-30T14:33:13.356Z
