CVE-2025-38658
BaseFortify
Publication date: 2025-08-22
Last updated on: 2025-11-26
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-908 | The product uses or accesses a resource that has not been initialized. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs in the Linux kernel's nvmet PCI endpoint function where commands can be completed twice if the function nvmet_req_init() fails. Specifically, when nvmet_req_init() fails (for example, due to an unsupported opcode), it internally calls a completion function that leads to nvmet_pci_epf_complete_iod() being called twice. This double completion sends two responses to the host and corrupts the PCI NVMe target's state, potentially causing a kernel oops (crash). The issue arises because both nvmet_req_init() and another function, nvmet_pci_epf_exec_iod_work(), attempt to complete the failed command independently, leading to this duplication.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to crash (kernel oops) due to corruption of the PCI NVMe target's internal state. This can lead to system instability or denial of service when handling NVMe commands with unsupported opcodes, potentially disrupting normal operations on systems using the affected kernel component.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by sending a command with an unsupported opcode to the NVMe device and observing if it triggers a double completion and kernel oops. For example, using the nvme-cli tool, you can run the command: sudo nvme security-recv /dev/nvme0n1 -n1 -x4096. If this causes kernel errors or double completions, the system may be vulnerable.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves applying the patch that fixes the double completion issue by ensuring nvmet_req_init() and req->execute() complete all failed commands properly and removing the double completion case in nvmet_pci_epf_exec_iod_work(). Until the patch is applied, avoid sending unsupported opcodes that trigger the vulnerability.