Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-35840 Overview
CVE-2024-35840 is a medium-severity vulnerability in the Linux kernel's Multipath TCP (MPTCP) implementation. The flaw affects subflow_finish_connect(), which reads four fields (backup, join_id, thmac, and none) that may contain uninitialized data unless OPTION_MPTCP_MPJ_SYNACK has been set in mptcp_parse_option(). A local attacker with low privileges can trigger undefined behavior that leads to a kernel-side availability impact. The vulnerability has been resolved upstream through a series of stable kernel patches.
Critical Impact
Local attackers can trigger uninitialized memory use in the MPTCP subflow handshake path, resulting in a kernel denial of service on affected Linux systems.
Affected Products
- Linux Kernel (multiple stable branches containing the MPTCP subflow code)
- Distributions shipping affected kernel versions with MPTCP enabled
- Systems where MPTCP is used for multi-path transport connectivity
Discovery Timeline
- 2024-05-17 - CVE-2024-35840 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-35840
Vulnerability Analysis
Multipath TCP (MPTCP) allows a single TCP connection to use multiple network paths. During the subflow join handshake, the kernel parses MPTCP options from the SYN/ACK packet via mptcp_parse_option(). The parser populates fields including backup, join_id, thmac, and none only when OPTION_MPTCP_MPJ_SYNACK is successfully set.
The function subflow_finish_connect() consumed these fields without first verifying that OPTION_MPTCP_MPJ_SYNACK had been set. When the option is absent or malformed, the four fields contain uninitialized or stale data. Downstream logic that validates the handshake MAC or routes the subflow then operates on garbage values, producing undefined behavior inside the kernel network stack.
The NVD maps this issue to [CWE-noinfo], but the behavior pattern aligns with Uninitialized Memory Use. The impact is limited to availability, consistent with kernel-side corruption or logic faults rather than information disclosure.
Root Cause
The root cause is missing guard logic in subflow_finish_connect(). The function should check that OPTION_MPTCP_MPJ_SYNACK is present in the parsed options bitmap before reading the related struct members. Without that guard, the handshake continuation path reads fields that were never written by mptcp_parse_option().
Attack Vector
Exploitation requires local access and the ability to establish or influence MPTCP subflow connections. A low-privileged user who can send or receive crafted MPTCP SYN/ACK traffic can trigger the vulnerable code path. The vulnerability does not require user interaction and executes within kernel context, so successful triggering disrupts kernel networking and can crash the system.
The vulnerability manifests entirely in the MPTCP subflow handshake path. No synthetic exploitation code is published; refer to the upstream fix commits for the exact code change.
Detection Methods for CVE-2024-35840
Indicators of Compromise
- Unexpected kernel panics or WARN_ON messages referencing subflow_finish_connect or mptcp_parse_option in dmesg
- Abnormal volume of MPTCP subflow join failures or MAC validation errors in network subsystem logs
- Repeated local processes attempting to open MPTCP sockets (IPPROTO_MPTCP) followed by kernel instability
Detection Strategies
- Monitor kernel ring buffer and system logs for crash signatures tied to MPTCP code paths
- Inventory running kernel versions and compare against the fixed stable releases referenced in the upstream commits
- Audit which workloads enable MPTCP via sysctl net.mptcp.enabled and prioritize those hosts for patching
Monitoring Recommendations
- Centralize kernel crash telemetry and kdump artifacts for retrospective analysis
- Alert on sudden spikes in local MPTCP socket creation combined with kernel log anomalies
- Track package update status across the fleet to confirm all hosts receive the fixed kernel
How to Mitigate CVE-2024-35840
Immediate Actions Required
- Apply the vendor kernel update that includes the upstream MPTCP fix on all affected Linux hosts
- Where patching is delayed, disable MPTCP by setting net.mptcp.enabled=0 via sysctl on hosts that do not require it
- Restrict local access to systems running vulnerable kernels and review which users can open raw or MPTCP sockets
Patch Information
The fix is distributed across multiple stable kernel branches. Review and apply the relevant commits: Kernel Commit 413b91350732, Kernel Commit 51e4cb032d49, Kernel Commit 76e8de7273a2, Kernel Commit ad3e8f5c3d5c, and Kernel Commit be1d9d9d38da. The patch adds a check for OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect() before using the related option fields.
Workarounds
- Disable MPTCP system-wide via sysctl -w net.mptcp.enabled=0 and persist the setting in /etc/sysctl.d/
- Remove or restrict CAP_NET_RAW and limit socket creation for untrusted local users
- Enforce workload isolation so untrusted code cannot execute on hosts that must keep MPTCP enabled
# Configuration example
# Disable MPTCP as a temporary mitigation until the kernel is patched
sudo sysctl -w net.mptcp.enabled=0
echo 'net.mptcp.enabled=0' | sudo tee /etc/sysctl.d/99-disable-mptcp.conf
# Verify the setting
sysctl net.mptcp.enabled
# Confirm the running kernel version so you can validate it against the fixed release
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

