misc: ocxl: fix possible double free in ocxl_file_register_afu
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 75ca758adbafc81804c39b2c200ecdc819a6c042 · < 950cf957fe34d40d63dfa3bf3968210430b6491e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
misc: ocxl: fix possible double free in ocxl_file_register_afu
info_release() will be called in device_unregister() when info->dev's reference count is 0. So there is no need to call ocxl_afu_put() and kfree() again.
Fix this by adding free_minor() and return to err_unregister error path.
From the CVE record · Linux
The Linux kernel's ocxl_file_register_afu error path can free resources twice after device_unregister() invokes info_release(). The input does not specify how an attacker could trigger this, or whether local or network access, authentication, or user interaction is required.
Engineers running Linux kernels with the ocxl component should check whether their kernel includes the fix; affected versions are not specified.