{
  "id": "CVE-2025-37947",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-37947",
  "published_at": "2025-05-20T16:01:43.788Z",
  "title": "ksmbd: prevent out-of-bounds stream writes by validating *pos",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 8.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/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": {
    "created_at": "2025-10-03T14:08:46Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 135.9,
    "repo": "doyensec/KSMBD-CVE-2025-37947",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: prevent out-of-bounds stream writes by validating *pos\n\nksmbd_vfs_stream_write() did not validate whether the write offset\n(*pos) was within the bounds of the existing stream data length (v_len).\nIf *pos was greater than or equal to v_len, this could lead to an\nout-of-bounds memory write.\n\nThis patch adds a check to ensure *pos is less than v_len before\nproceeding. If the condition fails, -EINVAL is returned.",
  "cwe": "CWE-787",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc4:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.15:rc5:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cisa-adp": 7.8,
    "cna": 8.8,
    "nvd": 7.8
  },
  "repos": [
    {
      "repo": "doyensec/KSMBD-CVE-2025-37947",
      "url": "https://github.com/doyensec/KSMBD-CVE-2025-37947",
      "created_at": "2025-10-03T14:08:46Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 20,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2017-02-13T15:51:50Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 0626e6641f6b467447c81dd7678a69c66f7746cf, \u003c 7f61da79df86fd140c7768e668ad846bfa7ec8e1",
          "\u003e= 0626e6641f6b467447c81dd7678a69c66f7746cf, \u003c 04c8a38c60346bb5a7c49b276de7233f703ce9cb",
          "\u003e= 0626e6641f6b467447c81dd7678a69c66f7746cf, \u003c d62ba16563a86aae052f96d270b3b6f78fca154c",
          "\u003e= 0626e6641f6b467447c81dd7678a69c66f7746cf, \u003c e6356499fd216ed6343ae0363f4c9303f02c5034",
          "\u003e= 0626e6641f6b467447c81dd7678a69c66f7746cf, \u003c 0ca6df4f40cf4c32487944aaf48319cb6c25accc"
        ],
        "fixed_in": [
          "7f61da79df86fd140c7768e668ad846bfa7ec8e1",
          "04c8a38c60346bb5a7c49b276de7233f703ce9cb",
          "d62ba16563a86aae052f96d270b3b6f78fca154c",
          "e6356499fd216ed6343ae0363f4c9303f02c5034",
          "0ca6df4f40cf4c32487944aaf48319cb6c25accc"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.15"
        ],
        "fixed_in": [
          "0",
          "6.1.139",
          "6.6.91",
          "6.12.29",
          "6.14.7",
          "6.15"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 7f61da79df86fd140c7768e668ad846bfa7ec8e1 or 04c8a38c60346bb5a7c49b276de7233f703ce9cb or d62ba16563a86aae052f96d270b3b6f78fca154c or e6356499fd216ed6343ae0363f4c9303f02c5034 or 0ca6df4f40cf4c32487944aaf48319cb6c25accc or later.",
      "Upgrade Linux to 0 or 6.1.139 or 6.6.91 or 6.12.29 or 6.14.7 or 6.15 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
