vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex
In the Linux kernel, the following vulnerability has been resolved: vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex vfio_cdx_set_msi_trigger() reads vdev->config_msi and operates on the vdev->cdx_irqs array based on its value, but provides no serialization against concurrent VFIO_DEVICE_SET_IRQS ioctls. Two callers can race such that one observes config_msi as set while another clears it and frees cdx_irqs via vfio_cdx_msi_disable(), resulting in a use-after-free of the cdx_irqs array. Add a cdx_irqs_lock mutex to struct vfio_cdx_device and acquire it in vfio_cdx_set_msi_trigger(), which is the single chokepoint through which all updates to config_msi, cdx_irqs, and msi_count flow, covering both the ioctl path and the close-device cleanup path. This keeps the test of config_msi atomic with the subsequent enable, disable, or trigger operations. Drop the pre-call !cdx_irqs test from vfio_cdx_irqs_cleanup() as part of this change: the optimization it provided is redundant with the !config_msi early-return inside vfio_cdx_msi_disable(), and leaving the test in place would be an unsynchronized read of state the new lock is meant to protect.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.86, 6.18.27, 7.0.4
- CVEs
- CVE-2026-46036
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 03:16 UTC · Revision 1
Source evidence
vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex
core-osv · Original sourcePublished 27 May 2026, 12:56 UTC
In the Linux kernel, the following vulnerability has been resolved: vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex vfio_cdx_set_msi_trigger() reads vdev->config_msi and operates on the vdev->cdx_irqs array based on its value, but provides no serialization against concurrent VFIO_DEVICE_SET_IRQS ioctls. Two callers can race such that one observes config_msi as set while another clears it and frees cdx_irqs via vfio_cdx_msi_disable(), resulting in a use-after-free of the cdx_irqs array. Add a cdx_irqs_lock mutex to struct vfio_cdx_device and acquire it in vfio_cdx_set_msi_trigger(), which is the single chokepoint through which all updates to config_msi, cdx_irqs, and msi_count flow, covering both the ioctl path and the close-device cleanup path. This keeps the test of config_msi atomic with the subsequent enable, disable, or trigger operations. Drop the pre-call !cdx_irqs test from vfio_cdx_irqs_cleanup() as part of this change: the optimization it provided is redundant with the !config_msi early-return inside vfio_cdx_msi_disable(), and leaving the test in place would be an unsynchronized read of state the new lock is meant to protect.
osv:CVE-2026-46036
Kernel
Fixed versions: 6.12.86, 6.18.27, 7.0.4
Complete source record
{
"id": "2a40209e06f7710b1b7b49172363eaf1a2a30fd15d6e16795c675360b9323539",
"url": "https://osv.dev/vulnerability/CVE-2026-46036",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex",
"summary": "In the Linux kernel, the following vulnerability has been resolved: vfio/cdx: Serialize VFIO_DEVICE_SET_IRQS with a per-device mutex vfio_cdx_set_msi_trigger() reads vdev->config_msi and operates on the vdev->cdx_irqs array based on its value, but provides no serialization against concurrent VFIO_DEVICE_SET_IRQS ioctls. Two callers can race such that one observes config_msi as set while another clears it and frees cdx_irqs via vfio_cdx_msi_disable(), resulting in a use-after-free of the cdx_irqs array. Add a cdx_irqs_lock mutex to struct vfio_cdx_device and acquire it in vfio_cdx_set_msi_trigger(), which is the single chokepoint through which all updates to config_msi, cdx_irqs, and msi_count flow, covering both the ioctl path and the close-device cleanup path. This keeps the test of config_msi atomic with the subsequent enable, disable, or trigger operations. Drop the pre-call !cdx_irqs test from vfio_cdx_irqs_cleanup() as part of this change: the optimization it provided is redundant with the !config_msi early-return inside vfio_cdx_msi_disable(), and leaving the test in place would be an unsynchronized read of state the new lock is meant to protect.",
"evidence": "osv:CVE-2026-46036",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.86",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.27",
"evidence": "/affected/1/ranges"
},
{
"value": "7.0.4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2026-46036",
"aliases": [
"CVE-2026-46036"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "848e447e000c41894ff931dc7c004fd42c8840f8"
},
{
"fixed": "ddf96e23c366c566283fce8377928851fa7f5e81"
},
{
"fixed": "7b436ade16cc81095d79b79f8efa3af0a4f5c5a2"
},
{
"fixed": "7530f34ec0ca1438d45a75dcb43183a1cc92eced"
},
{
"fixed": "670e8864b1a218d72f08db40d0103adf38fa1d9b"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46036.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.10.0"
},
{
"fixed": "6.12.86"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.27"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.0.4"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46036.json"
}
}
],
"modified": "2026-10-28T02:30:42.267975957Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/670e8864b1a218d72f08db40d0103adf38fa1d9b",
"https://git.kernel.org/stable/c/7530f34ec0ca1438d45a75dcb43183a1cc92eced",
"https://git.kernel.org/stable/c/7b436ade16cc81095d79b79f8efa3af0a4f5c5a2",
"https://git.kernel.org/stable/c/ddf96e23c366c566283fce8377928851fa7f5e81",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46036.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-46036",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46036.json"
}
},
"related_cves": [
{
"value": "CVE-2026-46036",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 509771,
"published_at": "2026-05-27T12:56:46.381+00:00"
}