{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-26582",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-26582"
  ],
  "published": "2024-02-21T15:00:00Z",
  "summary": "net: tls: fix use-after-free with partial reads and async decrypt",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet: tls: fix use-after-free with partial reads and async decrypt\n\ntls_decrypt_sg doesn't take a reference on the pages from clear_skb,\nso the put_page() in tls_decrypt_done releases them, and we trigger\na use-after-free in process_rx_list when we try to read from the\npartially-read skb.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.79",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-26582"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/20b4ed034872b4d024b26e2bc1092c3f80e5db96"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d684763534b969cca1022e2a28645c7cc91f7fa5"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/754c9bab77a1b895b97bd99d754403c505bc79df"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/32b55c5ff9103b8508c1e04bfa5a08c64e7a925f"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The bug is in the kTLS receive path (net/tls/tls_sw.c) processing data from a remote TLS peer over TCP; the triggering condition (a record larger than the receiver's buffer, forcing the non-zero-copy clear_skb path) is chosen by the remote peer. Per kernel scoring guidance, kTLS bugs triggered by remote peer data are Network.\nAC:L - There is no race to win \u2014 the async completion callback frees the pages before process_rx_list() reads them, deterministically. The required preconditions are the default on mainstream deployments (TLS 1.2 + generic-gcm-aesni, which the SIMD wrapper always registers with CRYPTO_ALG_ASYNC) and the remaining one, a partial read, is forced at will by the peer sending oversized records.\nPR:N - The attacker is the remote TLS peer, which holds no privileges or account on the target system \u2014 any client that completes an anonymous TLS handshake with a kTLS-offloading server (or any malicious server a kTLS client connects to) can drive the bug. No local credentials are involved anywhere on the path.\nUI:N - The only local behavior required is an application calling recvmsg() on its kTLS socket with a buffer smaller than the incoming record, which is ordinary, continuous operation of any TLS-consuming server or client. No victim performs any special action.\nS:U - The corruption is confined to kernel memory managed by the same security authority; there is no VM, IOMMU, or sandbox boundary crossed. This is a standard in-kernel memory-safety issue.\nC:H - process_rx_list() copies the contents of already-freed pages directly into the userspace receive buffer, and the partial-read nature leaves the stale skb on rx_list so the leak repeats on later recvmsg() calls with a wide reallocation window. Attacker-driven spraying can place other sockets' plaintext, page-cache data, or slab contents into those pages, yielding a repeatable kernel memory disclosure primitive.\nI:H - Beyond the read, skb_release_data() issues a second put_page() on pages that have since been reallocated, dropping a live page's refcount to zero and freeing memory owned by an unrelated allocation. This cross-owner page use-after-free is a well-established route to arbitrary write and control-flow hijack via reuse as slab or page-table memory.\nA:H - The page refcount underflow triggers bad_page()/VM_BUG_ON_PAGE and corrupts the buddy allocator, and reading or reusing freed pages oopses immediately under KASAN or page poisoning. A remote peer can trigger this repeatedly, reliably panicking the machine."
    }
  }
}
