CVE-2023-1998

Spectre v2 SMT mitigations problem in Linux kernel

5.6 medium EPSS 1.74%

Published 21 Apr 2023 Updated 13 Feb 2025 CNA: Google

Description

The Linux kernel allows userspace processes to enable mitigations by calling prctl with PR_SET_SPECULATION_CTRL which disables the speculation feature as well as by using seccomp. We had noticed that on VMs of at least one major cloud provider, the kernel still left the victim process exposed to attacks in some cases even after enabling the spectre-BTI mitigation with prctl. The same behavior can be observed on a bare-metal machine when forcing the mitigation to IBRS on boot command line.

This happened because when plain IBRS was enabled (not enhanced IBRS), the kernel had some logic that determined that STIBP was not needed. The IBRS bit implicitly protects against cross-thread branch target injection. However, with legacy IBRS, the IBRS bit was cleared on returning to userspace, due to performance reasons, which disabled the implicit STIBP and left userspace threads vulnerable to cross-thread branch target injection against which STIBP protects.

Severity (CVSS)

5.6 medium CVSS 3.1 from Google (CNA)
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
changed: the damage reaches other components, such as the host of a container or other users
Impact
confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 1.74%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 78.1% of all scored CVEs. Scores of 26 Nov 2026.

The assessment of CISA (SSVC, 4 Feb 2025):

Exploitation
poc: a proof of concept is public
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Weakness

  • CWE-1303 Non-Transparent Sharing of Microarchitectural Resources

Affected products

As the CNA lists them.

ProductVersions
Linux Kernel
package kernel
affected before 6.3
Other versions: unaffected

Is my server affected?

Find the installed version of kernel and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i kernel
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-1998 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-1998

RHEL, Rocky, Alma, Fedora

rpm -q kernel
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-1998

Alpine

apk list --installed | grep -i kernel

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-1998
trivy image --scanners vuln IMAGE | grep CVE-2023-1998

PatchBrief makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Install the agent.

References

Other references

Source: the record CVE-2023-1998 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.