{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-38065",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-38065"
  ],
  "published": "2025-06-18T09:34:24Z",
  "summary": "orangefs: Do not truncate file size",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\norangefs: Do not truncate file size\n\n'len' is used to store the result of i_size_read(), so making 'len'\na size_t results in truncation to 4GiB on 32-bit systems.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/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.141",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-38065"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ceaf195ed285b77791e29016ee6344b3ded609b3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/341e3a5984cf5761f3dab16029d7e9fb1641d5ff"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5111227d7f1f57f6804666b3abf780a23f44fc1d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/15602508ad2f923e228b9521960b4addcd27d9c4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/121f0335d91e46369bf55b5da4167d82b099a166"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/cd918ec24168fe08c6aafc077dd3b6d88364c5cf"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/2323b806221e6268a4e17711bc72e2fc87c191a3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/062e8093592fb866b8e016641a8b27feb6ac509d"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The vulnerability is reached through ordinary write(2)/ftruncate(2)/fsync(2) syscalls against a file on a locally mounted OrangeFS filesystem, driven by the page-cache writeback path. No network protocol handler processes attacker data to reach the flaw.\nAC:L - On an affected system (32-bit kernel with an OrangeFS mount) every trigger condition is entirely attacker-controlled \u2014 the file size, the write offset, and the timing of writeback via fsync/msync or the synchronous launder_folio path in orangefs_write_begin \u2014 with no race to win and no dependence on memory layout.\nPR:L - Any unprivileged local user with write permission to a directory on the OrangeFS mount can create the oversized file and dirty a page at a high offset; OrangeFS scratch space is typically group- or world-writable. No capability check exists on the write/writeback path.\nUI:N - The OrangeFS mount is an existing part of the deployment, not something the attacker must convince a victim to establish; exploitation is entirely self-driven by the attacker's own file writes and fsync.\nS:U - The out-of-bounds read and write occur within kernel memory under the same security authority as the vulnerable component; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The multi-gigabyte bvec makes iterate_bvec() walk adjacent struct pages past the single dirty page, copying arbitrary kernel and other-process memory into the OrangeFS shared bufmap, which is mmap'd by the userspace pvfs2-client-core process and transmitted to the OrangeFS server \u2014 a large-scale kernel memory disclosure.\nI:H - orangefs_bufmap_copy_from_iovec() loops with no bound on the descriptor index, reading to->page_array[i] far past the end of the kmalloc'd array and using the resulting wild struct page pointers as copy_page_from_iter() destinations, giving an out-of-bounds kernel write of attacker-controlled page-cache data.\nA:H - Dereferencing garbage struct page pointers and kmapping invalid PFNs across gigabytes of address space reliably produces a kernel oops or panic; the spurious WARN_ON()s also panic outright under panic_on_warn."
    }
  }
}
