{"id":"CVE-2025-37947","aliases":["CVE-2025-37947"],"related":[],"kind":"vulnerability","state":"published","title":"ksmbd: prevent out-of-bounds stream writes by validating *pos","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ksmbd: impide escrituras de flujo fuera de los límites mediante la validación de *pos. ksmbd_vfs_stream_write() no validaba si el desplazamiento de escritura (*pos) estaba dentro de los límites de la longitud de datos del flujo existente (v_len). Si *pos era mayor o igual que v_len, esto podía provocar una escritura en memoria fuera de los límites. Este parche añade una comprobación para garantizar que *pos sea menor que v_len antes de continuar. Si la condición falla, se devuelve -EINVAL.","source":"nvd"}],"published":"2025-05-20T16:01:43.788Z","modified":"2026-08-05T11:58:33.808Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"7f61da79df86fd140c7768e668ad846bfa7ec8e1","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"04c8a38c60346bb5a7c49b276de7233f703ce9cb","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"d62ba16563a86aae052f96d270b3b6f78fca154c","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"e6356499fd216ed6343ae0363f4c9303f02c5034","status":"affected"},{"type":"git","introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf","fixed":"0ca6df4f40cf4c32487944aaf48319cb6c25accc","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"6.1.139","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.91","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.29","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.14.7","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15","fixed":"6.1.139"},{"status":"affected","introduced":"6.2","fixed":"6.6.91"},{"status":"affected","introduced":"6.7","fixed":"6.12.29"},{"status":"affected","introduced":"6.13","fixed":"6.14.7"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7f61da79df86fd140c7768e668ad846bfa7ec8e1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/04c8a38c60346bb5a7c49b276de7233f703ce9cb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d62ba16563a86aae052f96d270b3b6f78fca154c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e6356499fd216ed6343ae0363f4c9303f02c5034","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0ca6df4f40cf4c32487944aaf48319cb6c25accc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/doyensec/KSMBD-CVE-2025-37947/blob/main/CVE-2025-37947.c","tags":["exploit","mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-10-10T03:55:20.529Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-37947","url":"https://www.cve.org/CVERecord?id=CVE-2025-37947","licence":"CVE Terms of Use","modified":"2026-08-05T11:58:33.808Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-37947","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37947","licence":"Public domain","modified":"2026-07-30T06:22:36.280Z"}],"updatedAt":"2026-11-25T22:58:58.301Z","epss":{"score":0.00804,"percentile":0.57881,"date":"2026-12-01T12:00:22.000Z"}}