CVE-2022-50838

net: stream: purge sk_error_queue in sk_stream_kill_queues()

N/A
Published: December 30, 2025 at 12:10 PM UTC
Updated: June 17, 2026 at 05:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
N/A
Exploit prediction
EPSS 0.3%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≥ 4.4.293v ≥ 5.14.194.14.256 ≤ v < 4.14.3034.19.218 ≤ v < 4.19.2704.4.293 ≤ v < 4.54.9.291 ≤ v < 4.9.3375.10.80 ≤ v < 5.10.1635.14.19 ≤ v < 5.155.15.3 ≤ v < 5.15.865.16 ≤ v < 6.0.165.16 ≤ v < 6.1.25.16 ≤ v < 6.25.4.160 ≤ v < 5.4.22924bcbe1cc69fa52dc4f7b5b2456678ed464724d83988164fe9ddf98ebf5b5cdede91ac38c5f08a7e4.14.2564.19.2184.4.2934.9.2914437f3ead9e85c35fe0e3adfb98c0b97eaa267eb5.10.805.14.195.15.35.165.4.1606ba975e14f5ebb87143d737c493adf4031409a687737b104c211fa843de268b897d601e070292a7289be5c357de34718eaaaefed80737f432c5ab86f8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96b631c603b5fb98d2bd709c35d384901965a3dd51daf15fa1fd997749e881aedd9f03f73a11240e82
Vendor states this is fixed in 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf (fixed)
Vendor states this is fixed in 6f00bd0402a1e3d2d556afba57c045bd7931e4d3 (fixed)
Vendor states this is fixed in 8c330c36b3970d0917f48827fa6c7a9c75aa4602 (fixed)
Vendor states this is fixed in 9062493811676ee0efe6c74d98f00ca38c4e17d4 (fixed)
Vendor states this is fixed in 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42 (fixed)
Vendor states this is fixed in b458d349f8753f666233828ebd30df6f100cf7d5 (fixed)
Vendor states this is fixed in bab542cf56fc174c8447c00b73be99ffd66d2d39 (fixed)
Vendor states this is fixed in c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d (fixed)
Vendor states this is fixed in e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3 (fixed)
Vendor states this is fixed in 4.14.303 (unaffected)
Vendor states this is fixed in 4.19.270 (unaffected)
Affected range stops below 4.5, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 4.9.337 (unaffected)
Vendor states this is fixed in 5.10.163 (unaffected)
Affected range stops below 5.15, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 5.15.86 (unaffected)
Vendor states this is fixed in 5.16 (unaffected)
Vendor states this is fixed in 5.4.229 (unaffected)
Vendor states this is fixed in 6.0.16 (unaffected)
Vendor states this is fixed in 6.1.2 (unaffected)
Vendor states this is fixed in 6.2 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

Quick Info

StatusDEFERRED

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card