{
  "id": "CVE-2025-39917",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39917",
  "published_at": "2025-10-01T07:44:39.423Z",
  "title": "bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt\n\nStanislav reported that in bpf_crypto_crypt() the destination dynptr's\nsize is not validated to be at least as large as the source dynptr's\nsize before calling into the crypto backend with 'len = src_len'. This\ncan result in an OOB write when the destination is smaller than the\nsource.\n\nConcretely, in mentioned function, psrc and pdst are both linear\nbuffers fetched from each dynptr:\n\n  psrc = __bpf_dynptr_data(src, src_len);\n  [...]\n  pdst = __bpf_dynptr_data_rw(dst, dst_len);\n  [...]\n  err = decrypt ?\n        ctx-\u003etype-\u003edecrypt(ctx-\u003etfm, psrc, pdst, src_len, piv) :\n        ctx-\u003etype-\u003eencrypt(ctx-\u003etfm, psrc, pdst, src_len, piv);\n\nThe crypto backend expects pdst to be large enough with a src_len length\nthat can be written. Add an additional src_len \u003e dst_len check and bail\nout if it's the case. Note that these kfuncs are accessible under root\nprivileges only.",
  "cwe": "CWE-787",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, \u003c 0126358df12d6f476f79251d9c398ac5c1b3062d",
          "\u003e= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, \u003c c4be24ef0510c146dca4671effb127e97631534b",
          "\u003e= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, \u003c f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14"
        ],
        "fixed_in": [
          "0126358df12d6f476f79251d9c398ac5c1b3062d",
          "c4be24ef0510c146dca4671effb127e97631534b",
          "f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.10"
        ],
        "fixed_in": [
          "0",
          "6.12.48",
          "6.16.8",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 0126358df12d6f476f79251d9c398ac5c1b3062d or c4be24ef0510c146dca4671effb127e97631534b or f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14 or later.",
      "Upgrade Linux to 0 or 6.12.48 or 6.16.8 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
