CVE-2023-53746
Description
In the Linux kernel, the following vulnerability has been resolved:
s390/vfio-ap: fix memory leak in vfio_ap device driver
The device release callback function invoked to release the matrix device uses the dev_get_drvdata(device *dev) function to retrieve the pointer to the vfio_matrix_dev object in order to free its storage. The problem is, this object is not stored as drvdata with the device; since the kfree function will accept a NULL pointer, the memory for the vfio_matrix_dev object is never freed.
Since the device being released is contained within the vfio_matrix_dev object, the container_of macro will be used to retrieve its pointer.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A memory leak in the s390/vfio-ap device driver occurs because the release callback uses dev_get_drvdata instead of container_of, preventing the vfio_matrix_dev object from being freed.
Vulnerability
Description
In the Linux kernel's s390/vfio-ap device driver, a memory leak exists in the device release callback function. The callback attempts to retrieve the vfio_matrix_dev object using dev_get_drvdata(device *dev), but this object is never stored as driver data for the device. Consequently, dev_get_drvdata returns NULL, and the subsequent kfree(NULL) is a no-op, leaving the allocated memory for the vfio_matrix_dev object unfreed [1][2].
Exploitation
Context
The bug is triggered during the normal lifecycle of the matrix device, specifically when the device is released (e.g., during module unload or device removal). No special privileges or network access are required; the vulnerability manifests in standard system operations involving the vfio-ap driver on s390 systems. An attacker with local access could potentially accelerate the leak by repeatedly triggering device creation and removal, but the primary risk is from routine administrative actions.
Impact
The memory leak gradually consumes kernel memory, potentially leading to resource exhaustion and system instability. Over time, this can degrade performance or cause a denial-of-service condition, especially on systems with limited memory or those that frequently cycle the vfio-ap device.
Mitigation
The fix replaces the incorrect dev_get_drvdata call with the container_of macro, which correctly derives the vfio_matrix_dev pointer from the embedded device structure. The patch has been applied to the Linux kernel stable branches as referenced in commits [1] and [2]. Users should update to a kernel version containing these commits to resolve the vulnerability.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
65195de1d5f66ee17dea3072daa2bff25e9bb6a40fda14b4b7b6a02f5bf158f8cf767589fVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/5195de1d5f66b276683240a896783f7f43c4f664nvd
- git.kernel.org/stable/c/6a40fda14b4be3e38f03cc42ffd4efbc64fb3e67nvd
- git.kernel.org/stable/c/7b6a02f5bf15931464c79dfd487c57f76aae3496nvd
- git.kernel.org/stable/c/8f8cf767589f2131ae5d40f3758429095c701c84nvd
- git.kernel.org/stable/c/aa2bff25e9bb10c935c7ffe3d5f5975bdccb1749nvd
- git.kernel.org/stable/c/ee17dea3072dec0bc34399a32fa884e26342e4eanvd
News mentions
0No linked articles in our index yet.