{"id":"CVE-2025-37984","revision":"6785435934ed435db0806d2817a4089a","records":[{"revision":"6785435934ed435db0806d2817a4089a","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-37984","aliases":[],"title":"crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()\n\nHerbert notes that DIV_ROUND_UP() may overflow unnecessarily if an ecdsa\nimplementation's ->key_size() callback returns an unusually large value.\nHerbert instead suggests (for a division by 8):\n\n  X / 8 + !!(X & 7)\n\nBased on this formula, introduce a generic DIV_ROUND_UP_POW2() macro and\nuse it in lieu of DIV_ROUND_UP() for ->key_size() return values.\n\nAdditionally, use the macro in ecc_digits_from_bytes(), whose \"nbytes\"\nparameter is a ->key_size() return value in some instances, or a\nuser-specified ASN.1 length in the case of ecdsa_get_signature_rs().","state":0,"publishedAt":"2025-05-20T17:09:18.321+00:00","modifiedAt":"2026-10-15T21:52:05.648+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"crypto/ecc.c\",\n                        \"crypto/ecdsa-p1363.c\",\n                        \"crypto/ecdsa-x962.c\",\n                        \"include/linux/math.h\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"55779f26eab9af12474a447001bd17070f055712\",\n                            \"lessThan\": \"f02f0218be412cff1c844addf58e002071be298b\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"c6ab5c915da460c0397960af3c308386c3f3247b\",\n                            \"lessThan\": \"f2133b849ff273abddb6da622daddd8f6f6fa448\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"c6ab5c915da460c0397960af3c308386c3f3247b\",\n                            \"lessThan\": \"921b8167f10708e38080f84e195cdc68a7a561f1\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"c6ab5c915da460c0397960af3c308386c3f3247b\",\n                            \"lessThan\": \"b16510a530d1e6ab9683f04f8fb34f2e0f538275\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"6.6.70\",\n                            \"lessThan\": \"6.6.99\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"crypto/ecc.c\",\n                        \"crypto/ecdsa-p1363.c\",\n                        \"crypto/ecdsa-x962.c\",\n                        \"include/linux/math.h\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"6.10\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"6.10\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.99\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.39\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.14.5\",\n                            \"lessThanOrEqual\": \"6.14.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.15\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"severity":"HIGH"}],"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"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-37984","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-37984","identifiers":["CVE-2025-37984"]},"retained":false,"historicalAffected":[]}],"coverage":[]}