CVE-2022-50838 Details
Description
In the Linux kernel, the following vulnerability has been resolved: net: stream: purge sk_error_queue in sk_stream_kill_queues() Changheon Lee reported TCP socket leaks, with a nice repro. It seems we leak TCP sockets with the following sequence: 1) SOF_TIMESTAMPING_TX_ACK is enabled on the socket. Each ACK will cook an skb put in error queue, from __skb_tstamp_tx(). __skb_tstamp_tx() is using skb_clone(), unless SOF_TIMESTAMPING_OPT_TSONLY was also requested. 2) If the application is also using MSG_ZEROCOPY, then we put in the error queue cloned skbs that had a struct ubuf_info attached to them. Whenever an struct ubuf_info is allocated, sock_zerocopy_alloc() does a sock_hold(). As long as the cloned skbs are still in sk_error_queue, socket refcount is kept elevated. 3) Application closes the socket, while error queue is not empty. Since tcp_close() no longer purges the socket error queue, we might end up with a TCP socket with at least one skb in error queue keeping the socket alive forever. This bug can be (ab)used to consume all kernel memory and freeze the host. We need to purge the error queue, with proper synchronization against concurrent writers.
A vulnerability in the Linux kernel's handling of TCP sockets can lead to memory leaks and potential denial-of-service conditions. This issue arises when the 'SOF_TIMESTAMPING_TX_ACK' option is enabled on a socket, causing acknowledgment packets to be cloned and placed in the error queue. If the application uses 'MSG_ZEROCOPY', these cloned packets can keep the socket reference count elevated, preventing the socket from closing properly. When the socket is closed while the error queue still contains packets, the socket can remain alive indefinitely, consuming kernel memory and potentially freezing the host. This vulnerability affects several versions of the Linux kernel.
The vulnerability has been addressed by modifying the socket queue management to ensure that the error queue is properly purged before closing the socket. Users should upgrade to the latest version of the Linux kernel where this fix has been applied.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Dec 30, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/4f1d37ff4226eb99d6b69e9f4518e279e1a851bf | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/6f00bd0402a1e3d2d556afba57c045bd7931e4d3 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/8c330c36b3970d0917f48827fa6c7a9c75aa4602 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/9062493811676ee0efe6c74d98f00ca38c4e17d4 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/9da204cd67c4fe97e8aa465d10d5c2e7076f7f42 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/b458d349f8753f666233828ebd30df6f100cf7d5 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/bab542cf56fc174c8447c00b73be99ffd66d2d39 | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d | kernel.org | Source CodeVendor |
| https://git.kernel.org/stable/c/e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3 | kernel.org | Source CodeVendor |
Weakness Enumeration
No weakness enumeration is available for this CVE.
Affected Products
| Product | Versions |
|---|---|
| Linux kernel | All versions |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Dec 30, 2025 | New CVE Received | kernel.org |
Volerion