Memory Leak in tcp_bpf_sendmsg in Kernel

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1002241: bpf, sockmap: Fix memleak in tcp_bpf_sendmsg while sk msg is full. Affects Kernel versions >= 604326b41a6fb9b4a78b6179335decee0365cd8c, < 6d03722c34d9603df325f67c6d30dc1b7b3c6067. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Kernel is a crucial component of the Linux operating system that provides core functionalities and acts as an interface between hardware and software. It manages system resources, facilitates communication between processes, and handles various system operations. The tcp_bpf_sendmsg function is responsible for sending messages over TCP sockets using Berkeley Packet Filter (BPF) programs. BPF allows users to define custom packet filtering and manipulation logic. However, a memory leak vulnerability exists in tcp_bpf_sendmsg when the socket message (sk msg) is full.

Vulnerability Detail

The memory leak vulnerability in tcp_bpf_sendmsg occurs when the sk msg is full, leading to a continuous allocation of memory without proper deallocation. This can result in memory exhaustion, impacting system performance and stability. An attacker could potentially exploit this vulnerability to cause a denial-of-service (DoS) condition by repeatedly triggering the memory leak. The vulnerability was introduced in version v4.20 of the Linux Kernel and has been fixed in version v5.4.189.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can limit the impact of the vulnerability by monitoring the memory usage of the affected system and taking appropriate measures to prevent memory exhaustion. This can include implementing resource limits, optimizing memory usage in applications, or restarting affected services periodically to release accumulated memory.

Conclusion

In conclusion, the memory leak vulnerability in tcp_bpf_sendmsg can lead to memory exhaustion and potential denial-of-service (DoS) conditions. It is crucial to update the Linux Kernel to version v5.4.189 or later to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The vulnerability can lead to memory exhaustion, affecting system performance and stability. It can also be exploited by an attacker to cause a denial-of-service (DoS) condition.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it for any open-source vulnerabilities, including this one.

Yes, the vulnerability has been fixed in Linux Kernel version v5.4.189. It is recommended to update to this version or a later one to mitigate the risk.

No, this vulnerability does not have a remote exploitation vector. An attacker would need local access to the system to exploit the memory leak.

There are no known instances of this vulnerability being actively exploited in the wild. However, it is still important to apply the necessary patches and updates to ensure system security.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback