CVE-2021-47317 powerpc/bpf: Fix detecting BPF atomic instructions
A flaw in the Linux kernel's powerpc64 BPF JIT compiler allows incorrect handling of atomic instructions, leading to system soft lockups.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-47317?
CVE-2021-47317 is a high-severity denial of service vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-667
Which versions are affected by CVE-2021-47317?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47317?
No fix has been published for CVE-2021-47317 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2021-47317 being exploited?
There is no known exploitation of CVE-2021-47317 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as GHSA-2p2c-qgqr-9ghc, UBUNTU-CVE-2021-47317.