{"id":"CVE-2025-23161","aliases":["CVE-2025-23161"],"related":[],"kind":"vulnerability","state":"published","title":"PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type\n\nThe access to the PCI config space via pci_ops::read and pci_ops::write is\na low-level hardware access. The functions can be accessed with disabled\ninterrupts even on PREEMPT_RT. The pci_lock is a raw_spinlock_t for this\npurpose.\n\nA spinlock_t becomes a sleeping lock on PREEMPT_RT, so it cannot be\nacquired with disabled interrupts. The vmd_dev::cfg_lock is accessed in\nthe same context as the pci_lock.\n\nMake vmd_dev::cfg_lock a raw_spinlock_t type so it can be used with\ninterrupts disabled.\n\nThis was reported as:\n\n  BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48\n  Call Trace:\n   rt_spin_lock+0x4e/0x130\n   vmd_pci_read+0x8d/0x100 [vmd]\n   pci_user_read_config_byte+0x6f/0xe0\n   pci_read_config+0xfe/0x290\n   sysfs_kf_bin_read+0x68/0x90\n\n[bigeasy: reword commit message]\nTested-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>\n[kwilczynski: commit log]\n[bhelgaas: add back report info from\nhttps://lore.kernel.org/lkml/20241218115951.83062-1-ryotkkr98@gmail.com/]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nPCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type\n\nThe access to the PCI config space via pci_ops::read and pci_ops::write is\na low-level hardware access. The functions can be accessed with disabled\ninterrupts even on PREEMPT_RT. The pci_lock is a raw_spinlock_t for this\npurpose.\n\nA spinlock_t becomes a sleeping lock on PREEMPT_RT, so it cannot be\nacquired with disabled interrupts. The vmd_dev::cfg_lock is accessed in\nthe same context as the pci_lock.\n\nMake vmd_dev::cfg_lock a raw_spinlock_t type so it can be used with\ninterrupts disabled.\n\nThis was reported as:\n\n  BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48\n  Call Trace:\n   rt_spin_lock+0x4e/0x130\n   vmd_pci_read+0x8d/0x100 [vmd]\n   pci_user_read_config_byte+0x6f/0xe0\n   pci_read_config+0xfe/0x290\n   sysfs_kf_bin_read+0x68/0x90\n\n[bigeasy: reword commit message]\nTested-off-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>\n[kwilczynski: commit log]\n[bhelgaas: add back report info from\nhttps://lore.kernel.org/lkml/20241218115951.83062-1-ryotkkr98@gmail.com/]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI: vmd: Convertir vmd_dev::cfg_lock en tipo raw_spinlock_t El acceso al espacio de configuración PCI mediante pci_ops::read y pci_ops::write es un acceso de hardware de bajo nivel. Se puede acceder a las funciones con interrupciones deshabilitadas incluso en PREEMPT_RT. El pci_lock es un raw_spinlock_t para este propósito. Un spinlock_t se convierte en un bloqueo inactivo en PREEMPT_RT, por lo que no se puede adquirir con interrupciones deshabilitadas. Se accede a vmd_dev::cfg_lock en el mismo contexto que el pci_lock. Convertir vmd_dev::cfg_lock en un tipo raw_spinlock_t para que pueda usarse con interrupciones deshabilitadas. Esto se informó como: ERROR: función inactiva llamada desde un contexto no válido en kernel/locking/spinlock_rt.c:48 Rastreo de llamadas: 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: reformular el mensaje de confirmación] Probado por: Luis Claudio R. Goncalves  [kwilczynski: registro de confirmaciones] [bhelgaas: agregar información del informe de https://lore.kernel.org/lkml/20241218115951.83062-1-ryotkkr98@gmail.com/]","source":"nvd"}],"published":"2025-05-01T12:55:46.021Z","modified":"2026-11-05T21:17:50.997Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"c250262d6485ca333e9821f85b07eb383ec546b1","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"c2968c812339593ac6e2bdd5cc3adabe3f05fa53","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"13e5148f70e81991acbe0bab5b1b50ba699116e7","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"5c3cfcf0b4bf43530788b08a8eaf7896ec567484","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"2358046ead696ca5c7c628d6c0e2c6792619a3e5","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"20d0a9062c031068fa39f725a32f182b709b5525","status":"affected"},{"type":"git","introduced":"185a383ada2e7794b0e82e040223e741b24d2bf8","fixed":"18056a48669a040bef491e63b25896561ee14d90","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.5","status":"unaffected"},{"type":"semver","introduced":"5.15.181","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.135","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.88","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.24","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.12","lastAffected":"6.13.*","status":"unaffected"},{"type":"semver","introduced":"6.14.3","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"5.15.181"},{"status":"affected","introduced":"5.16","fixed":"6.1.135"},{"status":"affected","introduced":"6.2","fixed":"6.6.88"},{"status":"affected","introduced":"6.7","fixed":"6.12.24"},{"status":"affected","introduced":"6.13","fixed":"6.13.12"},{"status":"affected","introduced":"6.14","fixed":"6.14.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/c250262d6485ca333e9821f85b07eb383ec546b1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c2968c812339593ac6e2bdd5cc3adabe3f05fa53","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/13e5148f70e81991acbe0bab5b1b50ba699116e7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5c3cfcf0b4bf43530788b08a8eaf7896ec567484","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2358046ead696ca5c7c628d6c0e2c6792619a3e5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/20d0a9062c031068fa39f725a32f182b709b5525","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/18056a48669a040bef491e63b25896561ee14d90","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html","tags":["mailing-list"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:39:52.254Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-23161","url":"https://www.cve.org/CVERecord?id=CVE-2025-23161","licence":"CVE Terms of Use","modified":"2026-11-05T20:41:52.614Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-23161","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-23161","licence":"Public domain","modified":"2026-11-05T21:17:50.997Z"}],"updatedAt":"2026-11-25T22:58:57.274Z","epss":{"score":0.00216,"percentile":0.0696,"date":"2026-11-30T12:00:22.000Z"}}