Linux Kernel BPF Sockmap Memory Leak Vulnerability in TCP BPF Send Message

Vulnerability

A memory leak vulnerability has been identified in the Linux kernel's BPF sockmap implementation, specifically within the 'tcp_bpf_sendmsg' function. This issue arises when the socket message is full, and 'sk_msg_alloc' returns an 'ENOMEM' error. In such cases, 'tcp_bpf_sendmsg' waits for memory to become available. However, if partial memory has already been allocated, a memory leak occurs. The vulnerability has been addressed by trimming the allocated memory before waiting for more, and similar logic has been applied to other functions like 'tls_sw_sendmsg' that experience the same issue.

Impact

Exploitation of this vulnerability leads to a memory leak, where allocated memory is not properly released, potentially causing increased memory usage and degradation of system performance over time.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
5.3
remediation
0.0
relevance
0.0
threat
3.2
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.