| 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-2023-52976: efi: fix potential NULL deref in efi_mem_reserve_persistent |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| efi: fix potential NULL deref in efi_mem_reserve_persistent |
| |
| When iterating on a linked list, a result of memremap is dereferenced |
| without checking it for NULL. |
| |
| This patch adds a check that falls back on allocating a new page in |
| case memremap doesn't succeed. |
| |
| Found by Linux Verification Center (linuxtesting.org) with SVACE. |
| |
| [ardb: return -ENOMEM instead of breaking out of the loop] |
| |
| The Linux kernel CVE team has assigned CVE-2023-52976 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.4.232 with commit d92a25627bcdf264183670da73c9a60c0bac327e |
| Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.10.168 with commit 87d4ff18738fd71e7e3c10827c80257da6283697 |
| Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 5.15.93 with commit d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c |
| Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 6.1.11 with commit a2e6a9ff89f13666a1c3ff7195612ab949ea9afc |
| Issue introduced in 5.2 with commit 18df7577adae6c6c778bf774b3aebcacbc1fb439 and fixed in 6.2 with commit 966d47e1f27c45507c5df82b2a2157e5a4fd3909 |
| Issue introduced in 5.1.16 with commit b5961ecad7121fec138ebee7d9eba4863f9dc6e7 |
| |
| 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-2023-52976 |
| 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/firmware/efi/efi.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/d92a25627bcdf264183670da73c9a60c0bac327e |
| https://git.kernel.org/stable/c/87d4ff18738fd71e7e3c10827c80257da6283697 |
| https://git.kernel.org/stable/c/d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c |
| https://git.kernel.org/stable/c/a2e6a9ff89f13666a1c3ff7195612ab949ea9afc |
| https://git.kernel.org/stable/c/966d47e1f27c45507c5df82b2a2157e5a4fd3909 |