CVE-2022-50838 - CVE House
Back to Database
Status published Unknown CVE-2022-50838

net: stream: purge sk_error_queue in sk_stream_kill_queues()

Vulnerability 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.

Impact Analysis

Refer to official advisory for detailed impact metrics.

Remediation

Ensure systems are updated to the latest vendor-supplied patch levels.

THREAT MONITOR

Am I Vulnerable?

Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2022-50838

Credits & Attribution

No credits recorded in the NVD database.

Affected Vendor

Affected Software

Linux
Vulnerable Versions:
7737b104c211fa843de268b897d601e070292a72, 89be5c357de34718eaaaefed80737f432c5ab86f, 8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96, b631c603b5fb98d2bd709c35d384901965a3dd51, daf15fa1fd997749e881aedd9f03f73a11240e82, 3988164fe9ddf98ebf5b5cdede91ac38c5f08a7e, 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, 6ba975e14f5ebb87143d737c493adf4031409a68, 4437f3ead9e85c35fe0e3adfb98c0b97eaa267eb, 4.9.291, 4.14.256, 4.19.218, 5.4.160, 5.10.80, 5.15.3, 4.4.293, 5.14.19, 5.16, 0, 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15.86, 6.0.16, 6.1.2, 6.2

Timeline

Official Publish: December 30th, 2025
Last Modified: May 23rd, 2026
Added to House: July 21st, 2026

CVSS Vectors

No vector data available

Weaknesses (CWE)

No CWE data available

MITRE ATT&CK TTPs

No associated TTPs found for this vulnerability.