s390/vfio-ap: fix memory leak in vfio_ap device driver
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1fde573413b549d52183382e639c1d6ce88f5959 · < 8f8cf767589f2131ae5d40f3758429095c701c84| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's s390/vfio-ap device release callback does not free the vfio_matrix_dev object, causing a memory leak. The input does not describe how an attacker could trigger the leak or specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the s390/vfio-ap driver should check their exposure; affected versions were not provided.