| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-22097: drm/vkms: Fix use after free and double free on init error |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| drm/vkms: Fix use after free and double free on init error |
| |
| If the driver initialization fails, the vkms_exit() function might |
| access an uninitialized or freed default_config pointer and it might |
| double free it. |
| |
| Fix both possible errors by initializing default_config only when the |
| driver initialization succeeded. |
| |
| The Linux kernel CVE team has assigned CVE-2025-22097 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 5.15.180 with commit 49a69f67f53518bdd9b7eeebf019a2da6cc0e954 |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.1.134 with commit 79d138d137b80eeb0a83244d1cff29e64cf91067 |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.6.87 with commit 561fc0c5cf41f646f3e9e61784cbc0fc832fb936 |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.12.23 with commit d5eb8e347905ab17788a7903fa1d3d06747355f5 |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.13.11 with commit b8a18bb53e06d6d3c1fd03d12533d6e333ba8853 |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.14.2 with commit 1f68f1cf09d06061eb549726ff8339e064eddebd |
| Issue introduced in 5.12 with commit 2df7af93fdadb9ba8226fe443fae15ecdefda2a6 and fixed in 6.15 with commit ed15511a773df86205bda66c37193569575ae828 |
| |
| 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-2025-22097 |
| 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/gpu/drm/vkms/vkms_drv.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/49a69f67f53518bdd9b7eeebf019a2da6cc0e954 |
| https://git.kernel.org/stable/c/79d138d137b80eeb0a83244d1cff29e64cf91067 |
| https://git.kernel.org/stable/c/561fc0c5cf41f646f3e9e61784cbc0fc832fb936 |
| https://git.kernel.org/stable/c/d5eb8e347905ab17788a7903fa1d3d06747355f5 |
| https://git.kernel.org/stable/c/b8a18bb53e06d6d3c1fd03d12533d6e333ba8853 |
| https://git.kernel.org/stable/c/1f68f1cf09d06061eb549726ff8339e064eddebd |
| https://git.kernel.org/stable/c/ed15511a773df86205bda66c37193569575ae828 |