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 CC0CF21A42B for ; Wed, 26 Feb 2025 02:24:32 +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=1740536672; cv=none; b=FtDQUxcqeS/03T9lHqnAcYUKQzZYA2RmsAFuKmkoUhALBP/E91MZdAbPRWnGVny4CbqHpsSrCW9/UhHzva4HY05R21DuX5O3J4CSbL0NCctEMbMR8NkeB3bMy51Li52HprXLXuXmDX8FTyrx+YGl+6zsHiDRL5CQZCKBnUgKuqc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536672; c=relaxed/simple; bh=kj6L3i3UMw/LDNTaKc78iBVhQRfzZ/TYjlKN/o8kKAU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EZvPwAjF7l64xwFDqMl4ju869mIvrpJxld49xtdTjBZR2ZAqy0bNQ2Ow/qPdmzI9wBQsW4SjNF8SQMgTfofbqp8Z5N1PUTTTYcZRTyWfine1piZrjyEZOZNBW+RU1R11Zd3jeITLzCYPMwP5XAy35SFKwekdt8s9T5SYrP+qt24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DSxXoVc3; 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="DSxXoVc3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C90BC4CEE6; Wed, 26 Feb 2025 02:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536672; bh=kj6L3i3UMw/LDNTaKc78iBVhQRfzZ/TYjlKN/o8kKAU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=DSxXoVc3plWQh3Nc98uKlkC75Muk/bKE7EGGRqE3MoJMLu9EFMLuNWeWpAr4VCStk kAqmZn5ti1gU2fSvMHAtJ48ZM0ikc5tJk79Rfyh6zXnAneTHayoGqgXu/OUSUfY06X tCqzgaNFS+RVKFR+b9zLL4dYPpi3jKVM7UNlx7+c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49627: ima: Fix potential memory leak in ima_init_crypto() Date: Wed, 26 Feb 2025 03:23:10 +0100 Message-ID: <2025022616-CVE-2022-49627-ec2b@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=2413; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=kj6L3i3UMw/LDNTaKc78iBVhQRfzZ/TYjlKN/o8kKAU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qm4oORc/Xf7PXvHQljLWuz83fOPLe+6yTY/32L0At 8+JN5hdO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiAVMY5ntXWvz4V9Zy12bV Tf+iiDMOR/fcWsUw381UoL5Bo0M9XH/DEqt/cuqVF4U6AA== 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: ima: Fix potential memory leak in ima_init_crypto() On failure to allocate the SHA1 tfm, IMA fails to initialize and exits without freeing the ima_algo_array. Add the missing kfree() for ima_algo_array to avoid the potential memory leak. The Linux kernel CVE team has assigned CVE-2022-49627 to this issue. Affected and fixed versions =========================== Issue introduced in 5.8 with commit 6d94809af6b0830c4dfcad661535a5939bcb8a7d and fixed in 5.10.132 with commit c1d9702ceb4a091da6bee380627596d1fba09274 Issue introduced in 5.8 with commit 6d94809af6b0830c4dfcad661535a5939bcb8a7d and fixed in 5.15.56 with commit 601ae26aa2802a4c10c94d7388a99eabdbefab2b Issue introduced in 5.8 with commit 6d94809af6b0830c4dfcad661535a5939bcb8a7d and fixed in 5.18.13 with commit 830de9667b3ada0a75a3f098dfc7159709fe397b Issue introduced in 5.8 with commit 6d94809af6b0830c4dfcad661535a5939bcb8a7d and fixed in 5.19 with commit 067d2521874135267e681c19d42761c601d503d6 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-49627 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: security/integrity/ima/ima_crypto.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/c1d9702ceb4a091da6bee380627596d1fba09274 https://git.kernel.org/stable/c/601ae26aa2802a4c10c94d7388a99eabdbefab2b https://git.kernel.org/stable/c/830de9667b3ada0a75a3f098dfc7159709fe397b https://git.kernel.org/stable/c/067d2521874135267e681c19d42761c601d503d6