platform/x86/amd/pmc: Propagate SMU errors and validate S2D address
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3d7d407dfb05b257e15cb0c6b056428a4a8c2e5d · < 0225c1d637687b03726f00ac65b6def843d2c464| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
platform/x86/amd/pmc: Propagate SMU errors and validate S2D address
amd_stb_s2d_init() discards the return value of several S2D SMU commands. When the SMU refuses a command (e.g. "SMU cmd failed. err: 0xff") the failure is only noticed indirectly - if at all - and reported as -EIO, masking the real error.
More seriously, the S2D_PHYS_ADDR_LOW/HIGH return values are ignored, so on failure phys_addr_low/hi are left uninitialised and the assembled address is passed straight to devm_ioremap(). When the SMU leaves them at zero this maps physical address 0 and trips the ioremap-on-RAM warning:
amd_pmc AMDI000B:00: SMU cmd failed. err: 0xff ioremap on RAM at 0x0000000000000000 - 0x0000000000ffffff WARNING: CPU: 13 PID: 4592 at arch/x86/mm/ioremap.c:...
Check the return value of each SMU command and propagate it, and reject a zero physical address before calling devm_ioremap().
From the CVE record · Linux
The Linux kernel’s AMD PMC S2D initialization ignores errors from SMU commands that return a physical address. If a command fails, it can pass an uninitialized or zero address to devm_ioremap(), potentially triggering an ioremap-on-RAM warning; the input does not specify an attacker path or access conditions.
Engineers running Linux kernels with AMD PMC S2D support should check their systems; affected versions are not specified.