{"id":"CVE-2026-139615","aliases":["CVE-2026-139615"],"related":[],"kind":"vulnerability","state":"published","title":"vfio: Reject a second cdev open before mutating shared device state","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nvfio: Reject a second cdev open before mutating shared device state\n\nThe cdev single-open check lives in vfio_df_open(), which runs at the\nend of the bind ioctl, after vfio_df_ioctl_bind_iommufd() has already\nupdated state shared across all opens: vfio_df_check_token() can set\nthe PF vf_token and vfio_df_get_kvm_safe() records the caller's KVM\npointer in device->kvm and takes a reference.\n\nA second cdev bind of an already-open device runs both, only to be\nrejected in vfio_df_open().  The error path clears device->kvm and\ndrops the reference, tearing down the current opener's KVM association\nand potentially resulting in an unbalanced reference on close or\npremature release, while the vf_token remains clobbered.\n\nMove the single-open check into vfio_df_ioctl_bind_iommufd() ahead of\nboth mutations, so a bind that cannot complete leaves the current\nopener's state untouched.  df->group is NULL on this path, so a\nnon-zero open_count is exactly what vfio_df_open() rejected.  The test\nin vfio_df_open() becomes redundant and is removed.\n\nReturn -EBUSY rather than -EINVAL here.  The arguments are not invalid,\nthe device is in use, which could be a transient condition due to a\ndelayed fput if the prior user is terminated.  This provides\ncompatibility with the group path, where a group open returns -EBUSY,\nand users may choose bounded polling to detect such a transient\ncondition.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nvfio: Reject a second cdev open before mutating shared device state\n\nThe cdev single-open check lives in vfio_df_open(), which runs at the\nend of the bind ioctl, after vfio_df_ioctl_bind_iommufd() has already\nupdated state shared across all opens: vfio_df_check_token() can set\nthe PF vf_token and vfio_df_get_kvm_safe() records the caller's KVM\npointer in device->kvm and takes a reference.\n\nA second cdev bind of an already-open device runs both, only to be\nrejected in vfio_df_open().  The error path clears device->kvm and\ndrops the reference, tearing down the current opener's KVM association\nand potentially resulting in an unbalanced reference on close or\npremature release, while the vf_token remains clobbered.\n\nMove the single-open check into vfio_df_ioctl_bind_iommufd() ahead of\nboth mutations, so a bind that cannot complete leaves the current\nopener's state untouched.  df->group is NULL on this path, so a\nnon-zero open_count is exactly what vfio_df_open() rejected.  The test\nin vfio_df_open() becomes redundant and is removed.\n\nReturn -EBUSY rather than -EINVAL here.  The arguments are not invalid,\nthe device is in use, which could be a transient condition due to a\ndelayed fput if the prior user is terminated.  This provides\ncompatibility with the group path, where a group open returns -EBUSY,\nand users may choose bounded polling to detect such a transient\ncondition.","source":"cvelist"}],"published":"2026-11-30T13:36:23.347Z","modified":"2026-11-30T14:19:44.123Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","fixed":"e5026289a555bc89647dd6476b8ab86556cf7adc","status":"affected"},{"type":"git","introduced":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","fixed":"52478ef75b37c264991119612ca06cb5217e4189","status":"affected"},{"type":"git","introduced":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","fixed":"258ba46543abdd36844f04bba8b4022a5731d873","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.6","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/e5026289a555bc89647dd6476b8ab86556cf7adc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/52478ef75b37c264991119612ca06cb5217e4189","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/258ba46543abdd36844f04bba8b4022a5731d873","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139615","url":"https://www.cve.org/CVERecord?id=CVE-2026-139615","licence":"CVE Terms of Use","modified":"2026-11-30T13:36:23.347Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139615","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139615","licence":"Public domain","modified":"2026-11-30T14:19:44.123Z"}],"updatedAt":"2026-11-30T14:33:13.356Z","epss":{"score":0.00198,"percentile":0.09989,"date":"2026-12-01T12:00:22.000Z"}}