{"id":"CVE-2025-39917","published":"2025-10-01T07:44:39Z","modified":"2026-05-11T21:38:54Z","title":"bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"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->type->decrypt(ctx->tfm, psrc, pdst, src_len, piv) :\n        ctx->type->encrypt(ctx->tfm, 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 > dst_len check and bail\nout if it's the case. Note that these kfuncs are accessible under root\nprivileges only.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00235,"percentile":0.08736,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://git.kernel.org/stable/c/0126358df12d6f476f79251d9c398ac5c1b3062d","tags":[]},{"url":"https://git.kernel.org/stable/c/c4be24ef0510c146dca4671effb127e97631534b","tags":[]},{"url":"https://git.kernel.org/stable/c/f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14","tags":[]}],"priority":{"score":7.2,"factors":[{"name":"EPSS percentile","points":1.75},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, < 0126358df12d6f476f79251d9c398ac5c1b3062d",">= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, < c4be24ef0510c146dca4671effb127e97631534b",">= 3e1c6f35409f9e447bf37f64840f5b65576bfb78, < f9bb6ffa7f5ad0f8ee0f53fc4a10655872ee4a14"]},{"vendor":"Linux","product":"Linux","versions":["6.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-01-14T17:43:01.533146Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-32882","exploited":false,"provenance":"source"}}