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 177B41EBFE6 for ; Wed, 26 Feb 2025 02:00:08 +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=1740535208; cv=none; b=Egx2k6JluGghejgjyIcn2YLHJLtQnITFtYGYvvn1k/xGTU/rksm86UNVU8xh46flxvSEj0L90dBJz0A4HOmDr5plrL2aW6Mdsei26GJL4u8XfRNQ41s+jc0voAGs5201Y7tlI0I42aURcok5MpkuS6YtNwfAQsbgDJvzZ8u8E4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535208; c=relaxed/simple; bh=InWwcy02chDlJn4bl00uIuUPytXYijgY0O86ljyrYA4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ERxha9HzKkznoeFFvPboV1GV21wPdcpl/hDsHyW9iTR2QVI0f33ms9itIt4lqS/W2cERjj7hDoLwLFPpTCuioVPic3Yiu4hptbt8jA1R/mJcodWFdexz/5MR++DOS0EfhvnHiE2swicS0Lrr7p5AQyjHYIuO5JkFF7OdXmrqdVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kFS7QKo7; 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="kFS7QKo7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2180C4CEDD; Wed, 26 Feb 2025 02:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535208; bh=InWwcy02chDlJn4bl00uIuUPytXYijgY0O86ljyrYA4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kFS7QKo7tubzq12gsdQeLcUDzuHwFdXI/ynTrp/Min5cKhnUigi/Zq8eQ2PprHlKN tGZ/TgrzjFdBa7VgkozlY7qsf8FZHOKt0Ku2OtS+qpbv7KAXJV4swejTNZ/Rh8Tkip Yihy+T5N1GmcmON1Z2KuC7aCjtwTPArD+NmFddYI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49258: crypto: ccree - Fix use after free in cc_cipher_exit() Date: Wed, 26 Feb 2025 02:57:43 +0100 Message-ID: <2025022628-CVE-2022-49258-0dd7@gregkh> X-Mailer: git-send-email 2.48.1 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=2679; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=InWwcy02chDlJn4bl00uIuUPytXYijgY0O86ljyrYA4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SkLO87xqDKiQ5UjZHOgxxeh9ujNbk+CX6DftyVkWy cz/OO93xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwETWzWOY73CZ987m9UJdEdWb 1yhO+Pn/1uclmQwLTtoosBVbNISwaK8rPJFXuW7uKq+pAA== 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: crypto: ccree - Fix use after free in cc_cipher_exit() kfree_sensitive(ctx_p->user.key) will free the ctx_p->user.key. But ctx_p->user.key is still used in the next line, which will lead to a use after free. We can call kfree_sensitive() after dev_dbg() to avoid the uaf. The Linux kernel CVE team has assigned CVE-2022-49258 to this issue. Affected and fixed versions =========================== Issue introduced in 4.17 with commit 63ee04c8b491ee148489347e7da9fbfd982ca2bb and fixed in 5.10.110 with commit c93017c8d5ebf55a4e453ac7c84cc84cf92ab570 Issue introduced in 4.17 with commit 63ee04c8b491ee148489347e7da9fbfd982ca2bb and fixed in 5.15.33 with commit 335bf1fc74f775a8255257aa3e33763f2257b676 Issue introduced in 4.17 with commit 63ee04c8b491ee148489347e7da9fbfd982ca2bb and fixed in 5.16.19 with commit 25c358efee5153dfd240d4e0d3169d5bebe9cacd Issue introduced in 4.17 with commit 63ee04c8b491ee148489347e7da9fbfd982ca2bb and fixed in 5.17.2 with commit cffb5382bd8d3cf21b874ab5b84bf7618932286b Issue introduced in 4.17 with commit 63ee04c8b491ee148489347e7da9fbfd982ca2bb and fixed in 5.18 with commit 3d950c34074ed74d2713c3856ba01264523289e6 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-49258 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/crypto/ccree/cc_cipher.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/c93017c8d5ebf55a4e453ac7c84cc84cf92ab570 https://git.kernel.org/stable/c/335bf1fc74f775a8255257aa3e33763f2257b676 https://git.kernel.org/stable/c/25c358efee5153dfd240d4e0d3169d5bebe9cacd https://git.kernel.org/stable/c/cffb5382bd8d3cf21b874ab5b84bf7618932286b https://git.kernel.org/stable/c/3d950c34074ed74d2713c3856ba01264523289e6