CVE-2025-39917
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
01/10/2025
Last modified:
14/01/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt<br />
<br />
Stanislav reported that in bpf_crypto_crypt() the destination dynptr&#39;s<br />
size is not validated to be at least as large as the source dynptr&#39;s<br />
size before calling into the crypto backend with &#39;len = src_len&#39;. This<br />
can result in an OOB write when the destination is smaller than the<br />
source.<br />
<br />
Concretely, in mentioned function, psrc and pdst are both linear<br />
buffers fetched from each dynptr:<br />
<br />
psrc = __bpf_dynptr_data(src, src_len);<br />
[...]<br />
pdst = __bpf_dynptr_data_rw(dst, dst_len);<br />
[...]<br />
err = decrypt ?<br />
ctx->type->decrypt(ctx->tfm, psrc, pdst, src_len, piv) :<br />
ctx->type->encrypt(ctx->tfm, psrc, pdst, src_len, piv);<br />
<br />
The crypto backend expects pdst to be large enough with a src_len length<br />
that can be written. Add an additional src_len > dst_len check and bail<br />
out if it&#39;s the case. Note that these kfuncs are accessible under root<br />
privileges only.
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.10 (including) | 6.12.48 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.13 (including) | 6.16.8 (excluding) |
| 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:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



