| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2024-43875: PCI: endpoint: Clean up error handling in vpci_scan_bus() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| PCI: endpoint: Clean up error handling in vpci_scan_bus() |
| |
| Smatch complains about inconsistent NULL checking in vpci_scan_bus(): |
| |
| drivers/pci/endpoint/functions/pci-epf-vntb.c:1024 vpci_scan_bus() error: we previously assumed 'vpci_bus' could be null (see line 1021) |
| |
| Instead of printing an error message and then crashing we should return |
| an error code and clean up. |
| |
| Also the NULL check is reversed so it prints an error for success |
| instead of failure. |
| |
| The Linux kernel CVE team has assigned CVE-2024-43875 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.15.153 with commit e2b6ef72b7aea9d7d480d2df499bcd1c93247abb and fixed in 5.15.165 with commit 24414c842a24d0fd498f9db6d2a762a8dddf1832 |
| Issue introduced in 6.0 with commit e35f56bb03304abc92c928b641af41ca372966bb and fixed in 6.1.103 with commit 7d368de78b60088ec9031c60c88976c0063ea4c0 |
| Issue introduced in 6.0 with commit e35f56bb03304abc92c928b641af41ca372966bb and fixed in 6.6.44 with commit 0e27e2e8697b8ce96cdef43f135426525d9d1f8f |
| Issue introduced in 6.0 with commit e35f56bb03304abc92c928b641af41ca372966bb and fixed in 6.10.3 with commit b9e8695246bcfc028341470cbf92630cdc1ba36b |
| Issue introduced in 6.0 with commit e35f56bb03304abc92c928b641af41ca372966bb and fixed in 6.11 with commit 8e0f5a96c534f781e8c57ca30459448b3bfe5429 |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2024-43875 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/pci/endpoint/functions/pci-epf-vntb.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/24414c842a24d0fd498f9db6d2a762a8dddf1832 |
| https://git.kernel.org/stable/c/7d368de78b60088ec9031c60c88976c0063ea4c0 |
| https://git.kernel.org/stable/c/0e27e2e8697b8ce96cdef43f135426525d9d1f8f |
| https://git.kernel.org/stable/c/b9e8695246bcfc028341470cbf92630cdc1ba36b |
| https://git.kernel.org/stable/c/8e0f5a96c534f781e8c57ca30459448b3bfe5429 |