CVE-2025-37984

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-37984
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-37984.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-37984
Downstream
Related
Published
2025-05-20T17:09:18.321Z
Modified
2025-11-28T02:34:57.716620Z
Summary
crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()
Details

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

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37984.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
55779f26eab9af12474a447001bd17070f055712
Fixed
f02f0218be412cff1c844addf58e002071be298b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
c6ab5c915da460c0397960af3c308386c3f3247b
Fixed
f2133b849ff273abddb6da622daddd8f6f6fa448
Fixed
921b8167f10708e38080f84e195cdc68a7a561f1
Fixed
b16510a530d1e6ab9683f04f8fb34f2e0f538275

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.6.99
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.39
Type
ECOSYSTEM
Events
Introduced
6.10.0
Fixed
6.14.5