CVE-2021-47317

powerpc/bpf: Fix detecting BPF atomic instructions

State
Published
Severity
7.8 High
Published
May 21, 2024
Updated
Aug 5, 2026
Reserved
May 21, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 91c960b0056672e74627776655c926388350fa30 to before 7284dab07e4d51d453cc42851fae9ec4fac6ef2fAffected
  • 91c960b0056672e74627776655c926388350fa30 to before 0d435b6d94b05dcfd836d758a63145aa566618e2Affected
  • 91c960b0056672e74627776655c926388350fa30 to before 419ac821766cbdb9fd85872bb3f1a589df05c94cAffected
LinuxLinux
  • 5.12Affected
  • before 5.12Not affected
  • 5.12.19 through 5.12.*Not affected
  • 5.13.4 through 5.13.*Not affected
  • 5.14 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.