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 D96B8142648 for ; Tue, 21 May 2024 14:38:43 +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=1716302323; cv=none; b=hrb944A6pQdSKI1n+or1DeAcVSBpezpUfGcxCYC7N9B9dx6UCr1/I/7JuMwYu/0aMyLX6c/wXXh82KNwxwmBs3+w6t6PMZ404teycuQWA4K3fhuT6HWl756loEpqJ/QHFYwM3KY+BESskNYESdjBFc+eo1uiqxWt62AKfCPy/hY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716302323; c=relaxed/simple; bh=AiY42bmW5HDTDOloQBIu6r4qCQqxDCl0sdCNOuOoW0k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OcFvmJ3U41/b34R/GgEDLyjqUJPMyEWVfqI1tHRRz5V9AD2nKfB80fuCMf/kILtE/8XnUIt8V9Hub6Q6SdkFgV2tC7sNyO9fLQGsuIELn4s5F6VGn/xkn1HszURctgmM0SyCVaHN3gy06Dj4/73TvPLFoVnXnPuLEqXjZmkZ8v0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EEaQwwd5; 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="EEaQwwd5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62BC9C2BD11; Tue, 21 May 2024 14:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716302323; bh=AiY42bmW5HDTDOloQBIu6r4qCQqxDCl0sdCNOuOoW0k=; h=From:To:Cc:Subject:Date:Reply-to:From; b=EEaQwwd5QRSzcRBqrHTBz8K9N4gJ+nOaav4hkVEqIS1j86P1UDZANFasFmDBOAALJ YVAFjiBnv4wJDF5kWYRBwUW11PB5dk8mMZH7BF/1Q7UC6BOkXD3iyd7FaaHtUhEUpy Av0J4rsepAVUFptH6b9XVxf0Te7qcb2xsJgEcljA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47317: powerpc/bpf: Fix detecting BPF atomic instructions Date: Tue, 21 May 2024 16:35:51 +0200 Message-ID: <2024052130-CVE-2021-47317-3729@gregkh> X-Mailer: git-send-email 2.45.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=2486; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=AiY42bmW5HDTDOloQBIu6r4qCQqxDCl0sdCNOuOoW0k=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+G42qJzuVNG+8yhVpYsyX7XZe5duiVz+1/l6T/RB48 brhjqlWHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjAR4VcM8/OD88/1dKn1lznO zz8haf4iMTFhPsM867+6N7Ztn2JofPXKk9xYntc1TzU8AQ== 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: powerpc/bpf: Fix detecting BPF atomic instructions Commit 91c960b0056672 ("bpf: Rename BPF_XADD and prepare to encode other atomics in .imm") converted BPF_XADD to BPF_ATOMIC and added a way to distinguish instructions based on the immediate field. Existing JIT implementations were updated to check for the immediate field and to reject programs utilizing anything more than BPF_ADD (such as BPF_FETCH) in the immediate field. However, the check added to powerpc64 JIT did not look at the correct BPF instruction. Due to this, such programs would be accepted and incorrectly JIT'ed resulting in soft lockups, as seen with the atomic bounds test. Fix this by looking at the correct immediate value. The Linux kernel CVE team has assigned CVE-2021-47317 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 91c960b00566 and fixed in 5.12.19 with commit 7284dab07e4d Issue introduced in 5.12 with commit 91c960b00566 and fixed in 5.13.4 with commit 0d435b6d94b0 Issue introduced in 5.12 with commit 91c960b00566 and fixed in 5.14 with commit 419ac821766c 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-2021-47317 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: arch/powerpc/net/bpf_jit_comp64.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/7284dab07e4d51d453cc42851fae9ec4fac6ef2f https://git.kernel.org/stable/c/0d435b6d94b05dcfd836d758a63145aa566618e2 https://git.kernel.org/stable/c/419ac821766cbdb9fd85872bb3f1a589df05c94c