1. Accueil
  2. Vulnérabilités
  3. CVE-2022-50838

CVE-2022-50838

net: stream: purge sk_error_queue in sk_stream_kill_queues()

Publiée le 30 déc. 2025 · modifiée le 17 juin 2026 · Sources : NVD, CNA (éditeur ou attributeur), EPSS (FIRST)

Faible 16/100

Résumé

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.

Aucune traduction française : description d’origine affichée.

Produits et versions affectés

Linux (9 ligne(s))
Linux
ProduitVersionsCorrigé dansSource
Linux de 4.9.291 (inclus) à 4.9.337 (exclu) — CNA (éditeur ou attributeur)
Linux de 4.14.256 (inclus) à 4.14.303 (exclu) — CNA (éditeur ou attributeur)
Linux de 4.19.218 (inclus) à 4.19.270 (exclu) — CNA (éditeur ou attributeur)
Linux de 5.4.160 (inclus) à 5.4.229 (exclu) — CNA (éditeur ou attributeur)
Linux de 5.10.80 (inclus) à 5.10.163 (exclu) — CNA (éditeur ou attributeur)
Linux de 5.15.3 (inclus) à 5.15.86 (exclu) — CNA (éditeur ou attributeur)
Linux de 4.4.293 (inclus) à 4.5 (exclu) — CNA (éditeur ou attributeur)
Linux de 5.14.19 (inclus) à 5.15 (exclu) — CNA (éditeur ou attributeur)
Linux 5.16 — CNA (éditeur ou attributeur)

Correctif

Non renseigné par l’éditeur.

Contournement

Aucun contournement renseigné.

Savoir si vous êtes touché

Aucune méthode de vérification renseignée.

Chronologie

  1. — Publication de la CVE (cve)

Références

Provenance des données

Statut
NVD
Date de publication
NVD
Description
CNA (éditeur ou attributeur)

Comment sont obtenues et calculées ces données