3rd Gen AMD EPYC™ Processors: Improper Control of Generation of Code
CVE-2023-31315 is a high-severity improper control of generation of code vulnerability in 3rd Gen AMD EPYC™ Processors from AMD, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited with local access to the system by an attacker with administrator privileges, without any action from a user. The record lists versions Milan PI 1.0.0.D, milan.pi.1.0.0.d as the first without the flaw, so updating 3rd Gen AMD EPYC™ Processors to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.63% chance of exploitation within 30 days, higher than 51% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update 3rd Gen AMD EPYC™ Processors to Milan PI 1.0.0.D or milan.pi.1.0.0.d, whichever matches your release line, or a later version.
- Update 1st Gen AMD EPYC™ Processors to Naples PI 1.0.0.M or naples.pi.1.0.0.m, whichever matches your release line, or a later version.
- Update 2nd Gen AMD EPYC™ Processors to Rome PI 1.0.0.J or rome.pi.1.0.0.j, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| AMD | 3rd Gen AMD EPYC™ Processors | various up to, but not including, Milan PI 1.0.0.D; before milan.pi.1.0.0.d | Milan PI 1.0.0.D, milan.pi.1.0.0.d |
| AMD | 1st Gen AMD EPYC™ Processors | various up to, but not including, Naples PI 1.0.0.M; before naples.pi.1.0.0.m | Naples PI 1.0.0.M, naples.pi.1.0.0.m |
| AMD | 2nd Gen AMD EPYC™ Processors | various up to, but not including, Rome PI 1.0.0.J; before rome.pi.1.0.0.j | Rome PI 1.0.0.J, rome.pi.1.0.0.j |
| AMD | 4th Gen AMD EPYC™ Processors | before genoa_pi_1.0.0.c | genoa_pi_1.0.0.c |
| AMD | AMD EPYC™ Embedded 3000 | various | Not stated |
| AMD | AMD EPYC™ Embedded 7002 | various | Not stated |
| AMD | AMD EPYC™ Embedded 7003 | various | Not stated |
| AMD | AMD EPYC™ Embedded 9003 | Not specified in the record | Not stated |
| AMD | AMD Ryzen™ Embedded R1000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded R2000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded 5000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded 7000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded V1000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded V2000 | various | Not stated |
| AMD | AMD Ryzen™ Embedded V3000 | various | Not stated |
| AMD | AMD Ryzen™ 3000 Series Desktop Processors | various | Not stated |
| AMD | AMD Ryzen™ 5000 Series Desktop Processors | Not specified in the record | Not stated |
| AMD | AMD Ryzen™ 5000 Series Desktop processor with Radeon™ Graphics | Not specified in the record | Not stated |
| AMD | AMD Ryzen™ 7000 Series Desktop Processors | various up to, but not including, ComboAM5PI 1.2.0.1 | ComboAM5PI 1.2.0.1 |
| AMD | AMD Ryzen™ 4000 Series Desktop Processors with Radeon™ Graphics | various up to, but not including, ComboAM4v2PI 1.2.0.cb | ComboAM4v2PI 1.2.0.cb |
| AMD | AMD Ryzen™ Threadripper™ 3000 Series Processors | various up to, but not including, CastlePeakPI-SP3r3 1.0.0.B | CastlePeakPI-SP3r3 1.0.0.B |
| AMD | AMD Ryzen™ Threadripper™ PRO Processors | various up to, but not including, ChagallWSPI-sWRX8 1.0.0.8 | ChagallWSPI-sWRX8 1.0.0.8 |
| AMD | AMD Ryzen™ Threadripper™ PRO 3000WX Series Processors | Not specified in the record | Not stated |
| AMD | AMD Athlon™ 3000 Series Mobile Processors with Radeon™ Graphics | Not specified in the record | Not stated |
| AMD | AMD Ryzen™ 3000 Series Mobile Processor with Radeon™ Graphics | various up to, but not including, Picasso-FP5 1.0.1.2 | Picasso-FP5 1.0.1.2 |
Version data comes from the organisation that assigned the CVE; 35 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- HighAdministrator-level access is required first.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H. Scored by CNA (amd.com).
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (amd.com) |
| CVSS 3.1 | 6.8 | Medium | CISA (ADP) |
Official description
Improper validation in a model specific register (MSR) could allow a malicious program with ring0 access to modify SMM configuration while SMI lock is enabled, potentially leading to arbitrary code execution.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Control of Generation of Code
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
How developers prevent this class of flaw
- Refactor your program so that you do not have to dynamically generate code.
- Run your code in a jail or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product. Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
- Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
More Improper Control of Generation of Code vulnerabilities (CWE-94)
Timeline
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Other references
Other vulnerabilities in 3rd Gen AMD EPYC™ Processors
- 7.4 High severity
- 7.9 High severity
- 7.9 High severity
- 8.2 High severity
- 7.1 High severity
Recent Improper Control of Generation of Code vulnerabilities
- 8.8 High severity
- 7.6 High severity
- 7.2 High severity
- 7.2 High severity
- 7.2 High severity
- 9.8 Critical severity
Spotted an error? Tell us.