Bug 1225055 (CVE-2021-47317) - VUL-0: CVE-2021-47317: kernel: powerpc/bpf: fix detecting BPF atomic instructions
Summary: VUL-0: CVE-2021-47317: kernel: powerpc/bpf: fix detecting BPF atomic instruct...
Status: RESOLVED FIXED
Alias: CVE-2021-47317
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/406953/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-47317:4.7:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 17:12 UTC by SMASH SMASH
Modified: 2024-06-10 12:05 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-05-22 17:12:54 UTC
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.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-47317
https://www.cve.org/CVERecord?id=CVE-2021-47317
https://git.kernel.org/stable/c/0d435b6d94b05dcfd836d758a63145aa566618e2
https://git.kernel.org/stable/c/419ac821766cbdb9fd85872bb3f1a589df05c94c
https://git.kernel.org/stable/c/7284dab07e4d51d453cc42851fae9ec4fac6ef2f
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2021/CVE-2021-47317.mbox
Comment 2 Gabriele Sonnu 2024-06-10 12:05:34 UTC
All done, closing.