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().
[
{
"deprecated": false,
"target": {
"file": "crypto/ecdsa-x962.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"270000581558671763067741277709568159676",
"169664242795572586907823218623278822223",
"126069523984375130036044033889597364407",
"116020069328902973655859025662142683289",
"94070439216394703545304698078276953146"
]
},
"id": "CVE-2025-37984-07732060",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@921b8167f10708e38080f84e195cdc68a7a561f1",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/linux/math.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185812302089738440058533766033728802953",
"107694091269300847339644677966162115956",
"13202679320205051698395579770095778479"
]
},
"id": "CVE-2025-37984-3359bbfa",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f02f0218be412cff1c844addf58e002071be298b",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecdsa-p1363.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"84616244910215774703135745582984899812",
"161494750085727599808172647597546942969",
"321714159738246509024660537551772837601",
"175602005505843108282600093497973120908"
]
},
"id": "CVE-2025-37984-5202e180",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b16510a530d1e6ab9683f04f8fb34f2e0f538275",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecdsa-p1363.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"84616244910215774703135745582984899812",
"161494750085727599808172647597546942969",
"321714159738246509024660537551772837601",
"175602005505843108282600093497973120908"
]
},
"id": "CVE-2025-37984-734fd5da",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@921b8167f10708e38080f84e195cdc68a7a561f1",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"95162356367249421050510726849864677666",
"159844448165053481520908036026567722529",
"250934674690415733349873319698278941561",
"268580398651744937458180587533171268015"
]
},
"id": "CVE-2025-37984-7812e7a8",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@921b8167f10708e38080f84e195cdc68a7a561f1",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/linux/math.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185812302089738440058533766033728802953",
"107694091269300847339644677966162115956",
"13202679320205051698395579770095778479"
]
},
"id": "CVE-2025-37984-8268b45b",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b16510a530d1e6ab9683f04f8fb34f2e0f538275",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecdsa-x962.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"270000581558671763067741277709568159676",
"169664242795572586907823218623278822223",
"126069523984375130036044033889597364407",
"116020069328902973655859025662142683289",
"94070439216394703545304698078276953146"
]
},
"id": "CVE-2025-37984-994b5f35",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b16510a530d1e6ab9683f04f8fb34f2e0f538275",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "include/linux/math.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"185812302089738440058533766033728802953",
"107694091269300847339644677966162115956",
"13202679320205051698395579770095778479"
]
},
"id": "CVE-2025-37984-a38aa80e",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@921b8167f10708e38080f84e195cdc68a7a561f1",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"95162356367249421050510726849864677666",
"159844448165053481520908036026567722529",
"250934674690415733349873319698278941561",
"268580398651744937458180587533171268015"
]
},
"id": "CVE-2025-37984-ab6b0fb3",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f02f0218be412cff1c844addf58e002071be298b",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "crypto/ecc.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"95162356367249421050510726849864677666",
"159844448165053481520908036026567722529",
"250934674690415733349873319698278941561",
"268580398651744937458180587533171268015"
]
},
"id": "CVE-2025-37984-cc0e55f2",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b16510a530d1e6ab9683f04f8fb34f2e0f538275",
"signature_version": "v1"
}
]