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 C5A001DC994 for ; Thu, 1 May 2025 14:11:38 +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=1746108698; cv=none; b=rWl+fwpcT8M+pfJ19EQLw+paYfyvIfD/8wOvK1PcqNlYxkdf+7b/Hp7RZYEWIBUndriq495FYodoac5ozjqjF2A6qiZAmNiwgotYPfM6Nu8Nmg49+kJUh6tBttdLyKa83u/Czm3iraTQTgIQ79VMTfIpMvAesfLuutidEVyVn1U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108698; c=relaxed/simple; bh=jba955Uzo0DZaUtRSDxWrPsU0Mjytdi/rTvNqmDX6Yo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=u+hRfqhuwAIQcu9S5l/NK+L0nRK3bLRCsDr3dEW7vfYqd8moqRvd/OpilSEWqMRVD9/YFnHJ2MEz4sP1Ybyl2AR96dAqbdVrHN8GWRqtyla0NkrQbTDz4fGpkfU8q59d/+XBF9tDtfg59vkBvOxxHqVQk6KYrs+Glqd0af9P4+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=krar35Gb; 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="krar35Gb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD74EC4CEE3; Thu, 1 May 2025 14:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108698; bh=jba955Uzo0DZaUtRSDxWrPsU0Mjytdi/rTvNqmDX6Yo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=krar35GbYxPzyxs8g72FO2H+zZWTCpAmk/E2EbcDToC2dloiTMB/Fee6gAp2ZUhTX AASAZth09rkYeo2eLynjG4JF7KLdhFTQaOiiYLk1dOX1vJN+70CTqd8IKteArOo8PN /yhw3n0Ef9f9i72PlzI+WYAvPoenEi35jsLrcOKA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49785: x86/sgx: Add overflow check in sgx_validate_offset_length() Date: Thu, 1 May 2025 16:09:35 +0200 Message-ID: <2025050120-CVE-2022-49785-64a3@gregkh> X-Mailer: git-send-email 2.49.0 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=2166; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/aBVIw36WwjRp7+0LP7v2mZ3Fgwur6GEA2CJWm5OEqA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDRM0tl5JWRuxa8uE/cE3k51rDvMz6KzNv2PWYVIku zX2wQWfjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIXB/DHM4212k2M4y/6/jt 7S+bftm588iNDQzzlG/88rqw2ZB3wbQbu2Z5yXccyoy9CQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: x86/sgx: Add overflow check in sgx_validate_offset_length() sgx_validate_offset_length() function verifies "offset" and "length" arguments provided by userspace, but was missing an overflow check on their addition. Add it. The Linux kernel CVE team has assigned CVE-2022-49785 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit c6d26d370767fa227fc44b98a8bdad112efdf563 and fixed in 5.15.81 with commit 5277e3d633a5d4157987f4aff068caa55e36db19 Issue introduced in 5.11 with commit c6d26d370767fa227fc44b98a8bdad112efdf563 and fixed in 6.0.10 with commit 3b1c10fb754b0b67165e3f055a4208e5ba26dc89 Issue introduced in 5.11 with commit c6d26d370767fa227fc44b98a8bdad112efdf563 and fixed in 6.1 with commit f0861f49bd946ff94fce4f82509c45e167f63690 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-49785 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: arch/x86/kernel/cpu/sgx/ioctl.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/5277e3d633a5d4157987f4aff068caa55e36db19 https://git.kernel.org/stable/c/3b1c10fb754b0b67165e3f055a4208e5ba26dc89 https://git.kernel.org/stable/c/f0861f49bd946ff94fce4f82509c45e167f63690