CVE-2025-37984: crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()

Published May 20, 2025
·
Updated

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

crypto: ecdsa - Harden against integer overflows in DIVROUNDUP()

Herbert notes that DIVROUNDUP() may overflow unnecessarily if an ecdsa implementation's ->keysize() callback returns an unusually large value. Herbert instead suggests (for a division by 8):

X / 8 + !!(X & 7)

Based on this formula, introduce a generic DIVROUNDUPPOW2() macro and use it in lieu of DIVROUNDUP() for ->keysize() return values.

Additionally, use the macro in eccdigitsfrombytes(), whose "nbytes" parameter is a ->keysize() return value in some instances, or a user-specified ASN.1 length in the case of ecdsagetsignaturers().

Affected Software

5 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=6.6.70<6.6.99
Linux Linux kernel>=6.10<6.12.39
Linux Linux kernel>=6.13<6.14.5
debian/linux
6.1.176-16.1.190-16.12.107-16.12.113-17.2.12-17.2.13-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    Introduce a generic DIV_ROUND_UP_POW2() macro using X / 8 + !!(X & 7), and use it instead of DIV_ROUND_UP() for ->key_size() return values and in ecc_digits_from_bytes(), including cases where nbytes is a ->key_size() return value or a user-specified ASN.1 length passed by ecdsa_get_signature_rs().

Event History

May 20, 2025
CVE Published
via MITRE·05:09 PM
Data Sourced
via MITRE·05:09 PM
DescriptionSeverity
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-37984?

CVE-2025-37984 is considered a medium severity vulnerability due to its potential for causing integer overflows in the Linux kernel.

2

How do I fix CVE-2025-37984?

To fix CVE-2025-37984, you should update your Linux kernel to the latest patched version that resolves this integer overflow issue.

3

Which versions of the Linux kernel are affected by CVE-2025-37984?

CVE-2025-37984 affects various versions of the Linux kernel that have the vulnerable ecdsa implementation.

4

What systems are at risk due to CVE-2025-37984?

Any systems running an affected version of the Linux kernel with the ecdsa implementation may be at risk from CVE-2025-37984.

5

Is there a workaround for CVE-2025-37984?

There is no widely recognized workaround for CVE-2025-37984; the best course of action is to apply the necessary kernel updates.

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