From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD27E1AB521 for ; Thu, 20 Jun 2024 11:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882322; cv=none; b=oOd+S8PYjw3UCKibRnIO15JD/0iQBwpeJGMiZ7O9O8+ptwLe7YfoBxy5/BGQbw/w1jLKE6fEcI1p8w+BO/CsrQ5Gv2QHd8S+eX6Kk82TwnDrb3L7kMXKHuUxNnkmefIfgCgHWSg2sF1RnQnpo5islJ6+mt4kuLE1xidiUeiWQHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882322; c=relaxed/simple; bh=qBAvHzbclSszgYAPSZ0D6YL5deiyqReKao6QAHz8BXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=issDE97b2Crn/GL0VEuTOVx8DJXJsBv5DyaMeFRhixnB+8YGqqpc47kDQp045Xe3hGe/nkJQlq2K6izQb5+xwhT8HVSnkFQIFkD5eFDYbAZtSvw2ewY8N0nJVRlSwY+erku8hatldDHrb/hppdxWHPnrnzIk9VI4YyO3mA0dokc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NET9+29w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NET9+29w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 582F6C2BD10; Thu, 20 Jun 2024 11:18:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882322; bh=qBAvHzbclSszgYAPSZ0D6YL5deiyqReKao6QAHz8BXA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=NET9+29wP8+5R59o+InAWhNOuFbVjTW6t4/XPBS9q2UqLZpg59FOseoaNGYDVMSxe voIJVTnAopilSCVF8K7V4LRtmXbofCyMjQHE9idgbToISmfai01z/xxIoQ7XqXrfAH rB47KBYyEqZho3HpJqcYY5gMVagyYDK03SphuStw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48769: efi: runtime: avoid EFIv2 runtime services on Apple x86 machines Date: Thu, 20 Jun 2024 13:16:49 +0200 Message-ID: <2024062011-CVE-2022-48769-0ff7@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3186; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qBAvHzbclSszgYAPSZ0D6YL5deiyqReKao6QAHz8BXA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/NV29Zp3GAPcetfEyP/02BCZ7rJhE+eDB6kb6g8Fn vi98JpQRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykcz3D/JSgwy/TdxTaBTZJ 3OzdqRFoqZ31n2FB2/eXRyO2reA9kJB02v7o2U2sm0/JAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: efi: runtime: avoid EFIv2 runtime services on Apple x86 machines Aditya reports [0] that his recent MacbookPro crashes in the firmware when using the variable services at runtime. The culprit appears to be a call to QueryVariableInfo(), which we did not use to call on Apple x86 machines in the past as they only upgraded from EFI v1.10 to EFI v2.40 firmware fairly recently, and QueryVariableInfo() (along with UpdateCapsule() et al) was added in EFI v2.00. The only runtime service introduced in EFI v2.00 that we actually use in Linux is QueryVariableInfo(), as the capsule based ones are optional, generally not used at runtime (all the LVFS/fwupd firmware update infrastructure uses helper EFI programs that invoke capsule update at boot time, not runtime), and not implemented by Apple machines in the first place. QueryVariableInfo() is used to 'safely' set variables, i.e., only when there is enough space. This prevents machines with buggy firmwares from corrupting their NVRAMs when they run out of space. Given that Apple machines have been using EFI v1.10 services only for the longest time (the EFI v2.0 spec was released in 2006, and Linux support for the newly introduced runtime services was added in 2011, but the MacbookPro12,1 released in 2015 still claims to be EFI v1.10 only), let's avoid the EFI v2.0 ones on all Apple x86 machines. [0] https://lore.kernel.org/all/6D757C75-65B1-468B-842D-10410081A8E4@live.com/ The Linux kernel CVE team has assigned CVE-2022-48769 to this issue. Affected and fixed versions =========================== Fixed in 5.10.96 with commit b0f1cc093bc2 Fixed in 5.15.19 with commit 3df524489788 Fixed in 5.16.5 with commit a4085859411c Fixed in 5.17 with commit f5390cd0b43c 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-2022-48769 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/b0f1cc093bc2493ac259c53766fd2b800e085807 https://git.kernel.org/stable/c/3df52448978802ae15dcebf66beba1029df957b4 https://git.kernel.org/stable/c/a4085859411c825c321c9b55b8a9dc5a128a6684 https://git.kernel.org/stable/c/f5390cd0b43c2e54c7cf5506c7da4a37c5cef746