CVE-2025-39917: bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt

Published Oct 1, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix out-of-bounds dynptr write in bpfcryptocrypt

Stanislav reported that in bpfcryptocrypt() the destination dynptr's size is not validated to be at least as large as the source dynptr's size before calling into the crypto backend with 'len = srclen'. This can result in an OOB write when the destination is smaller than the source.

Concretely, in mentioned function, psrc and pdst are both linear buffers fetched from each dynptr:

psrc = bpfdynptrdata(src, srclen); [...] pdst = bpfdynptrdatarw(dst, dstlen); [...] err = decrypt ? ctx->type->decrypt(ctx->tfm, psrc, pdst, srclen, piv) : ctx->type->encrypt(ctx->tfm, psrc, pdst, srclen, piv);

The crypto backend expects pdst to be large enough with a srclen length that can be written. Add an additional srclen > dstlen check and bail out if it's the case. Note that these kfuncs are accessible under root privileges only.

Affected Software

8 affected components
Linux Kernel
Linux Linux kernel>=6.10<6.12.48
Linux Linux kernel>=6.13<6.16.8
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
Linux Linux kernel=6.17-rc3
Linux Linux kernel=6.17-rc4
Linux Linux kernel=6.17-rc5

Event History

Oct 1, 2025
CVE Published
via MITRE·07:44 AM
Data Sourced
via MITRE·07:44 AM
Description
Data Sourced
via NVD·08:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-39917?

CVE-2025-39917 is considered a medium severity vulnerability due to potential exploitation risks associated with out-of-bounds writes.

2

How do I fix CVE-2025-39917?

To fix CVE-2025-39917, you should update to the latest version of the Linux kernel where the vulnerability has been patched.

3

What systems are affected by CVE-2025-39917?

CVE-2025-39917 affects the Linux Kernel across various versions that include the bpf_crypto_crypt function.

4

What type of vulnerability is CVE-2025-39917?

CVE-2025-39917 is an out-of-bounds write vulnerability in the Linux kernel BPF subsystem.

5

When was CVE-2025-39917 disclosed?

CVE-2025-39917 was publicly disclosed in 2025 as part of ongoing security improvements in the Linux kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203