{"api_version":"1","generated_at":"2026-11-30T19:38:15+00:00","cve":"CVE-2026-139615","urls":{"html":"https://cve.report/CVE-2026-139615","api":"https://cve.report/api/cve/CVE-2026-139615.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139615","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139615"},"summary":{"title":"vfio: Reject a second cdev open before mutating shared device state","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:44","updated_at":"2026-11-30 14:19:44"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/258ba46543abdd36844f04bba8b4022a5731d873","name":"https://git.kernel.org/stable/c/258ba46543abdd36844f04bba8b4022a5731d873","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/52478ef75b37c264991119612ca06cb5217e4189","name":"https://git.kernel.org/stable/c/52478ef75b37c264991119612ca06cb5217e4189","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e5026289a555bc89647dd6476b8ab86556cf7adc","name":"https://git.kernel.org/stable/c/e5026289a555bc89647dd6476b8ab86556cf7adc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139615","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139615","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 839e692fa4eb7da5c541a65155f1dbc237d8afaa e5026289a555bc89647dd6476b8ab86556cf7adc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 839e692fa4eb7da5c541a65155f1dbc237d8afaa 52478ef75b37c264991119612ca06cb5217e4189 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 839e692fa4eb7da5c541a65155f1dbc237d8afaa 258ba46543abdd36844f04bba8b4022a5731d873 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/vfio/device_cdev.c","drivers/vfio/vfio_main.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"e5026289a555bc89647dd6476b8ab86556cf7adc","status":"affected","version":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","versionType":"git"},{"lessThan":"52478ef75b37c264991119612ca06cb5217e4189","status":"affected","version":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","versionType":"git"},{"lessThan":"258ba46543abdd36844f04bba8b4022a5731d873","status":"affected","version":"839e692fa4eb7da5c541a65155f1dbc237d8afaa","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/vfio/device_cdev.c","drivers/vfio/vfio_main.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.6"},{"lessThan":"6.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:36:23.347Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/e5026289a555bc89647dd6476b8ab86556cf7adc"},{"url":"https://git.kernel.org/stable/c/52478ef75b37c264991119612ca06cb5217e4189"},{"url":"https://git.kernel.org/stable/c/258ba46543abdd36844f04bba8b4022a5731d873"}],"title":"vfio: Reject a second cdev open before mutating shared device state","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139615","datePublished":"2026-11-30T13:36:23.347Z","dateReserved":"2026-11-30T13:22:15.943Z","dateUpdated":"2026-11-30T13:36:23.347Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:44","lastModifiedDate":"2026-11-30 14:19:44","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139615","Ordinal":"1","Title":"vfio: Reject a second cdev open before mutating shared device st","CVE":"CVE-2026-139615","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139615","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"vfio: Reject a second cdev open before mutating shared device st"}]}}}