CVE Database
/

CVE-2022-50838

Back to search

CVE-2022-50838

Published: Dec 30, 2025

Modified: May 23, 2026

PUBLISHED

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.

VendorProductVersions

Linux

Linux

affected
7737b104c211fa843de268b897d601e070292a72 - < c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d
affected
89be5c357de34718eaaaefed80737f432c5ab86f - < bab542cf56fc174c8447c00b73be99ffd66d2d39
affected
8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96 - < 6f00bd0402a1e3d2d556afba57c045bd7931e4d3
affected
b631c603b5fb98d2bd709c35d384901965a3dd51 - < 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf
affected
daf15fa1fd997749e881aedd9f03f73a11240e82 - < 9062493811676ee0efe6c74d98f00ca38c4e17d4

+14 more versions

Linux

Linux

affected
5.16
unaffected
0 - < 5.16
unaffected
4.9.337 - <= 4.9.*
unaffected
4.14.303 - <= 4.14.*
unaffected
4.19.270 - <= 4.19.*

+6 more versions

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now