CVE-2024-53198CWE-401

CVE-2024-53198

High · published December 27, 2024

CVSS v3.1
7.8
EPSS
0%
Percentile
14.7
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00244 · 14.7th percentile
Weakness
CWE-401 · Missing Release of Memory after Effective Lifetime
Published
2024-12-27T19:15Z
Affected products (7)
ProductVersionsFixed in
linux/linux_kernel≥ 2.6.23, < 5.4.2875.4.287
linux/linux_kernel≥ 5.5, < 5.10.2315.10.231
linux/linux_kernel≥ 5.11, < 5.15.1745.15.174
linux/linux_kernel≥ 5.16, < 6.1.1206.1.120
linux/linux_kernel≥ 6.2, < 6.6.646.6.64
linux/linux_kernel≥ 6.7, < 6.11.116.11.11
linux/linux_kernel≥ 6.12, < 6.12.26.12.2
References (10)
EPSS history
Timeline
  • 27 DEC 13:49Z
    xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
    cvelistv5