{"id":"CVE-2025-37947","summary":"ksmbd: prevent out-of-bounds stream writes by validating *pos","details":"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.","modified":"2026-04-16T04:43:15.192642847Z","published":"2025-05-20T16:01:43.788Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37947.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/04c8a38c60346bb5a7c49b276de7233f703ce9cb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0ca6df4f40cf4c32487944aaf48319cb6c25accc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7f61da79df86fd140c7768e668ad846bfa7ec8e1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d62ba16563a86aae052f96d270b3b6f78fca154c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e6356499fd216ed6343ae0363f4c9303f02c5034"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37947.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37947"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"EVIDENCE","url":"https://github.com/doyensec/KSMBD-CVE-2025-37947/blob/main/CVE-2025-37947.c"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf"},{"fixed":"7f61da79df86fd140c7768e668ad846bfa7ec8e1"},{"fixed":"04c8a38c60346bb5a7c49b276de7233f703ce9cb"},{"fixed":"d62ba16563a86aae052f96d270b3b6f78fca154c"},{"fixed":"e6356499fd216ed6343ae0363f4c9303f02c5034"},{"fixed":"0ca6df4f40cf4c32487944aaf48319cb6c25accc"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37947.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}