Skip to content
Heist/ feed
Back to feed
CriticalFix available

SUNRPC: pin upper rpc_clnt across the TLS connect_worker

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: SUNRPC: pin upper rpc_clnt across the TLS connect_worker The TLS connect path has a use-after-free: nothing pins the upper rpc_clnt across the delayed connect_worker. xs_connect() stores task->tk_client in sock_xprt::clnt as a raw pointer and queues the worker; for TLS-secured transports that worker is xs_tcp_tls_setup_socket(), which reads several fields out of the saved pointer (cl_timeout, cl_program, cl_prog, cl_vers, cl_cred, cl_stats) to construct the args for the inner handshake rpc_clnt. The xprt does not reference the rpc_clnt; the rpc_clnt references the xprt. xs_destroy() does cancel the connect_worker, but it runs only when the xprt's refcount drops to zero, which cannot happen until the rpc_clnt releases its cl_xprt reference in rpc_free_client_work(). When a TLS handshake fails fatally (for example, an mTLS mount whose client cert does not match the server), the connecting task is woken with -EACCES and exits, the mount caller invokes rpc_shutdown_client(), and the upper rpc_clnt is freed before the queued connect_worker fires. xs_tcp_tls_setup_socket() then dereferences the freed clnt, producing the refcount_t underflow Michael Nemanov reported. Take a reference on the upper rpc_clnt in xs_connect() for TLS transports via a new rpc_hold_client() helper, and drop it in the connect_worker's exit path with rpc_release_client(). The xprt_lock_connect() / xprt_unlock_connect() pairing already serial

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.97, 6.18.40, 6.6.145, 7.1.5
CVEs
CVE-2026-72317
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 18:11 UTC · Revision 1

Source evidence

SUNRPC: pin upper rpc_clnt across the TLS connect_worker

core-osv · Original source

Published 15 Aug 2026, 05:55 UTC

In the Linux kernel, the following vulnerability has been resolved: SUNRPC: pin upper rpc_clnt across the TLS connect_worker The TLS connect path has a use-after-free: nothing pins the upper rpc_clnt across the delayed connect_worker. xs_connect() stores task->tk_client in sock_xprt::clnt as a raw pointer and queues the worker; for TLS-secured transports that worker is xs_tcp_tls_setup_socket(), which reads several fields out of the saved pointer (cl_timeout, cl_program, cl_prog, cl_vers, cl_cred, cl_stats) to construct the args for the inner handshake rpc_clnt. The xprt does not reference the rpc_clnt; the rpc_clnt references the xprt. xs_destroy() does cancel the connect_worker, but it runs only when the xprt's refcount drops to zero, which cannot happen until the rpc_clnt releases its cl_xprt reference in rpc_free_client_work(). When a TLS handshake fails fatally (for example, an mTLS mount whose client cert does not match the server), the connecting task is woken with -EACCES and exits, the mount caller invokes rpc_shutdown_client(), and the upper rpc_clnt is freed before the queued connect_worker fires. xs_tcp_tls_setup_socket() then dereferences the freed clnt, producing the refcount_t underflow Michael Nemanov reported. Take a reference on the upper rpc_clnt in xs_connect() for TLS transports via a new rpc_hold_client() helper, and drop it in the connect_worker's exit path with rpc_release_client(). The xprt_lock_connect() / xprt_unlock_connect() pairing already serial

osv:CVE-2026-72317

Kernel

Fixed versions: 6.6.145, 6.12.97, 6.18.40, 7.1.5

Complete source record
{
  "id": "e9b5093b65c7570cbeb18a72bad1e32762d402a5005e427e0ed8ded3e7b7ab10",
  "url": "https://osv.dev/vulnerability/CVE-2026-72317",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "SUNRPC: pin upper rpc_clnt across the TLS connect_worker",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: SUNRPC: pin upper rpc_clnt across the TLS connect_worker The TLS connect path has a use-after-free: nothing pins the upper rpc_clnt across the delayed connect_worker. xs_connect() stores task->tk_client in sock_xprt::clnt as a raw pointer and queues the worker; for TLS-secured transports that worker is xs_tcp_tls_setup_socket(), which reads several fields out of the saved pointer (cl_timeout, cl_program, cl_prog, cl_vers, cl_cred, cl_stats) to construct the args for the inner handshake rpc_clnt. The xprt does not reference the rpc_clnt; the rpc_clnt references the xprt. xs_destroy() does cancel the connect_worker, but it runs only when the xprt's refcount drops to zero, which cannot happen until the rpc_clnt releases its cl_xprt reference in rpc_free_client_work(). When a TLS handshake fails fatally (for example, an mTLS mount whose client cert does not match the server), the connecting task is woken with -EACCES and exits, the mount caller invokes rpc_shutdown_client(), and the upper rpc_clnt is freed before the queued connect_worker fires. xs_tcp_tls_setup_socket() then dereferences the freed clnt, producing the refcount_t underflow Michael Nemanov reported. Take a reference on the upper rpc_clnt in xs_connect() for TLS transports via a new rpc_hold_client() helper, and drop it in the connect_worker's exit path with rpc_release_client(). The xprt_lock_connect() / xprt_unlock_connect() pairing already serial",
    "evidence": "osv:CVE-2026-72317",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.145",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.97",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.40",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.1.5",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-72317",
      "aliases": [
        "CVE-2026-72317"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "75eb6af7acdf566c68d61e98e67ee2f235201c02"
                },
                {
                  "fixed": "79cd550f8c884523b604fbfa43eb02def74d6224"
                },
                {
                  "fixed": "7a65b41b657b71d5a77861f47dd13eb4bc8e10d0"
                },
                {
                  "fixed": "5b0427ba582d143a364301f825f4e32272f06d2d"
                },
                {
                  "fixed": "d49f6d098ed48775b9d27a9f9c5c220fdf76f102"
                },
                {
                  "fixed": "46bc86c833956219bbfd246c1ffd832a479c5199"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72317.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.5.0"
                },
                {
                  "fixed": "6.6.145"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.97"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.40"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.1.5"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-72317.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.259143059Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/46bc86c833956219bbfd246c1ffd832a479c5199",
        "https://git.kernel.org/stable/c/5b0427ba582d143a364301f825f4e32272f06d2d",
        "https://git.kernel.org/stable/c/79cd550f8c884523b604fbfa43eb02def74d6224",
        "https://git.kernel.org/stable/c/7a65b41b657b71d5a77861f47dd13eb4bc8e10d0",
        "https://git.kernel.org/stable/c/d49f6d098ed48775b9d27a9f9c5c220fdf76f102",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72317.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-72317",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/72xxx/CVE-2026-72317.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-72317",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498290,
  "published_at": "2026-08-15T05:55:31.022+00:00"
}