CVE-2025-40048
Full vulnerability record from the local CVENow database.
Description
In the Linux kernel, the following vulnerability has been resolved: uio_hv_generic: Let userspace take care of interrupt mask Remove the logic to set interrupt mask by default in uio_hv_generic driver as the interrupt mask value is supposed to be controlled completely by the user space. If the mask bit gets changed by the driver, concurrently with user mode operating on the ring, the mask bit may be set when it is supposed to be clear, and the user-mode driver will miss an interrupt which will cause a hang. For eg- when the driver sets inbound ring buffer interrupt mask to 1, the host does not interrupt the guest on the UIO VMBus channel. However, setting the mask does not prevent the host from putting a message in the inbound ring buffer. So let’s assume that happens, the host puts a message into the ring buffer but does not interrupt. Subsequently, the user space code in the guest sets the inbound ring buffer interrupt mask to 0, saying “Hey, I’m ready for interrupts”. User space code then calls pread() to wait for an interrupt. Then one of two things happens: * The host never sends another message. So the pread() waits forever. * The host does send another message. But because there’s already a message in the ring buffer, it doesn’t generate an interrupt. This is the correct behavior, because the host should only send an interrupt when the inbound ring buffer transitions from empty to not-empty. Adding an additional message to a ring buffer that is not empty is not supposed to generate an interrupt on the guest. Since the guest is waiting in pread() and not removing messages from the ring buffer, the pread() waits forever. This could be easily reproduced in hv_fcopy_uio_daemon if we delay setting interrupt mask to 0. Similarly if hv_uio_channel_cb() sets the interrupt_mask to 1, there’s a race condition. Once user space empties the inbound ring buffer, but before user space sets interrupt_mask to 0, the host could put another message in the ring buffer but it wouldn’t interrupt. Then the next pread() would hang. Fix these by removing all instances where interrupt_mask is changed, while keeping the one in set_event() unchanged to enable userspace control the interrupt mask by writing 0/1 to /dev/uioX.
View original CVE JSON
{
"id": "CVE-2025-40048",
"sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"published": "2025-10-28T12:15:38.920",
"lastModified": "2026-10-19T21:10:00.160",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nuio_hv_generic: Let userspace take care of interrupt mask\n\nRemove the logic to set interrupt mask by default in uio_hv_generic\ndriver as the interrupt mask value is supposed to be controlled\ncompletely by the user space. If the mask bit gets changed\nby the driver, concurrently with user mode operating on the ring,\nthe mask bit may be set when it is supposed to be clear, and the\nuser-mode driver will miss an interrupt which will cause a hang.\n\nFor eg- when the driver sets inbound ring buffer interrupt mask to 1,\nthe host does not interrupt the guest on the UIO VMBus channel.\nHowever, setting the mask does not prevent the host from putting a\nmessage in the inbound ring buffer. So let’s assume that happens,\nthe host puts a message into the ring buffer but does not interrupt.\n\nSubsequently, the user space code in the guest sets the inbound ring\nbuffer interrupt mask to 0, saying “Hey, I’m ready for interrupts”.\nUser space code then calls pread() to wait for an interrupt.\nThen one of two things happens:\n\n* The host never sends another message. So the pread() waits forever.\n* The host does send another message. But because there’s already a\n message in the ring buffer, it doesn’t generate an interrupt.\n This is the correct behavior, because the host should only send an\n interrupt when the inbound ring buffer transitions from empty to\n not-empty. Adding an additional message to a ring buffer that is not\n empty is not supposed to generate an interrupt on the guest.\n Since the guest is waiting in pread() and not removing messages from\n the ring buffer, the pread() waits forever.\n\nThis could be easily reproduced in hv_fcopy_uio_daemon if we delay\nsetting interrupt mask to 0.\n\nSimilarly if hv_uio_channel_cb() sets the interrupt_mask to 1,\nthere’s a race condition. Once user space empties the inbound ring\nbuffer, but before user space sets interrupt_mask to 0, the host could\nput another message in the ring buffer but it wouldn’t interrupt.\nThen the next pread() would hang.\n\nFix these by removing all instances where interrupt_mask is changed,\nwhile keeping the one in set_event() unchanged to enable userspace\ncontrol the interrupt mask by writing 0/1 to /dev/uioX."
},
{
"lang": "es",
"value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nuio_hv_generic: Permitir que el espacio de usuario se encargue de la máscara de interrupción\n\nEliminar la lógica para establecer la máscara de interrupción por defecto en el controlador uio_hv_generic, ya que el valor de la máscara de interrupción se supone que debe ser controlado completamente por el espacio de usuario. Si el bit de máscara es cambiado por el controlador, concurrentemente con el modo de usuario operando en el anillo, el bit de máscara puede establecerse cuando se supone que debe estar despejado, y el controlador en modo de usuario perderá una interrupción, lo que causará un cuelgue.\n\nPor ejemplo, cuando el controlador establece la máscara de interrupción del búfer de anillo de entrada en 1, el anfitrión no interrumpe al invitado en el canal UIO VMBus. Sin embargo, establecer la máscara no impide que el anfitrión coloque un mensaje en el búfer de anillo de entrada. Así que asumamos que eso sucede, el anfitrión coloca un mensaje en el búfer de anillo pero no interrumpe.\n\nPosteriormente, el código del espacio de usuario en el invitado establece la máscara de interrupción del búfer de anillo de entrada en 0, diciendo 'Oye, estoy listo para las interrupciones'. El código del espacio de usuario luego llama a pread() para esperar una interrupción. Entonces sucede una de dos cosas:\n\n* El anfitrión nunca envía otro mensaje. Así que pread() espera para siempre.\n* El anfitrión sí envía otro mensaje. Pero como ya hay un mensaje en el búfer de anillo, no genera una interrupción. Este es el comportamiento correcto, porque el anfitrión solo debe enviar una interrupción cuando el búfer de anillo de entrada transiciona de vacío a no vacío. Agregar un mensaje adicional a un búfer de anillo que no está vacío no se supone que debe generar una interrupción en el invitado. Dado que el invitado está esperando en pread() y no está eliminando mensajes del búfer de anillo, pread() espera para siempre.\n\nEsto podría reproducirse fácilmente en hv_fcopy_uio_daemon si retrasamos el establecimiento de la máscara de interrupción en 0.\n\nDe manera similar, si hv_uio_channel_cb() establece la interrupt_mask en 1, hay una condición de carrera. Una vez que el espacio de usuario vacía el búfer de anillo de entrada, pero antes de que el espacio de usuario establezca interrupt_mask en 0, el anfitrión podría colocar otro mensaje en el búfer de anillo pero no interrumpiría. Entonces el siguiente pread() se colgaría.\n\nCorregir esto eliminando todas las instancias donde se cambia interrupt_mask, mientras se mantiene sin cambios la de set_event() para permitir que el espacio de usuario controle la máscara de interrupción escribiendo 0/1 en /dev/uioX."
}
],
"affected": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"affectedData": [
{
"vendor": "Linux",
"product": "Linux",
"defaultStatus": "unaffected",
"programFiles": [
"drivers/uio/uio_hv_generic.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"versions": [
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "540aac117eaea5723cef5e4cbf3035c4ac654d92",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "65d40acd911c7011745cbbd2aaac34eb5266d11e",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "a44f61f878f32071d6378e8dd7c2d47f9490c8f7",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "01ce972e6f9974a7c76943bcb7e93746917db83a",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "2af39ab5e6dc46b835a52e80a22d0cad430985e3",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "37bd91f22794dc05436130d6983302cb90ecfe7e",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "e29587c07537929684faa365027f4b0d87521e1b",
"versionType": "git",
"status": "affected"
},
{
"version": "95096f2fbd10186d3e78a328b327afc71428f65f",
"lessThan": "b15b7d2a1b09ef5428a8db260251897405a19496",
"versionType": "git",
"status": "affected"
}
]
},
{
"vendor": "Linux",
"product": "Linux",
"defaultStatus": "affected",
"programFiles": [
"drivers/uio/uio_hv_generic.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"versions": [
{
"version": "4.10",
"status": "affected"
},
{
"version": "0",
"lessThan": "4.10",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "5.4.301",
"lessThanOrEqual": "5.4.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "5.10.246",
"lessThanOrEqual": "5.10.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "5.15.195",
"lessThanOrEqual": "5.15.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.1.156",
"lessThanOrEqual": "6.1.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.6.112",
"lessThanOrEqual": "6.6.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.12.53",
"lessThanOrEqual": "6.12.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.17.3",
"lessThanOrEqual": "6.17.*",
"versionType": "semver",
"status": "unaffected"
},
{
"version": "6.18",
"lessThanOrEqual": "*",
"versionType": "original_commit_for_fix",
"status": "unaffected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-10-15T21:56:26.830461Z",
"id": "CVE-2025-40048",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"references": [
{
"url": "https://git.kernel.org/stable/c/01ce972e6f9974a7c76943bcb7e93746917db83a",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/2af39ab5e6dc46b835a52e80a22d0cad430985e3",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/37bd91f22794dc05436130d6983302cb90ecfe7e",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/540aac117eaea5723cef5e4cbf3035c4ac654d92",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/65d40acd911c7011745cbbd2aaac34eb5266d11e",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/a44f61f878f32071d6378e8dd7c2d47f9490c8f7",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/b15b7d2a1b09ef5428a8db260251897405a19496",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
},
{
"url": "https://git.kernel.org/stable/c/e29587c07537929684faa365027f4b0d87521e1b",
"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
}
]
}