CVE-2022-50838 json
net: stream: purge sk_error_queue in sk_stream_kill_queues()
published 2025-12-30 10 mo ago modified 2026-06-17 4 mo ago also EUVD-2022-55860
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 21%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.5, 4.9.337, 4.14.303, 4.19.270, 5.4.229, 5.10.163, 5.15, 5.15.86, 6.0.16, 6.1.2, 6.2
- linux Debian 14, Debian 13, Debian 12 6.1.4-1
debian advisories DEBIAN-CVE-2022-50838
- linux Ubuntu 18.04 LTS 4.15.0-208.220
- linux Ubuntu 20.04 LTS 5.4.0-144.161
- linux Ubuntu 22.04 LTS 5.15.0-69.76
- linux-aws Ubuntu 18.04 LTS 4.15.0-1153.166
- linux-aws Ubuntu 20.04 LTS 5.4.0-1097.105
- linux-aws Ubuntu 22.04 LTS 5.15.0-1033.37
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1101.110
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1031.38
ubuntu advisories UBUNTU-CVE-2022-50838
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS, SLE High Performance Computing 15 SP5-ESPOS 5.14.21-150500.55.133.1
- kernel-syms SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.133.1
- kernel-source SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.133.1
- kernel-default SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +3 more 5.14.21-150500.55.133.1
- kernel-obs-build SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE High Performance Computing 15 SP5-LTSS +1 more 5.14.21-150500.55.133.1
- kernel-default-base SLES for SAP 15 SP5, SLES 15 SP5-LTSS, SLE Micro 5.5 +2 more 5.14.21-150500.55.133.1.150500.6.65.1
- kernel-rt SLE Micro 5.5 5.14.21-150500.13.118.1
- kernel-source-rt SLE Micro 5.5 5.14.21-150500.13.118.1
suse advisories SUSE-SU-2026:0317-1SUSE-SU-2026:0263-1
- git.kernel.org/stable/c/c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d commit
- git.kernel.org/stable/c/bab542cf56fc174c8447c00b73be99ffd66d2d39 commit
- git.kernel.org/stable/c/6f00bd0402a1e3d2d556afba57c045bd7931e4d3 commit
- git.kernel.org/stable/c/4f1d37ff4226eb99d6b69e9f4518e279e1a851bf commit
- git.kernel.org/stable/c/9062493811676ee0efe6c74d98f00ca38c4e17d4 commit
- git.kernel.org/stable/c/9da204cd67c4fe97e8aa465d10d5c2e7076f7f42 commit
- git.kernel.org/stable/c/8c330c36b3970d0917f48827fa6c7a9c75aa4602 commit
- git.kernel.org/stable/c/b458d349f8753f666233828ebd30df6f100cf7d5 commit
- git.kernel.org/stable/c/e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-50838 updated cvss 6.2
kernel: net: stream: purge sk_error_queue in sk_stream_kill_queues()
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 moreaffected: no fix available “Fix deferred”
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.28% chance of exploitation in the next 30 days, higher than 21% of all scored CVEs (FIRST EPSS, 2026-11-08).
Affected products
- Linux Linux
Classification
- Technology feeds
References
- git.kernel.org /stable/c/c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d
- git.kernel.org /stable/c/bab542cf56fc174c8447c00b73be99ffd66d2d39
- git.kernel.org /stable/c/6f00bd0402a1e3d2d556afba57c045bd7931e4d3
- git.kernel.org /stable/c/4f1d37ff4226eb99d6b69e9f4518e279e1a851bf
- git.kernel.org /stable/c/9062493811676ee0efe6c74d98f00ca38c4e17d4
- git.kernel.org /stable/c/9da204cd67c4fe97e8aa465d10d5c2e7076f7f42
- git.kernel.org /stable/c/8c330c36b3970d0917f48827fa6c7a9c75aa4602
- git.kernel.org /stable/c/b458d349f8753f666233828ebd30df6f100cf7d5
- git.kernel.org /stable/c/e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3
Sources
- CVE List CVE-2022-50838
- NVD CVE-2022-50838
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.