Security mailing lists by PureSourceCode

CVE-2022-50838

not scored yet

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.

Published
30 Dec 2025
Last modified
17 Jun 2026
Assigned by
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Deferred
Sources
NVDJSON

References

History

  • 25 Nov 2026 20:59 UTC ยท NVD: first stored (published 30 Dec 2025)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.