Skip to content
Heist/ feed
Back to feed
CriticalFix available

ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE The FSCTL_DUPLICATE_EXTENTS_TO_FILE arm of smb2_ioctl() overwrites the destination file's data via vfs_clone_file_range() with neither the share-level KSMBD_TREE_CONN_FLAG_WRITABLE check nor a per-handle fp->daccess check that the other write-bearing arms carry. A client can overwrite destination data on a read-only share, or from a handle opened with only FILE_WRITE_ATTRIBUTES (which still yields an FMODE_WRITE filp). FILE_WRITE_ATTRIBUTES-only destination handle overwrote the file's data via the clone. Add both checks, matching the FSCTL_SET_SPARSE permission fix; require FILE_WRITE_DATA since this writes data.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.178, 6.12.96, 6.18.39, 6.6.145, 7.1.4
CVEs
CVE-2026-64399
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 23:16 UTC · Revision 1

Source evidence

ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE

core-osv · Original source

Published 25 Jul 2026, 08:50 UTC

In the Linux kernel, the following vulnerability has been resolved: ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE The FSCTL_DUPLICATE_EXTENTS_TO_FILE arm of smb2_ioctl() overwrites the destination file's data via vfs_clone_file_range() with neither the share-level KSMBD_TREE_CONN_FLAG_WRITABLE check nor a per-handle fp->daccess check that the other write-bearing arms carry. A client can overwrite destination data on a read-only share, or from a handle opened with only FILE_WRITE_ATTRIBUTES (which still yields an FMODE_WRITE filp). FILE_WRITE_ATTRIBUTES-only destination handle overwrote the file's data via the clone. Add both checks, matching the FSCTL_SET_SPARSE permission fix; require FILE_WRITE_DATA since this writes data.

osv:CVE-2026-64399

Kernel

Fixed versions: 6.1.178, 6.6.145, 6.12.96, 6.18.39, 7.1.4

Complete source record
{
  "id": "9a664f0832e744b4b4b39396a6a370f3a184acecc6fd4b37668339d3168f5b1f",
  "url": "https://osv.dev/vulnerability/CVE-2026-64399",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ksmbd: add permission checks for FSCTL_DUPLICATE_EXTENTS_TO_FILE The FSCTL_DUPLICATE_EXTENTS_TO_FILE arm of smb2_ioctl() overwrites the destination file's data via vfs_clone_file_range() with neither the share-level KSMBD_TREE_CONN_FLAG_WRITABLE check nor a per-handle fp->daccess check that the other write-bearing arms carry. A client can overwrite destination data on a read-only share, or from a handle opened with only FILE_WRITE_ATTRIBUTES (which still yields an FMODE_WRITE filp). FILE_WRITE_ATTRIBUTES-only destination handle overwrote the file's data via the clone. Add both checks, matching the FSCTL_SET_SPARSE permission fix; require FILE_WRITE_DATA since this writes data.",
    "evidence": "osv:CVE-2026-64399",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.178",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.145",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.96",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.39",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.1.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-64399",
      "aliases": [
        "CVE-2026-64399"
      ],
      "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": "eb817368f50c1cbe1bd07044124aad7db6330e3a"
                },
                {
                  "fixed": "bf460ad5958d506492de4524a656439da3f99c51"
                },
                {
                  "fixed": "620d133d469295ee7c017ca6aafac335f65c4a5a"
                },
                {
                  "fixed": "9b9cf7e65cbeaae1b6636144bacee611cdd7a5d6"
                },
                {
                  "fixed": "baae7b39673ec21073a25e3d14f8feaada01d5df"
                },
                {
                  "fixed": "c917e4522d251071dde9871b9142d8ea1186ebfe"
                },
                {
                  "fixed": "388e4139db27a9e3612c9d356b826f5b1ff6a9e3"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64399.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.15.0"
                },
                {
                  "fixed": "6.1.178"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.145"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.96"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.39"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.1.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64399.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.570819690Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/388e4139db27a9e3612c9d356b826f5b1ff6a9e3",
        "https://git.kernel.org/stable/c/620d133d469295ee7c017ca6aafac335f65c4a5a",
        "https://git.kernel.org/stable/c/9b9cf7e65cbeaae1b6636144bacee611cdd7a5d6",
        "https://git.kernel.org/stable/c/baae7b39673ec21073a25e3d14f8feaada01d5df",
        "https://git.kernel.org/stable/c/bf460ad5958d506492de4524a656439da3f99c51",
        "https://git.kernel.org/stable/c/c917e4522d251071dde9871b9142d8ea1186ebfe",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64399.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-64399",
        "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/64xxx/CVE-2026-64399.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-64399",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490809,
  "published_at": "2026-07-25T08:50:42.925+00:00"
}