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

- Severity: High 7.0 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.19%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-05-20T17:09:18.321Z
- Modified: 2026-10-15T22:18:23.410Z
- Weaknesses: CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

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

Herbert notes that DIV_ROUND_UP() may overflow unnecessarily if an ecdsa
implementation's ->key_size() 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 DIV_ROUND_UP_POW2() macro and
use it in lieu of DIV_ROUND_UP() for ->key_size() return values.

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

(As written by CVE List.)

## Affected

- Linux Linux: from 55779f26eab9af12474a447001bd17070f055712 before f02f0218be412cff1c844addf58e002071be298b; from c6ab5c915da460c0397960af3c308386c3f3247b before f2133b849ff273abddb6da622daddd8f6f6fa448; from c6ab5c915da460c0397960af3c308386c3f3247b before 921b8167f10708e38080f84e195cdc68a7a561f1; from c6ab5c915da460c0397960af3c308386c3f3247b before b16510a530d1e6ab9683f04f8fb34f2e0f538275; from 6.6.70 before 6.6.99; 6.10 (not affected: before 6.10; from 6.6.99 up to 6.6.*; from 6.12.39 up to 6.12.*; from 6.14.5 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 6.6.70 before 6.6.99; from 6.10 before 6.12.39; from 6.13 before 6.14.5

## Every score

- Linux: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/f02f0218be412cff1c844addf58e002071be298b> (patch)
- <https://git.kernel.org/stable/c/f2133b849ff273abddb6da622daddd8f6f6fa448> (patch)
- <https://git.kernel.org/stable/c/921b8167f10708e38080f84e195cdc68a7a561f1> (patch)
- <https://git.kernel.org/stable/c/b16510a530d1e6ab9683f04f8fb34f2e0f538275> (patch)

## Sources

- CVE List: [CVE-2025-37984](https://www.cve.org/CVERecord?id=CVE-2025-37984), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2025-37984](https://nvd.nist.gov/vuln/detail/CVE-2025-37984), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2025-37984 · Whole record: https://cve.day/CVE-2025-37984.json · Rebuilt by cve.day 2026-11-25T22:58:58.320Z
