{"cve":"CVE-2022-50838","nvd":{"published":"2025-12-30T13:15:58.350","modified":"2026-06-17T05:24:16.417","status":"Deferred","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: stream: purge sk_error_queue in sk_stream_kill_queues()\n\nChangheon Lee reported TCP socket leaks, with a nice repro.\n\nIt seems we leak TCP sockets with the following sequence:\n\n1) SOF_TIMESTAMPING_TX_ACK is enabled on the socket.\n\n   Each ACK will cook an skb put in error queue, from __skb_tstamp_tx().\n   __skb_tstamp_tx() is using skb_clone(), unless\n   SOF_TIMESTAMPING_OPT_TSONLY was also requested.\n\n2) If the application is also using MSG_ZEROCOPY, then we put in the\n   error queue cloned skbs that had a struct ubuf_info attached to them.\n\n   Whenever an struct ubuf_info is allocated, sock_zerocopy_alloc()\n   does a sock_hold().\n\n   As long as the cloned skbs are still in sk_error_queue,\n   socket refcount is kept elevated.\n\n3) Application closes the socket, while error queue is not empty.\n\nSince tcp_close() no longer purges the socket error queue,\nwe might end up with a TCP socket with at least one skb in\nerror queue keeping the socket alive forever.\n\nThis bug can be (ab)used to consume all kernel memory\nand freeze the host.\n\nWe need to purge the error queue, with proper synchronization\nagainst concurrent writers.","cvss_v4":null,"cvss_v3":null,"cwes":[],"references":["https://git.kernel.org/stable/c/4f1d37ff4226eb99d6b69e9f4518e279e1a851bf","https://git.kernel.org/stable/c/6f00bd0402a1e3d2d556afba57c045bd7931e4d3","https://git.kernel.org/stable/c/8c330c36b3970d0917f48827fa6c7a9c75aa4602","https://git.kernel.org/stable/c/9062493811676ee0efe6c74d98f00ca38c4e17d4","https://git.kernel.org/stable/c/9da204cd67c4fe97e8aa465d10d5c2e7076f7f42"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:18:08.089039631+00:00"},"epss":{"cve":"CVE-2022-50838","score":0.00284,"percentile":0.20954,"date":"2026-10-31"},"kev":null,"osv":[],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}