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 9918A6214D for ; Mon, 4 Mar 2024 18:14:45 +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=1709576085; cv=none; b=mweXPhlDRx3UEBcNlF8RrpZ5Pc56J1S8fj43ZwQ8tGcYP37EH/jOlxlV0LtSaqUxg0z1YVD+Vgn71v/wcajs0hEHVRh2HBbO9mlweZ0qV0RZON4GVPSnPADeWOKlmYAC6wUOp3zlKFuQ6mDvPD5kCl0weA9/R511gBzifQgnUBo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709576085; c=relaxed/simple; bh=jEn480WJwg/UPuPyCwRXqP87MLEo5/+vBLxEZKlHTzk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XOzau4nzdwT0+TkVjJxjC504sbAvdDyFY0O7a3k9xhyjax92vJrw8Mx9FodzSxXoSHBY1j3+MHNEwaRicbzh0GonPVQSSIjrQzcLHrklTmoylg/xqypb+IVbjme2HIedaXf4H/F7QUJA08HIeSAOXSDI/b3WsuXQU35bNjiqGkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dnPfpqhq; 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="dnPfpqhq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08856C433C7; Mon, 4 Mar 2024 18:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709576085; bh=jEn480WJwg/UPuPyCwRXqP87MLEo5/+vBLxEZKlHTzk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dnPfpqhqIW1eVw2dIieLWhXkJm4re/dsSGD4ZGD/BsF9+/prtWW+nswEX+y+wwW2h EfLFVwjbt+fwDSPAWNVZl/VzqBVojA0P7yBuFdxDx0PTlMFGjGtMZozgn78+25KIus hVBi025tR6mWqhUYHphK0bsG35D46b/Kux+E2bfo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47087: tee: optee: Fix incorrect page free bug Date: Mon, 4 Mar 2024 19:11:14 +0100 Message-ID: <2024030413-CVE-2021-47087-4132@gregkh> X-Mailer: git-send-email 2.44.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=2249; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jEn480WJwg/UPuPyCwRXqP87MLEo5/+vBLxEZKlHTzk=; b=owGbwMvMwCRo6H6F97bub03G02pJDKnP+A5uCWxYf6PD+/nrjqYLLm5uT05urfrAaXXCS9VBb MvZevOHHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRGbYM8xT52adN51/HmTbz 1oRd8R9ffeUwFGSYK7tgJbMxz+PwtxFKyby8BjpTC/mfAAA= 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: tee: optee: Fix incorrect page free bug Pointer to the allocated pages (struct page *page) has already progressed towards the end of allocation. It is incorrect to perform __free_pages(page, order) using this pointer as we would free any arbitrary pages. Fix this by stop modifying the page pointer. The Linux kernel CVE team has assigned CVE-2021-47087 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4.140 with commit 3c712f14d8a9 and fixed in 5.4.169 with commit 806142c805ca Issue introduced in 5.10.58 with commit 1340dc3fb75e and fixed in 5.10.89 with commit ad338d825e3f Issue introduced in 5.14 with commit ec185dd3ab25 and fixed in 5.15.12 with commit 91e94e42f6fc Issue introduced in 5.14 with commit ec185dd3ab25 and fixed in 5.16 with commit 18549bf4b21c Please see https://www.kernel.org or 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-2021-47087 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/tee/optee/core.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/806142c805cacd098e61bdc0f72c778a2389fe4a https://git.kernel.org/stable/c/ad338d825e3f7b96ee542bf313728af2d19fe9ad https://git.kernel.org/stable/c/91e94e42f6fc49635f1a16d8ae3f79552bcfda29 https://git.kernel.org/stable/c/18549bf4b21c739a9def39f27dcac53e27286ab5