{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-35869",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-35869"
  ],
  "published": "2024-05-19T08:35:32Z",
  "summary": "smb: client: guarantee refcounted children from parent session",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: guarantee refcounted children from parent session\n\nAvoid potential use-after-free bugs when walking DFS referrals,\nmounting and performing DFS failover by ensuring that all children\nfrom parent @tcon->ses are also refcounted.  They're all needed across\nthe entire DFS mount.  Get rid of @tcon->dfs_ses_list while we're at\nit, too.",
  "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.6.20-1+rpt1",
        "1:6.6.28-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-2712",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v6",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v7",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v7l",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.20+rpt-rpi-v8",
            "binary_version": "1:6.6.20-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-2712",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v6",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v7",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v7l",
            "binary_version": "1:6.6.28-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.28+rpt-rpi-v8",
            "binary_version": "1:6.6.28-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.20-1+rpt1": {
            "linux_commit": "6f16847710cc0502450788b9f12f0a14d3429668",
            "upstream_version": "6.6.20",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.29"
          },
          "1:6.6.28-1+rpt1": {
            "linux_commit": "0c341f47adc3578cd5f817aa20ee2b7f9ae6b23e",
            "upstream_version": "6.6.28",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.29"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-35869"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/645f332c6b63499cc76197f9b6bffcc659ba64cc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e1db9ae87b7148c021daee1fcc4bc71b2ac58a79"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/062a7f0ff46eb57aff526897bd2bebfdb1d3046a"
    }
  ],
  "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 vulnerable refcounting is driven entirely by DFS referral responses from a remote SMB peer \u2014 the server chooses the nesting depth, target types, interlink/storage flags, and referral TTL that produce the unbalanced `dfs_root_ses` chain. A malicious/compromised SMB server, an SMB MITM, or an attacker controlling DNS for DFS target hostnames reaches this over the network.\nAC:L - This is a deterministic refcount imbalance, not a race: the server simply returns a referral topology three or more levels deep (limit is MAX_NESTED_LINKS=8) and can force the failover/reconnect path arbitrarily often by dropping TCP or setting a short TTL. Heap grooming for the subsequent UAF is routine and fully under attacker control.\nPR:N - The remote server holds no privileges on the victim host \u2014 CIFS authenticates the client to the server, not the reverse, so nothing gates the referral data on the way to the vulnerable code. The runtime `dfs_cache_refresh()` worker and DFS failover run in kernel context with no local account required at all; even the local automount path (`cifs_d_automount`) has no capability check.\nUI:N - Once a normal cifs DFS mount exists (fstab/autofs, standing configuration, not a per-exploit action), the server triggers the vulnerable failover and `dfs_cache_work` refresh paths on its own schedule with no victim participation. The automount path is likewise reached by ordinary directory traversal, not a deliberate security decision.\nS:U - The corrupted `struct cifs_ses` objects and the resulting control-flow hijack are confined to the kernel's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - Use-after-free of `struct cifs_ses`, which is dereferenced for `ses->server`, `ses->tcon_ipc`, `ses->Suid` and holds SMB credentials and signing/session keys; reclaiming the freed slab object yields an arbitrary-read primitive and leaks sensitive session material.\nI:H - The DFS failover path performs `server->ops->tree_connect(...)` \u2014 an indirect call through a function pointer read out of the freed session's `server` field \u2014 giving a direct control-flow hijack primitive once the object is reclaimed with attacker-groomed heap data.\nA:H - Dereferencing and spin-locking a freed `struct cifs_ses` from the reconnect path and the `dfs_cache_refresh` workqueue causes kernel oops/panic, and the double-put on the mount error path corrupts the session list. The server can trigger it repeatedly."
    }
  }
}
