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 9A38F2951A7 for ; Wed, 18 Jun 2025 11:15:41 +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=1750245341; cv=none; b=SyFfLg3KiYmcoqL/lNSReKjSQuxF2n84xnqiq1/ZRsuzBpohZ+ag1MEirIjzr8Sg+Owh1lj4YNediNBVAPREzdALNJM+2oTveMndSi/TgD403UhwbtfKnF77H/E+QFYwkBdYEupLXA3v5ce6oGahVc3eYMxLFviSEKo1quhlblQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750245341; c=relaxed/simple; bh=/mQeoYDEgV8CgOfNhYcFu4lw+CWUYUstcm/mkFUM6MM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=r7zVUcjI75iL5LhlbZiooB8PwAv0KWR4kemgOAMGzKpMBpo0QdquyNMTK/SxFSDU1YO7BsnyH6VuGCt0zkzIwpaS4ocUh5RW5n+cVzdndkBGG8c+mc66YbL+T61xKe8LPeDhcJNQC8RW3+iJ79GOG7xPQg2bTh1VdYOLOmwqXUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EUGLfTpg; 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="EUGLfTpg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00ABEC4CEED; Wed, 18 Jun 2025 11:15:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750245341; bh=/mQeoYDEgV8CgOfNhYcFu4lw+CWUYUstcm/mkFUM6MM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EUGLfTpgjTHO7WJw5b4xAABZJx6xqpJpWkOE3Sp1uhKBfljXtzcyk7tjWz9Caub8R iJZXqFQ1bXBOIHPo9UiTA4cHMM8bdcQlMJwfHHPq5GQnXtaR4FFp076CqJaFMW78w6 N7vO4GuCCO6zhbuZRrf2Jdy5KitJE9jP6jeWP63Y= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50201: selinux: fix memleak in security_read_state_kernel() Date: Wed, 18 Jun 2025 13:04:26 +0200 Message-ID: <2025061840-CVE-2022-50201-7b57@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=2124; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4pU5RSpDkj77djOvKVqOls6GI8XJgI3co76URyCQ+HE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc6akByYt8pDf8vhytU5IdZbJUdX3Vxrkpn1mK370R r4o8NT+jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI/l0MC44dd1hxUJ/Jz+CN Ykp8tHlZo8OsPQwLOoCW7r5+xjE6LNHirULdDYmz1acB 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: selinux: fix memleak in security_read_state_kernel() In this function, it directly returns the result of __security_read_policy without freeing the allocated memory in *data, cause memory leak issue, so free the memory if __security_read_policy failed. [PM: subject line tweak] The Linux kernel CVE team has assigned CVE-2022-50201 to this issue. Affected and fixed versions =========================== Fixed in 5.15.61 with commit c877c5217145bda8fd95f506bf42f8d981afa57d Fixed in 5.18.18 with commit f3cd7562c0a6774fc62d79654482014020e574f5 Fixed in 5.19.2 with commit 1fc1f72aad2070d34022d0823e4cf09706b53f25 Fixed in 6.0 with commit 73de1befcc53a7c68b0c5e76b9b5ac41c517760f 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-50201 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/selinux/ss/services.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/c877c5217145bda8fd95f506bf42f8d981afa57d https://git.kernel.org/stable/c/f3cd7562c0a6774fc62d79654482014020e574f5 https://git.kernel.org/stable/c/1fc1f72aad2070d34022d0823e4cf09706b53f25 https://git.kernel.org/stable/c/73de1befcc53a7c68b0c5e76b9b5ac41c517760f