VDB

CVE-2024-35910

CVE-2024-35910 PUBLISHED CVSS 7.8 HIGH

tcp: properly terminate timers for kernel sockets

Reported by linux · Published May 19, 2024

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.

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe
LinuxLinux4.2, 0, 4.19.312
linuxlinux_kernel4.2, 4.2, 4.2
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2kernel-tools0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-modules-extra0
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
LinuxLinux6.9, 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe
amazon:2kernel0
amazon:2023kernel-devel0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2kernel-livepatch-4.14.345-262.5610
amazon:2023kernel-tools0
amazon:2023bpftool0
amazon:2kernel-tools-devel0
amazon:2023kernel-libbpf-static0
amazon:2kernel-headers0
amazon:2kernel-devel0
amazon:2python-perf0

…and 10 more

Timeline

  • May 19, 2024 CVE Published
  • May 20, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (22 in total, the first dated here)
  • Dec 16, 2025 PoC Published
  • Jan 10, 2026 Security Advisory (487 in total, the first dated here)
  • Mar 3, 2026 CVE Updated
  • Mar 30, 2026 Distribution Patch (379 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-35910
vulnetix vdb fixes CVE-2024-35910

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-35910/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›