Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2025-38502

Опубликовано: 16 авг. 2025
Источник: redhat
CVSS3: 4
EPSS Низкий

Описание

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix oob access in cgroup local storage Lonial reported that an out-of-bounds access in cgroup local storage can be crafted via tail calls. Given two programs each utilizing a cgroup local storage with a different value size, and one program doing a tail call into the other. The verifier will validate each of the indivial programs just fine. However, in the runtime context the bpf_cg_run_ctx holds an bpf_prog_array_item which contains the BPF program as well as any cgroup local storage flavor the program uses. Helpers such as bpf_get_local_storage() pick this up from the runtime context: ctx = container_of(current->bpf_ctx, struct bpf_cg_run_ctx, run_ctx); storage = ctx->prog_item->cgroup_storage[stype]; if (stype == BPF_CGROUP_STORAGE_SHARED) ptr = &READ_ONCE(storage->buf)->data[0]; else ptr = this_cpu_ptr(storage->percpu_buf); For the second program which was called from the originally attached one, this means bpf_get_local_storage() will pick up the former program's map, not its own. With mismatching sizes, this can result in an unintended out-of-bounds access. To fix this issue, we need to extend bpf_map_owner with an array of storage_cookie[] to match on i) the exact maps from the original program if the second program was using bpf_get_local_storage(), or ii) allow the tail call combination if the second program was not using any of the cgroup local storage maps.

Отчет

A low-impact out-of-bounds access flaw was found in the Linux kernel's BPF cgroup local storage handling, affecting the kernel and kernel-rt packages in Red Hat Enterprise Linux 8, 9, and 10 and the kernel in Red Hat In-Vehicle OS. When a cgroup-attached BPF program performs a tail call into another program that uses a cgroup local storage map with a different value size, the bpf_get_local_storage() helper retrieves the originally attached program's storage from the runtime context instead of the tail-called program's own map. Because the BPF verifier validates each program independently, this size mismatch is not detected, and the tail-called program can perform an unintended out-of-bounds access on kernel memory. A local attacker able to load and attach crafted BPF programs could use this flaw to trigger an out-of-bounds kernel memory access, resulting in a system crash or other unintended consequences. Red Hat Enterprise Linux 6 and 7 are not affected because the vulnerable code (shared cgroup local storage between programs on the same cgroup, introduced upstream in Linux 5.9) is not present in those releases. Fixes for the affected Red Hat Enterprise Linux and Red Hat In-Vehicle OS streams are currently deferred because the flaw is rated low impact and requires a local attacker who already has the ability to load and run BPF programs; the residual risk is limited to such an attacker triggering an out-of-bounds kernel memory access. Red Hat assessed this flaw as low severity, lower than the NIST (7.1) and CVE.org (7.8) ratings, because exploitation requires local access with the ability to load crafted BPF programs and the assessed direct impact is limited (RH CVSS 4.0, availability-only impact).

Меры по смягчению последствий

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Показывать по

Дополнительная информация

Статус:

Low
Дефект:
CWE-125
https://bugzilla.redhat.com/show_bug.cgi?id=2388911kernel: bpf: Fix oob access in cgroup local storage

EPSS

Процентиль: 8%
0.00187
Низкий

4 Medium

CVSS3

Связанные уязвимости

CVSS3: 7.1
ubuntu
около 1 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix oob access in cgroup local storage Lonial reported that an out-of-bounds access in cgroup local storage can be crafted via tail calls. Given two programs each utilizing a cgroup local storage with a different value size, and one program doing a tail call into the other. The verifier will validate each of the indivial programs just fine. However, in the runtime context the bpf_cg_run_ctx holds an bpf_prog_array_item which contains the BPF program as well as any cgroup local storage flavor the program uses. Helpers such as bpf_get_local_storage() pick this up from the runtime context: ctx = container_of(current->bpf_ctx, struct bpf_cg_run_ctx, run_ctx); storage = ctx->prog_item->cgroup_storage[stype]; if (stype == BPF_CGROUP_STORAGE_SHARED) ptr = &READ_ONCE(storage->buf)->data[0]; else ptr = this_cpu_ptr(storage->percpu_buf); For the second program which was called from the originally attached one, this means...

CVSS3: 7.1
nvd
около 1 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix oob access in cgroup local storage Lonial reported that an out-of-bounds access in cgroup local storage can be crafted via tail calls. Given two programs each utilizing a cgroup local storage with a different value size, and one program doing a tail call into the other. The verifier will validate each of the indivial programs just fine. However, in the runtime context the bpf_cg_run_ctx holds an bpf_prog_array_item which contains the BPF program as well as any cgroup local storage flavor the program uses. Helpers such as bpf_get_local_storage() pick this up from the runtime context: ctx = container_of(current->bpf_ctx, struct bpf_cg_run_ctx, run_ctx); storage = ctx->prog_item->cgroup_storage[stype]; if (stype == BPF_CGROUP_STORAGE_SHARED) ptr = &READ_ONCE(storage->buf)->data[0]; else ptr = this_cpu_ptr(storage->percpu_buf); For the second program which was called from the originally attach

CVSS3: 7.1
msrc
около 1 года назад

bpf: Fix oob access in cgroup local storage

CVSS3: 7.1
debian
около 1 года назад

In the Linux kernel, the following vulnerability has been resolved: b ...

CVSS3: 7.1
github
около 1 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix oob access in cgroup local storage Lonial reported that an out-of-bounds access in cgroup local storage can be crafted via tail calls. Given two programs each utilizing a cgroup local storage with a different value size, and one program doing a tail call into the other. The verifier will validate each of the indivial programs just fine. However, in the runtime context the bpf_cg_run_ctx holds an bpf_prog_array_item which contains the BPF program as well as any cgroup local storage flavor the program uses. Helpers such as bpf_get_local_storage() pick this up from the runtime context: ctx = container_of(current->bpf_ctx, struct bpf_cg_run_ctx, run_ctx); storage = ctx->prog_item->cgroup_storage[stype]; if (stype == BPF_CGROUP_STORAGE_SHARED) ptr = &READ_ONCE(storage->buf)->data[0]; else ptr = this_cpu_ptr(storage->percpu_buf); For the second program which was called from the originally att...

EPSS

Процентиль: 8%
0.00187
Низкий

4 Medium

CVSS3