# CVE-2023-31315: Code injection in 1st Gen AMD EPYC™ Processors

> A malicious program with ring0 access can modify SMM configuration via improper MSR validation, leading to arbitrary code execution on AMD processors.

- **Severity:** High 7.5 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Aug 2024
- **Updated:** 12 Sep 2024
- **Also known as:** CLSA-2024-1728477985, CLSA-2024-1728478701, CLSA-2024-1728579854, CLSA-2024-1728581276, CLSA-2024-1728581726, CLSA-2024-1728582568, CLSA-2024-1729015920, CLSA-2024-1729514415, DEBIAN-CVE-2023-31315, GHSA-7r5c-r5ww-995h, OESA-2024-2104, RHBA-2024:5645, RHBA-2024:6169, RHBA-2024:6202, RHSA-2024:5978, RHSA-2024:5980, RHSA-2024:5982, SUSE-SU-2024:2911-1, SUSE-SU-2024:2943-1, SUSE-SU-2024:2944-1, SUSE-SU-2024:2980-1, SUSE-SU-2024:3081-1, SUSE-SU-2024:4255-1, SUSE-SU-2025:20129-1, SUSE-SU-2025:20227-1, UBUNTU-CVE-2023-31315, USN-7077-1, openSUSE-SU-2024:14266-1

## What is CVE-2023-31315?

CVE-2023-31315 is a high-severity code injection vulnerability in 1st Gen AMD EPYC™ Processors, published on 9 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### 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.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2023-31315?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `iwl100-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:39.31.5.1-143.2.el9_4 |
| `iwl1000-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 1:39.31.5.1-143.2.el9_4 |
| `iwl105-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl135-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl2000-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl2030-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl3160-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 1:25.30.13.0-143.2.el9_4 |
| `iwl5000-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.83.5.1_1-143.2.el9_4 |
| `iwl5150-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:8.24.2.2-143.2.el9_4 |
| `iwl6000g2a-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl6000g2b-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:18.168.6.1-143.2.el9_4 |
| `iwl6050-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:41.28.5.1-143.2.el9_4 |
| `iwl7260-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 1:25.30.13.0-143.2.el9_4 |
| `libertas-sd8787-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:20240716-143.2.el9_4 |
| `linux-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:20240716-143.2.el9_4 |
| `linux-firmware-whence` | Red Hat:enterprise_linux:9::baseos | All versions | 0:20240716-143.2.el9_4 |
| `netronome-firmware` | Red Hat:enterprise_linux:9::baseos | All versions | 0:20240716-143.2.el9_4 |
| `iwl100-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:39.31.5.1-76.el7_7 |
| `iwl1000-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 1:39.31.5.1-76.el7_7 |
| `iwl105-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:18.168.6.1-76.el7_7 |
| `iwl135-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:18.168.6.1-76.el7_7 |
| `iwl2000-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:18.168.6.1-76.el7_7 |
| `iwl2030-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:18.168.6.1-76.el7_7 |
| `iwl3160-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:22.0.7.0-76.el7_7 |
| `iwl3945-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:15.32.2.9-76.el7_7 |
| `iwl4965-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:228.61.2.24-76.el7_7 |
| `iwl5000-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:8.83.5.1_1-76.el7_7 |
| `iwl5150-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:8.24.2.2-76.el7_7 |
| `iwl6000-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:9.221.4.1-76.el7_7 |
| `iwl6000g2a-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:17.168.5.3-76.el7_7 |
| `iwl6000g2b-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:17.168.5.2-76.el7_7 |
| `iwl6050-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:41.28.5.1-76.el7_7 |
| `iwl7260-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:22.0.7.0-76.el7_7 |
| `iwl7265-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:22.0.7.0-76.el7_7 |
| `linux-firmware` | Red Hat:rhel_aus:7.7::server | All versions | 0:20190429-76.gitddde598.el7_7 |
| `iwl100-firmware` | Red Hat:rhel_e4s:9.0::baseos | All versions | 0:39.31.5.1-131.el9_0 |
| `iwl1000-firmware` | Red Hat:rhel_e4s:9.0::baseos | All versions | 1:39.31.5.1-131.el9_0 |
| `iwl105-firmware` | Red Hat:rhel_e4s:9.0::baseos | All versions | 0:18.168.6.1-131.el9_0 |
| `iwl135-firmware` | Red Hat:rhel_e4s:9.0::baseos | All versions | 0:18.168.6.1-131.el9_0 |
| `iwl2000-firmware` | Red Hat:rhel_e4s:9.0::baseos | All versions | 0:18.168.6.1-131.el9_0 |

## How do I fix CVE-2023-31315?

Apply the vendor's patch.

## Is CVE-2023-31315 being exploited?

There is no known exploitation of CVE-2023-31315 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-31315 and fix it if it is affected.

What it is: CVE-2023-31315 is a high-severity code injection vulnerability in 1st Gen AMD EPYC™ Processors, published on 9 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-31315 in the wild and no public exploit code.

Affected product: 1st Gen AMD EPYC™ Processors. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-31315/ (Markdown: https://insights.sbomify.com/CVE-2023-31315/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-31315
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-31315
- OSV: https://osv.dev/vulnerability/CVE-2023-31315

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-31315/
Summaries are generated and may contain mistakes; the official description above is the record.
