# CVE-2022-50838: net: stream: purge sk\_error\_queue in sk\_stream\_kill\_queues()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.30% (percentile 15, 2026-11-28)
- **Published:** 2025-12-30T12:10:57.721Z
- **Modified:** 2026-06-17T05:24:16.417Z

## Who should check

- Anyone running Linux \>= 7737b104c211fa843de268b897d601e070292a72, \< c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d; \>= 89be5c357de34718eaaaefed80737f432c5ab86f, \< bab542cf56fc174c8447c00b73be99ffd66d2d39; \>= 8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96, \< 6f00bd0402a1e3d2d556afba57c045bd7931e4d3; \>= b631c603b5fb98d2bd709c35d384901965a3dd51, \< 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf; \>= daf15fa1fd997749e881aedd9f03f73a11240e82, \< 9062493811676ee0efe6c74d98f00ca38c4e17d4; \>= 3988164fe9ddf98ebf5b5cdede91ac38c5f08a7e, \< 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< 8c330c36b3970d0917f48827fa6c7a9c75aa4602; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< b458d349f8753f666233828ebd30df6f100cf7d5; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3; 6ba975e14f5ebb87143d737c493adf4031409a68; …
- Anyone running Linux 5.16

## 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 and fixed versions

- Linux: \>= 7737b104c211fa843de268b897d601e070292a72, \< c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d; \>= 89be5c357de34718eaaaefed80737f432c5ab86f, \< bab542cf56fc174c8447c00b73be99ffd66d2d39; \>= 8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96, \< 6f00bd0402a1e3d2d556afba57c045bd7931e4d3; \>= b631c603b5fb98d2bd709c35d384901965a3dd51, \< 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf; \>= daf15fa1fd997749e881aedd9f03f73a11240e82, \< 9062493811676ee0efe6c74d98f00ca38c4e17d4; \>= 3988164fe9ddf98ebf5b5cdede91ac38c5f08a7e, \< 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< 8c330c36b3970d0917f48827fa6c7a9c75aa4602; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< b458d349f8753f666233828ebd30df6f100cf7d5; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3; 6ba975e14f5ebb87143d737c493adf4031409a68; … (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50838. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50838.md
Affected: Linux >= 7737b104c211fa843de268b897d601e070292a72, < c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d; >= 89be5c357de34718eaaaefed80737f432c5ab86f, < bab542cf56fc174c8447c00b73be99ffd66d2d39; >= 8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96, < 6f00bd0402a1e3d2d556afba57c045bd7931e4d3; >= b631c603b5fb98d2bd709c3…
Fixed in: Linux 6f00bd0402a1e3d2d556afba57c045bd7931e4d3, Linux 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf, Linux 9062493811676ee0efe6c74d98f00ca38c4e17d4, Linux 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42, Linux 8c330c36b3970d0917f48827fa6c7a9c75aa4602

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50838 being exploited?

There is no confirmed exploitation: CVE-2022-50838 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2022-50838?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50838?

Linux \>= 7737b104c211fa843de268b897d601e070292a72, \< c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d; \>= 89be5c357de34718eaaaefed80737f432c5ab86f, \< bab542cf56fc174c8447c00b73be99ffd66d2d39; \>= 8b8b3d738e450d2c2ccdc75f0ab5a951746c2a96, \< 6f00bd0402a1e3d2d556afba57c045bd7931e4d3; \>= b631c603b5fb98d2bd709c35d384901965a3dd51, \< 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf; \>= daf15fa1fd997749e881aedd9f03f73a11240e82, \< 9062493811676ee0efe6c74d98f00ca38c4e17d4; \>= 3988164fe9ddf98ebf5b5cdede91ac38c5f08a7e, \< 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< 8c330c36b3970d0917f48827fa6c7a9c75aa4602; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< b458d349f8753f666233828ebd30df6f100cf7d5; \>= 24bcbe1cc69fa52dc4f7b5b2456678ed464724d8, \< e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3; 6ba975e14f5ebb87143d737c493adf4031409a68; …; Linux 5.16.

### Is there a fix for CVE-2022-50838?

Yes. Fixed in Linux 6f00bd0402a1e3d2d556afba57c045bd7931e4d3, Linux 4f1d37ff4226eb99d6b69e9f4518e279e1a851bf, Linux 9062493811676ee0efe6c74d98f00ca38c4e17d4, Linux 9da204cd67c4fe97e8aa465d10d5c2e7076f7f42, Linux 8c330c36b3970d0917f48827fa6c7a9c75aa4602. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50838?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/c8c1eec578a9ae2dc8f14a1846942a0b7bf29d1d>
- other: <https://git.kernel.org/stable/c/bab542cf56fc174c8447c00b73be99ffd66d2d39>
- other: <https://git.kernel.org/stable/c/6f00bd0402a1e3d2d556afba57c045bd7931e4d3>
- other: <https://git.kernel.org/stable/c/4f1d37ff4226eb99d6b69e9f4518e279e1a851bf>
- other: <https://git.kernel.org/stable/c/9062493811676ee0efe6c74d98f00ca38c4e17d4>
- other: <https://git.kernel.org/stable/c/9da204cd67c4fe97e8aa465d10d5c2e7076f7f42>
- other: <https://git.kernel.org/stable/c/8c330c36b3970d0917f48827fa6c7a9c75aa4602>
- other: <https://git.kernel.org/stable/c/b458d349f8753f666233828ebd30df6f100cf7d5>
- other: <https://git.kernel.org/stable/c/e0c8bccd40fc1c19e1d246c39bcf79e357e1ada3>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50838>

HTML: <https://flawdb.com/CVE-2022-50838> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50838>
