CVE-2024-53198

Source
https://cve.org/CVERecord?id=CVE-2024-53198
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53198.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-53198
Downstream
Related
Published
2024-12-27T13:49:40.339Z
Modified
2026-03-20T12:40:48.851801Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
Details

In the Linux kernel, the following vulnerability has been resolved:

xen: Fix the issue of resource not being properly released in xenbusdevprobe()

This patch fixes an issue in the function xenbusdevprobe(). In the xenbusdevprobe() 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 xenbusdevremove() function by adding a new block failremove before the failput 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53198.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4bac07c993d03434ea902d3d4290d9e45944b66c
Fixed
87106169b4ce26f85561f953d13d1fd86d99b612
Fixed
0aa9e30b5b4af5dd504801689d6d84c584290a45
Fixed
e8823e6ff313465910edea07581627d85e68d9fd
Fixed
3fc0996d2fefe61219375fd650601724b8cf2d30
Fixed
804b96f8d0a02fa10b92f28b2e042f9128ed3ffc
Fixed
217bdce88b104269b73603b84d0ab4dd04f481bc
Fixed
2f977a4c82d35d063f5fe198bbc501c4b1c5ea0e
Fixed
afc545da381ba0c651b2658966ac737032676f01

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-53198.json"