CVE-2025-39784
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-11

Last updated on: 2025-11-25

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: PCI: Fix link speed calculation on retrain failure When pcie_failed_link_retrain() fails to retrain, it tries to revert to the previous link speed. However it calculates that speed from the Link Control 2 register without masking out non-speed bits first. PCIE_LNKCTL2_TLS2SPEED() converts such incorrect values to PCI_SPEED_UNKNOWN (0xff), which in turn causes a WARN splat in pcie_set_target_speed(): pci 0000:00:01.1: [1022:14ed] type 01 class 0x060400 PCIe Root Port pci 0000:00:01.1: broken device, retraining non-functional downstream link at 2.5GT/s pci 0000:00:01.1: retraining failed WARNING: CPU: 1 PID: 1 at drivers/pci/pcie/bwctrl.c:168 pcie_set_target_speed RDX: 0000000000000001 RSI: 00000000000000ff RDI: ffff9acd82efa000 pcie_failed_link_retrain pci_device_add pci_scan_single_device Mask out the non-speed bits in PCIE_LNKCTL2_TLS2SPEED() and PCIE_LNKCAP_SLS2SPEED() so they don't incorrectly return PCI_SPEED_UNKNOWN. [bhelgaas: commit log, add details from https://lore.kernel.org/r/1c92ef6bcb314ee6977839b46b393282e4f52e74.1750684771.git.lukas@wunner.de]
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-11
Last Modified
2025-11-25
Generated
2026-05-27
AI Q&A
2025-09-11
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel From 5.15.160 (inc) to 5.16 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-NVD-CWE-noinfo
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability occurs in the Linux kernel's PCIe link speed calculation during a link retrain failure. When the function pcie_failed_link_retrain() fails to retrain the PCIe link, it attempts to revert to the previous link speed. However, it incorrectly calculates the speed from the Link Control 2 register without masking out bits that are not related to speed. This causes the conversion function PCIE_LNKCTL2_TLS2SPEED() to return an unknown speed value (PCI_SPEED_UNKNOWN), which leads to warnings and errors in the kernel, potentially indicating a broken device or non-functional downstream link.


How can this vulnerability impact me? :

The impact of this vulnerability is that the PCIe link retrain failure handling may incorrectly report the link speed as unknown, causing warning messages and potentially indicating a broken or non-functional PCIe device link. This could lead to instability or degraded performance in systems relying on PCIe devices, as the kernel may not correctly manage link speeds after retrain failures.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by monitoring system logs for warnings related to PCIe link retraining failures. Specifically, look for messages similar to: 'WARNING: CPU: ... pcie_set_target_speed' and 'retraining failed' in the kernel logs. You can use the command 'dmesg | grep -i pcie' or 'journalctl -k | grep -i pcie' to find such warnings indicating the issue.


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation involves updating the Linux kernel to a version that includes the fix for this vulnerability, which masks out non-speed bits in the link speed calculation to prevent incorrect PCI_SPEED_UNKNOWN values and related warnings. Until the update is applied, monitoring for the warning messages and avoiding operations that trigger PCIe link retraining failures may help reduce impact.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart