CVE Catalog

CVE-2022-48929

MediumCVSS 5.5
Published: Updated: Translated: NVD NIST

Summary

In the Linux kernel, a vulnerability was resolved in BPF: a crash due to out-of-bounds access into reg2btf_ids was fixed. Commit e6ac2450d6de added kfunc support and defined reg2btf_ids to translate verifier reg type to BTF ID. Commit c25b2ae13603 moved __BPF_REG_TYPE_MAX, causing direct usage of reg->type to index reg2btf_ids to potentially fall out of range, leading to out-of-bounds access and kernel crash.

Risk Assessment

A kernel crash may occur during BPF program execution, leading to denial of service or system destabilization. The vulnerability affects systems with BPF enabled.

Recommendation

Update the Linux kernel to a version containing the fix. Restrict unprivileged BPF loading if possible.

Other vulnerabilities in Linux kernel

See all
Original NVD description (English source)

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix crash due to out of bounds access into reg2btf_ids. When commit e6ac2450d6de ("bpf: Support bpf program calling kernel function") added kfunc support, it defined reg2btf_ids as a cheap way to translate the verifier reg type to the appropriate btf_vmlinux BTF ID, however commit c25b2ae13603 ("bpf: Replace PTR_TO_XXX_OR_NULL with PTR_TO_XXX | PTR_MAYBE_NULL") moved the __BPF_REG_TYPE_MAX from the last member of bpf_reg_type enum to after the base register types, and defined other variants using type flag composition. However, now, the direct usage of reg->type to index into reg2btf_ids may no longer fall into __BPF_REG_TYPE_MAX range, and hence lead to out of bounds access and kernel crash on dereference of bad pointer.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS