{"id":"CVE-2025-37984","summary":"crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()","details":"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 -\u003ekey_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 -\u003ekey_size() return values.\n\nAdditionally, use the macro in ecc_digits_from_bytes(), whose \"nbytes\"\nparameter is a -\u003ekey_size() return value in some instances, or a\nuser-specified ASN.1 length in the case of ecdsa_get_signature_rs().","modified":"2026-04-02T12:47:42.216643Z","published":"2025-05-20T17:09:18.321Z","related":["SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37984.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/921b8167f10708e38080f84e195cdc68a7a561f1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b16510a530d1e6ab9683f04f8fb34f2e0f538275"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f02f0218be412cff1c844addf58e002071be298b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f2133b849ff273abddb6da622daddd8f6f6fa448"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37984.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-37984"},{"type":"PACKAGE","url":"https://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"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37984.json"}}],"schema_version":"1.7.5"}