powerpc/pseries: papr-phy-attest - validate cmd.length, plug mem leak
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.467.1.107.2In the Linux kernel, the following vulnerability has been resolved:
powerpc/pseries: papr-phy-attest - validate cmd.length, plug mem leak
In papr_phy_attest_create_handle(), the params->cmd.length is not validated before use, which can result in a buffer overlow. Check it and return -EINVAL if it is either 0 or exceeds sizeof(params->cmd).
Also, params is freed on the success path but not error. Free it on errors after memory allocation. And free it on negative fd.
From the CVE record · Linux
The Linux kernel's papr-phy-attest code does not validate cmd.length before using it, which can cause a buffer overflow. Error paths can also leak memory. The input does not specify how an attacker could reach this code or whether authentication or user interaction is required.
Engineers running Linux kernels with the powerpc/pseries papr-phy-attest code should check their versions; affected versions were not provided.