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

exploitDog

redhat логотип

CVE-2024-35910

Опубликовано: 19 мая 2024
Источник: redhat
CVSS3: 5.8
EPSS Низкий

Описание

In the Linux kernel, the following vulnerability has been resolved: tcp: properly terminate timers for kernel sockets We had various syzbot reports about tcp timers firing after the corresponding netns has been dismantled. Fortunately Josef Bacik could trigger the issue more often, and could test a patch I wrote two years ago. When TCP sockets are closed, we call inet_csk_clear_xmit_timers() to 'stop' the timers. inet_csk_clear_xmit_timers() can be called from any context, including when socket lock is held. This is the reason it uses sk_stop_timer(), aka del_timer(). This means that ongoing timers might finish much later. For user sockets, this is fine because each running timer holds a reference on the socket, and the user socket holds a reference on the netns. For kernel sockets, we risk that the netns is freed before timer can complete, because kernel sockets do not hold reference on the netns. This patch adds inet_csk_clear_xmit_timers_sync() function that using sk_stop_timer_sync() to make sure all timers are terminated before the kernel socket is released. Modules using kernel sockets close them in their netns exit() handler. Also add sock_not_owned_by_me() helper to get LOCKDEP support : inet_csk_clear_xmit_timers_sync() must not be called while socket lock is held. It is very possible we can revert in the future commit 3a58f13a881e ("net: rds: acquire refcount on TCP sockets") which attempted to solve the issue in rds only. (net/smc/af_smc.c and net/mptcp/subflow.c have similar code) We probably can remove the check_net() tests from tcp_out_of_resources() and __tcp_close() in the future.

A flaw was found in the Linux kernel's TCP subsystem. When kernel-managed TCP sockets are closed, active network timers may continue executing after the associated network namespace has been dismantled and freed. A local attacker can exploit this timing condition to trigger a use-after-free memory error, leading to a system crash and Denial of Service (DoS).

Отчет

A use-after-free flaw was found in the Linux kernel's TCP subsystem, rated by Red Hat as Moderate severity. When a kernel-managed TCP socket is closed, its network timers may continue running after the associated network namespace has been dismantled and freed. A local attacker able to trigger this timing condition could cause a use-after-free memory error, crashing the kernel and resulting in a denial of service. Red Hat Enterprise Linux 9 is not affected because the fix is already present in that release stream. In Red Hat Enterprise Linux 8, the kernel and kernel-rt packages in the 8.6, 8.8, and 8.10 update streams are affected, and fixes are being pursued through the responsible delegated update streams; the RHEL 6 and RHEL 7 Extended Lifecycle Support streams are out of support scope. Fedora and Hosted OpenShift (ARO) offerings that ship the affected kernel are also in scope. Red Hat rates this flaw Moderate (CVSS 3.1 score 5.8) rather than the upstream CVE.org rating of Important (7.8) because exploitation requires winning a timing race with high attack complexity, and Red Hat's analysis found it unlikely that the issue could be triggered remotely.

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

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 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected
Red Hat Enterprise Linux 8kernel-rtFixedRHSA-2024:510208.08.2024
Red Hat Enterprise Linux 8kernelFixedRHSA-2024:510108.08.2024
Red Hat Enterprise Linux 8.8 Extended Update SupportkernelFixedRHSA-2024:525513.08.2024

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

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

Статус:

Moderate
Дефект:
CWE-825
https://bugzilla.redhat.com/show_bug.cgi?id=2281641kernel: tcp: properly terminate timers for kernel sockets

EPSS

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

5.8 Medium

CVSS3

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

CVSS3: 5.8
ubuntu
больше 2 лет назад

In the Linux kernel, the following vulnerability has been resolved: tcp: properly terminate timers for kernel sockets We had various syzbot reports about tcp timers firing after the corresponding netns has been dismantled. Fortunately Josef Bacik could trigger the issue more often, and could test a patch I wrote two years ago. When TCP sockets are closed, we call inet_csk_clear_xmit_timers() to 'stop' the timers. inet_csk_clear_xmit_timers() can be called from any context, including when socket lock is held. This is the reason it uses sk_stop_timer(), aka del_timer(). This means that ongoing timers might finish much later. For user sockets, this is fine because each running timer holds a reference on the socket, and the user socket holds a reference on the netns. For kernel sockets, we risk that the netns is freed before timer can complete, because kernel sockets do not hold reference on the netns. This patch adds inet_csk_clear_xmit_timers_sync() function that using sk_stop_timer_s...

CVSS3: 5.8
nvd
больше 2 лет назад

In the Linux kernel, the following vulnerability has been resolved: tcp: properly terminate timers for kernel sockets We had various syzbot reports about tcp timers firing after the corresponding netns has been dismantled. Fortunately Josef Bacik could trigger the issue more often, and could test a patch I wrote two years ago. When TCP sockets are closed, we call inet_csk_clear_xmit_timers() to 'stop' the timers. inet_csk_clear_xmit_timers() can be called from any context, including when socket lock is held. This is the reason it uses sk_stop_timer(), aka del_timer(). This means that ongoing timers might finish much later. For user sockets, this is fine because each running timer holds a reference on the socket, and the user socket holds a reference on the netns. For kernel sockets, we risk that the netns is freed before timer can complete, because kernel sockets do not hold reference on the netns. This patch adds inet_csk_clear_xmit_timers_sync() function that using sk_stop_ti

CVSS3: 5.8
debian
больше 2 лет назад

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

CVSS3: 5.8
github
больше 2 лет назад

In the Linux kernel, the following vulnerability has been resolved: tcp: properly terminate timers for kernel sockets We had various syzbot reports about tcp timers firing after the corresponding netns has been dismantled. Fortunately Josef Bacik could trigger the issue more often, and could test a patch I wrote two years ago. When TCP sockets are closed, we call inet_csk_clear_xmit_timers() to 'stop' the timers. inet_csk_clear_xmit_timers() can be called from any context, including when socket lock is held. This is the reason it uses sk_stop_timer(), aka del_timer(). This means that ongoing timers might finish much later. For user sockets, this is fine because each running timer holds a reference on the socket, and the user socket holds a reference on the netns. For kernel sockets, we risk that the netns is freed before timer can complete, because kernel sockets do not hold reference on the netns. This patch adds inet_csk_clear_xmit_timers_sync() function that using sk_stop...

CVSS3: 5.5
fstec
больше 2 лет назад

Уязвимость компонента tcp ядра операционной системы Linux, позволяющая нарушителю вызвать отказ в обслуживании

EPSS

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

5.8 Medium

CVSS3