{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-46736",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-46736"
  ],
  "published": "2024-09-18T07:17:19Z",
  "summary": "smb: client: fix double put of @cfile in smb2_rename_path()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fix double put of @cfile in smb2_rename_path()\n\nIf smb2_set_path_attr() is called with a valid @cfile and returned\n-EINVAL, we need to call cifs_get_writable_path() again as the\nreference of @cfile was already dropped by previous smb2_compound_op()\ncall.",
  "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.47-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-2712",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v6",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v7",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v7l",
            "binary_version": "1:6.6.47-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.6.47+rpt-rpi-v8",
            "binary_version": "1:6.6.47-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.6.47-1+rpt1": {
            "linux_commit": "cf64a1dfecc2dc418efdd61701c1a4b185ab4761",
            "upstream_version": "6.6.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.6.51"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-46736"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b27ea9c96efd2c252a981fb00d0f001b86c90f3e"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1a46c7f6546b73cbf36f5a618a1a6bbb45391eb3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/3523a3df03c6f04f7ea9c2e7050102657e331a4f"
    }
  ],
  "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 retry path in smb2_rename_path() is entered only when compound_send_recv() maps the server's STATUS_INVALID_PARAMETER response to -EINVAL, so a malicious/compromised SMB server or a network MITM (the Linux cifs client does not mandate signing/encryption) fully controls whether the double put occurs. This is remote-peer data driving kernel memory management on the client.\nAC:L - The server simply answers a compounded CREATE+SET_INFO(rename) with STATUS_INVALID_PARAMETER \u2014 deterministic, no race to win, no memory-layout guessing, and leases are enabled by default. The same condition even arises reliably against benign servers for hardlinked files, which is precisely the case the introducing commit describes.\nPR:N - The attacker is the remote SMB endpoint and needs no account, credentials, or privileges on the victim client; the client initiates and authenticates the connection itself and then processes the poisoned status code during a routine rename of an open file.\nUI:N - No human action is required \u2014 renames of files held open on an SMB mount are ordinary automated activity (backup/sync daemons, log rotation, package and build tooling), so the attacker-controlled server merely waits for one and replies with STATUS_INVALID_PARAMETER.\nS:U - The corruption is confined to the client kernel's own heap and security authority; no VM, hypervisor, or IOMMU boundary is crossed.\nC:H - The premature free leaves file->private_data dangling and smb2_compound_op() kstrdup()s cfile->symlink_target out of freed memory into data returned to userspace, and a reclaimed cifsFileInfo yields a general arbitrary kernel-heap read primitive.\nI:H - The freed cifsFileInfo contains three list_heads whose later list_del gives an arbitrary write, plus four work_struct/delayed_work members with func pointers that can be queued after slab reclaim for control-flow hijack, making this a full write/code-execution primitive.\nA:H - The refcount underflow frees the handle while the fd remains open, so the next read/write or close on that fd hits freed memory, causing list corruption, a double free, and a kernel oops/panic."
    }
  }
}
