7.8high
xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
- Severity
- 7.8high CVSS:3.1 by Linux
- Exploit likelihood
- 0.24% (higher than 16% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: xen: Fix the issue of resource not being properly released in xenbus_dev_probe() This patch fixes an issue in the function xenbus_dev_probe(). In the xenbus_dev_probe() function, within the if (err) branch at line 313, the program incorrectly returns err directly without releasing the resources allocated by err = drv->probe(dev, id). As the return value is non-zero, the upper layers assume the processing logic has failed. However, the probe operation was performed earlier without a corresponding remove operation. Since the probe actually allocates resources, failing to perform the remove operation could lead to problems. To fix this issue, we followed the resource release logic of the xenbus_dev_remove() function by adding a new block fail_remove before the fail_put block. After entering the branch if (err) at line 313, the function will use a goto statement to jump to the fail_remove block, ensuring that the previously acquired resources are correctly released, thus preventing the reference count leak. This bug was identified by an experimental static analysis tool developed by our team. The tool specializes in analyzing reference count operations and detecting potential issues where resources are not properly managed. In this case, the tool flagged the missing release operation as a potential problem, which led to the development of this patch.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 4bac07c993d03434ea902d3d4290d9e45944b66c before 87106169b4ce26f85561f953d13d1fd86d99b612, from 4bac07c993d03434ea902d3d4290d9e45944b66c before 0aa9e30b5b4af5dd504801689d6d84c584290a45, from 4bac07c993d03434ea902d3d4290d9e45944b66c before e8823e6ff313465910edea07581627d85e68d9fd, from 4bac07c993d03434ea902d3d4290d9e45944b66c before 3fc0996d2fefe61219375fd650601724b8cf2d30, from 4bac07c993d03434ea902d3d4290d9e45944b66c before 804b96f8d0a02fa10b92f28b2e042f9128ed3ffc, from 4bac07c993d03434ea902d3d4290d9e45944b66c before 217bdce88b104269b73603b84d0ab4dd04f481bc, from 4bac07c993d03434ea902d3d4290d9e45944b66c before 2f977a4c82d35d063f5fe198bbc501c4b1c5ea0e, from 4bac07c993d03434ea902d3d4290d9e45944b66c before afc545da381ba0c651b2658966ac737032676f01 and 1 more Not affected: before 2.6.23, from 5.4.287 up to 5.4.*, from 5.10.231 up to 5.10.*, from 5.15.174 up to 5.15.*, from 6.1.120 up to 6.1.*, from 6.6.64 up to 6.6.* | CVE List |
| linux linux_kernel | from 2.6.23 before 5.4.287, from 5.5 before 5.10.231, from 5.11 before 5.15.174, from 5.16 before 6.1.120, from 6.2 before 6.6.64, from 6.7 before 6.11.11, from 6.12 before 6.12.2 | NVD |
All scores
| Linux | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CISA-ADP | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| NVD | 5.5medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: xen: Fix the issue of resource not being properly released in xenbus_dev_probe() This patch fixes an issue in the function xenbus_dev_probe(). In the xenbus_dev_probe() function, within the if (err) branch at line 313, the program incorrectly returns err directly without releasing the resources allocated by err = drv->probe(dev, id). As the return value is non-zero, the upper layers assume the processing logic has failed. However, the probe operation was performed earlier without a corresponding remove operation. Since the probe actually allocates resources, failing to perform the remove operation could lead to problems. To fix this issue, we followed the resource release logic of the xenbus_dev_remove() function by adding a new block fail_remove before the fail_put block. After entering the branch if (err) at line 313, the function will use a goto statement to jump to the fail_remove block, ensuring that the previously acquired resources are correctly released, thus preventing the reference count leak. This bug was identified by an experimental static analysis tool developed by our team. The tool specializes in analyzing reference count operations and detecting potential issues where resources are not properly managed. In this case, the tool flagged the missing release operation as a potential problem, which led to the development of this patch.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: xen: soluciona el problema de que los recursos no se liberan correctamente en xenbus_dev_probe() Este parche soluciona un problema en la función xenbus_dev_probe(). En la función xenbus_dev_probe(), dentro de la rama if (err) en la línea 313, el programa devuelve incorrectamente err directamente sin liberar los recursos asignados por err = drv->probe(dev, id). Como el valor de retorno no es cero, las capas superiores suponen que la lógica de procesamiento ha fallado. Sin embargo, la operación de sondeo se realizó antes sin una operación de eliminación correspondiente. Dado que el sondeo realmente asigna recursos, no realizar la operación de eliminación podría provocar problemas. Para solucionar este problema, seguimos la lógica de liberación de recursos de la función xenbus_dev_remove() agregando un nuevo bloque fail_remove antes del bloque fail_put. Después de ingresar a la rama if (err) en la línea 313, la función usará una declaración goto para saltar al bloque fail_remove, lo que garantiza que los recursos adquiridos previamente se liberen correctamente, evitando así la fuga del recuento de referencias. Este error fue identificado por una herramienta de análisis estático experimental desarrollada por nuestro equipo. La herramienta se especializa en analizar operaciones de recuento de referencias y detectar posibles problemas en los que los recursos no se administran correctamente. En este caso, la herramienta marcó la operación de liberación faltante como un problema potencial, lo que llevó al desarrollo de este parche.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-53198 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2024-53198 changed 2026-08-04 | Public domain |