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

exploitDog

redhat логотип

CVE-2024-50262

Опубликовано: 09 нояб. 2024
Источник: redhat
CVSS3: 6.7

Описание

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8.

A flaw was found in the Linux kernel's Berkeley Packet Filter (BPF) component. A privileged local attacker could exploit an out-of-bounds write vulnerability in the trie_get_next_key() function. This occurs because the function attempts to write more data than the allocated buffer size, leading to memory corruption. Successful exploitation could result in a denial of service or potentially arbitrary code execution.

Отчет

The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF by the kernel.unprivileged_bpf_disabled sysctl. This would require a privileged user with CAP_SYS_ADMIN or root to be able to abuse this flaw reducing its attack space. For the Red Hat Enterprise Linux 9 to confirm the current state, inspect the sysctl with the command: cat /proc/sys/kernel/unprivileged_bpf_disabled The setting of 1 would mean that unprivileged users can not use eBPF, mitigating the flaw.

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

To mitigate this flaw, ensure that unprivileged users are prevented from using eBPF by setting the kernel.unprivileged_bpf_disabled sysctl to 1. To confirm the current state, inspect the sysctl with the command: cat /proc/sys/kernel/unprivileged_bpf_disabled If the value is 0, set it to 1 to disable unprivileged eBPF use: echo 1 > /proc/sys/kernel/unprivileged_bpf_disabled To make this change persistent across reboots, add the following line to a file in /etc/sysctl.d/, for example, /etc/sysctl.d/99-disable-unprivileged-bpf.conf: kernel.unprivileged_bpf_disabled = 1 Then, apply the changes: sysctl --system This mitigation reduces the attack surface by requiring elevated privileges for exploitation.

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

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelWill not fix
Red Hat Enterprise Linux 8kernel-rtWill not fix
Red Hat Enterprise Linux 9kernel-rtAffected
Red Hat Enterprise Linux 9kernelFixedRHSA-2024:1148619.12.2024
Red Hat Enterprise Linux 9kernelFixedRHSA-2024:1148619.12.2024
Red Hat Enterprise Linux 9.4 Extended Update SupportkernelFixedRHSA-2024:1094211.12.2024

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

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

Статус:

Moderate
Дефект:
CWE-787
https://bugzilla.redhat.com/show_bug.cgi?id=2324892kernel: bpf: Fix out-of-bounds write in trie_get_next_key()

6.7 Medium

CVSS3

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

CVSS3: 7.8
ubuntu
почти 2 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8.

CVSS3: 7.8
nvd
почти 2 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8.

CVSS3: 7.8
msrc
почти 2 года назад

bpf: Fix out-of-bounds write in trie_get_next_key()

CVSS3: 7.8
debian
почти 2 года назад

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

CVSS3: 7.8
github
почти 2 года назад

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix out-of-bounds write in trie_get_next_key() trie_get_next_key() allocates a node stack with size trie->max_prefixlen, while it writes (trie->max_prefixlen + 1) nodes to the stack when it has full paths from the root to leaves. For example, consider a trie with max_prefixlen is 8, and the nodes with key 0x00/0, 0x00/1, 0x00/2, ... 0x00/8 inserted. Subsequent calls to trie_get_next_key with _key with .prefixlen = 8 make 9 nodes be written on the node stack with size 8.

6.7 Medium

CVSS3

Уязвимость CVE-2024-50262