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 B70ED4F1E1 for ; Tue, 27 Feb 2024 18:47:51 +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=1709059671; cv=none; b=PZWtXnLuQMc6hQBfyA/No1R/WVdn9ygFc3GvJTWM04sFxpAg2WHM4gD+FKg4BpAikdzdJb1IWv4LUPfmiHnvAuQAgwrnBi0WNrVbBdvyIAb2XbTkgVfDok2NS8GkwTOxXSPCfWG4rOMT1ezIXpCYhCg+oPqoY6DZQONTNIkHWGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709059671; c=relaxed/simple; bh=nexYLitKdt7JHbDYGd0g9ofv3paMEc7orMVegNO10oQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p3oHica9bdicoVc0kLCjlqNXQfj6BbLC2r0dhsswrz9Dkq++MfZJ/dTYGNyNMLRdlnQDKnrxeQ76eq+tJnf4aptFFJD6WqxDwgUK6QmB/3wB/+RQhcNf4fZcPqpcpB/j1GsECvQIbKgCoeZvQxlCED7x2HEuRsIYfeiRa2XK2+w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JhpNsMSi; 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="JhpNsMSi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 378D3C433F1; Tue, 27 Feb 2024 18:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709059671; bh=nexYLitKdt7JHbDYGd0g9ofv3paMEc7orMVegNO10oQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=JhpNsMSiqXNTYBzNNQu/tzVCX75JXgbBZiAdGX8sDhYT6lxd4oVTWblB/C6+NSqvp 6RAaTsxIhFD0Zw+MDNKo4rpvtNW0BmAxgzvHpKRwnDvQeEDhTMOYZshwLzI4BEuMoR IWo2raJSDoZ51wo/uKl8RpjysVlEA041lFOwy3NY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-46971: perf/core: Fix unconditional security_locked_down() call Date: Tue, 27 Feb 2024 19:47:31 +0100 Message-ID: <2024022721-CVE-2021-46971-9534@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=2879; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nexYLitKdt7JHbDYGd0g9ofv3paMEc7orMVegNO10oQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn39Cw/hLu3laj3O/je4vdz/v6ixNKp6uNhg3VLlwRFH lRf58LSEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABM5dZ1hfuBcd05Ja7YFV7ep uay7tVvQ18n8P8OCQ3GvP2783zNF4LLl74mZXkkPTVPuAAA= 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: perf/core: Fix unconditional security_locked_down() call Currently, the lockdown state is queried unconditionally, even though its result is used only if the PERF_SAMPLE_REGS_INTR bit is set in attr.sample_type. While that doesn't matter in case of the Lockdown LSM, it causes trouble with the SELinux's lockdown hook implementation. SELinux implements the locked_down hook with a check whether the current task's type has the corresponding "lockdown" class permission ("integrity" or "confidentiality") allowed in the policy. This means that calling the hook when the access control decision would be ignored generates a bogus permission check and audit record. Fix this by checking sample_type first and only calling the hook when its result would be honored. The Linux kernel CVE team has assigned CVE-2021-46971 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit b0c8fdc7fdb7 and fixed in 5.4.117 with commit b246759284d6 Issue introduced in 5.4 with commit b0c8fdc7fdb7 and fixed in 5.10.35 with commit 4348d3b5027b Issue introduced in 5.4 with commit b0c8fdc7fdb7 and fixed in 5.11.19 with commit f5809ca4c311 Issue introduced in 5.4 with commit b0c8fdc7fdb7 and fixed in 5.12.2 with commit c7b0208ee370 Issue introduced in 5.4 with commit b0c8fdc7fdb7 and fixed in 5.13 with commit 08ef1af4de5f 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-46971 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: kernel/events/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/b246759284d6a2bc5b6f1009caeeb3abce2ec9ff https://git.kernel.org/stable/c/4348d3b5027bc3ff6336368b6c60605d4ef8e1ce https://git.kernel.org/stable/c/f5809ca4c311b71bfaba6d13f4e39eab0557895e https://git.kernel.org/stable/c/c7b0208ee370b89d20486fae71cd9abb759819c1 https://git.kernel.org/stable/c/08ef1af4de5fe7de9c6d69f1e22e51b66e385d9b