CyberSecBulletin
CVE-2023-31315NVD status: Deferred

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. 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.
  2. 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.
  3. 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

VendorProductAffected versionsFixed in
AMD3rd Gen AMD EPYC™ Processorsvarious up to, but not including, Milan PI 1.0.0.D; before milan.pi.1.0.0.dMilan PI 1.0.0.D, milan.pi.1.0.0.d
AMD1st Gen AMD EPYC™ Processorsvarious up to, but not including, Naples PI 1.0.0.M; before naples.pi.1.0.0.mNaples PI 1.0.0.M, naples.pi.1.0.0.m
AMD2nd Gen AMD EPYC™ Processorsvarious up to, but not including, Rome PI 1.0.0.J; before rome.pi.1.0.0.jRome PI 1.0.0.J, rome.pi.1.0.0.j
AMD4th Gen AMD EPYC™ Processorsbefore genoa_pi_1.0.0.cgenoa_pi_1.0.0.c
AMDAMD EPYC™ Embedded 3000variousNot stated
AMDAMD EPYC™ Embedded 7002variousNot stated
AMDAMD EPYC™ Embedded 7003variousNot stated
AMDAMD EPYC™ Embedded 9003Not specified in the recordNot stated
AMDAMD Ryzen™ Embedded R1000variousNot stated
AMDAMD Ryzen™ Embedded R2000variousNot stated
AMDAMD Ryzen™ Embedded 5000variousNot stated
AMDAMD Ryzen™ Embedded 7000variousNot stated
AMDAMD Ryzen™ Embedded V1000variousNot stated
AMDAMD Ryzen™ Embedded V2000variousNot stated
AMDAMD Ryzen™ Embedded V3000variousNot stated
AMDAMD Ryzen™ 3000 Series Desktop ProcessorsvariousNot stated
AMDAMD Ryzen™ 5000 Series Desktop ProcessorsNot specified in the recordNot stated
AMDAMD Ryzen™ 5000 Series Desktop processor with Radeon™ GraphicsNot specified in the recordNot stated
AMDAMD Ryzen™ 7000 Series Desktop Processorsvarious up to, but not including, ComboAM5PI 1.2.0.1ComboAM5PI 1.2.0.1
AMDAMD Ryzen™ 4000 Series Desktop Processors with Radeon™ Graphicsvarious up to, but not including, ComboAM4v2PI 1.2.0.cbComboAM4v2PI 1.2.0.cb
AMDAMD Ryzen™ Threadripper™ 3000 Series Processorsvarious up to, but not including, CastlePeakPI-SP3r3 1.0.0.BCastlePeakPI-SP3r3 1.0.0.B
AMDAMD Ryzen™ Threadripper™ PRO Processorsvarious up to, but not including, ChagallWSPI-sWRX8 1.0.0.8ChagallWSPI-sWRX8 1.0.0.8
AMDAMD Ryzen™ Threadripper™ PRO 3000WX Series ProcessorsNot specified in the recordNot stated
AMDAMD Athlon™ 3000 Series Mobile Processors with Radeon™ GraphicsNot specified in the recordNot stated
AMDAMD Ryzen™ 3000 Series Mobile Processor with Radeon™ Graphicsvarious up to, but not including, Picasso-FP5 1.0.1.2Picasso-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 systemScoreSeverityScored by
CVSS 3.17.5HighCNA (amd.com)
CVSS 3.16.8MediumCISA (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

  1. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  2. CVE record published.
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in 3rd Gen AMD EPYC™ Processors

All 3rd Gen AMD EPYC™ Processors vulnerabilities

Recent Improper Control of Generation of Code vulnerabilities

Spotted an error? Tell us.