CVE-2025-23161

PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type

No CVSS score yet EPSS 0.15%

Published 1 May 2025 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2025-23161

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-23161 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type

The access to the PCI config space via pci_ops::read and pci_ops::write is a low-level hardware access. The functions can be accessed with disabled interrupts even on PREEMPT_RT. The pci_lock is a raw_spinlock_t for this purpose.

A spinlock_t becomes a sleeping lock on PREEMPT_RT, so it cannot be acquired with disabled interrupts. The vmd_dev::cfg_lock is accessed in the same context as the pci_lock.

Make vmd_dev::cfg_lock a raw_spinlock_t type so it can be used with interrupts disabled.

This was reported as:

BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 Call Trace: rt_spin_lock+0x4e/0x130 vmd_pci_read+0x8d/0x100 [vmd] pci_user_read_config_byte+0x6f/0xe0 pci_read_config+0xfe/0x290 sysfs_kf_bin_read+0x68/0x90

[bigeasy: reword commit message] Tested-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> [kwilczynski: commit log] [bhelgaas: add back report info from https://lore.kernel.org/lkml/20241218115951.83062-1-ryotkkr98@gmail.com/]

Exploitation

EPSS 0.15%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 4.59% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before c250262d6485ca333e9821f85b07eb383ec546b1
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before c2968c812339593ac6e2bdd5cc3adabe3f05fa53
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before 13e5148f70e81991acbe0bab5b1b50ba699116e7
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before 5c3cfcf0b4bf43530788b08a8eaf7896ec567484
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before 2358046ead696ca5c7c628d6c0e2c6792619a3e5
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before 20d0a9062c031068fa39f725a32f182b709b5525
affected from 185a383ada2e7794b0e82e040223e741b24d2bf8, before 18056a48669a040bef491e63b25896561ee14d90
Other versions: unaffected
Linux
affected 4.5
unaffected before 4.5
unaffected from 5.15.181 up to and including 5.15.*
unaffected from 6.1.135 up to and including 6.1.*
unaffected from 6.6.88 up to and including 6.6.*
unaffected from 6.12.24 up to and including 6.12.*
unaffected from 6.13.12 up to and including 6.13.*
unaffected from 6.14.3 up to and including 6.14.*
unaffected 6.15 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-23161 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-23161

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-2025-23161
trivy image --scanners vuln IMAGE | grep CVE-2025-23161

Vulnpocalypse 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. Start free with one server and one domain or read how to install the collector.

References

Other references

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