CVE & CISA-KEV Catalog

CVE-2022-50838

UNSCORED

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.

How to fix

Remediation Available
linuxDebian
Fixed in:5.10.178-1CVE-2022-50838
Fixed in:6.1.4-1CVE-2022-50838
Fixed in:6.1.4-1CVE-2022-50838
Fixed in:6.1.4-1CVE-2022-50838

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3.1 Vector

No CVSS vector data available.

Exploit Intelligence

0.24%probability of exploitation in 30 days
15thpercentile

Low risk: more likely to be exploited than 15% of all known CVEs.

References

Embed a live status badge for CVE-2022-50838
CVE-2022-50838 severity badge

Markdown

[![CVE-2022-50838](https://tridentstack.com/cve/badge/CVE-2022-50838.svg)](https://tridentstack.com/cve/CVE-2022-50838)

HTML

<a href="https://tridentstack.com/cve/CVE-2022-50838"><img src="https://tridentstack.com/cve/badge/CVE-2022-50838.svg" alt="CVE-2022-50838"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-12-31.