iommu/amd: Fix undefined behavior in devid_write debugfs function
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.52, 7.2.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: iommu/amd: Fix undefined behavior in devid_write debugfs function When for_each_pci_segment() loop completes without finding a matching segment, the pci_seg pointer is not NULL but points to an invalid memory location (the list head). Accessing pci_seg->id after the loop causes undefined behavior. Fix this by handling the successful case inside the loop and returning -EINVAL after the loop if no matching segment is found.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 2e98940f123d9c69d4759078aea9a536244c98d3 · fixed in 8aabe0fba01486b5d893e708b05a8fa7f1b7efbb; From 2e98940f123d9c69d4759078aea9a536244c98d3 · fixed in 99d42aef089a07cfb1d404a7227ac9dc7628b497; From 2e98940f123d9c69d4759078aea9a536244c98d3 · fixed in 843e149989665f8309ad2efe6048dc76591e1f94
- Linux Linux
6.17
- KernelLinux
From 6.17.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6