Skip to content
Heist/ feed
Back to feed
UnratedFix available

crypto: ecdh - explicitly zeroize private_key

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: crypto: ecdh - explicitly zeroize private_key private_key is overwritten with the key parameter passed in by the caller (if present), or alternatively a newly generated private key. However, it is possible that the caller provides a key (or the newly generated key) which is shorter than the previous key. In that scenario, some key material from the previous key would not be overwritten. The easiest solution is to explicitly zeroize the entire private_key array first. Note that this patch slightly changes the behavior of this function: previously, if the ecc_gen_privkey failed, the old private_key would remain. Now, the private_key is always zeroized. This behavior is consistent with the case where params.key is set and ecc_is_key_valid fails.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.162, 6.1.97, 6.6.37, 6.9.8
CVEs
CVE-2024-42098
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:15 UTC · Revision 1

Source evidence

crypto: ecdh - explicitly zeroize private_key

core-osv · Original source

Published 29 Jul 2024, 17:39 UTC

In the Linux kernel, the following vulnerability has been resolved: crypto: ecdh - explicitly zeroize private_key private_key is overwritten with the key parameter passed in by the caller (if present), or alternatively a newly generated private key. However, it is possible that the caller provides a key (or the newly generated key) which is shorter than the previous key. In that scenario, some key material from the previous key would not be overwritten. The easiest solution is to explicitly zeroize the entire private_key array first. Note that this patch slightly changes the behavior of this function: previously, if the ecc_gen_privkey failed, the old private_key would remain. Now, the private_key is always zeroized. This behavior is consistent with the case where params.key is set and ecc_is_key_valid fails.

osv:CVE-2024-42098

Kernel

Fixed versions: 5.15.162, 6.1.97, 6.6.37, 6.9.8

Complete source record
{
  "id": "984a8130120ed4831cd841c36c0b57dd7f790ccda868dac2a1dcfa5756e9768e",
  "url": "https://osv.dev/vulnerability/CVE-2024-42098",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "crypto: ecdh - explicitly zeroize private_key",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: crypto: ecdh - explicitly zeroize private_key private_key is overwritten with the key parameter passed in by the caller (if present), or alternatively a newly generated private key. However, it is possible that the caller provides a key (or the newly generated key) which is shorter than the previous key. In that scenario, some key material from the previous key would not be overwritten. The easiest solution is to explicitly zeroize the entire private_key array first. Note that this patch slightly changes the behavior of this function: previously, if the ecc_gen_privkey failed, the old private_key would remain. Now, the private_key is always zeroized. This behavior is consistent with the case where params.key is set and ecc_is_key_valid fails.",
    "evidence": "osv:CVE-2024-42098",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.162",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.97",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.37",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.9.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-42098",
      "aliases": [
        "CVE-2024-42098"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3c4b23901a0c766879dff680cd6bdab47bcdbbd2"
                },
                {
                  "fixed": "39173b04abda87872b43c331468a4a14f8f05ce8"
                },
                {
                  "fixed": "fd7ef325911eba1b7191b83cb580463242f2090d"
                },
                {
                  "fixed": "80575b252ab0358b7e93895b2a510beb3cb3f975"
                },
                {
                  "fixed": "d96187eb8e59b572a8e6a68b6a9837a867ea29df"
                },
                {
                  "fixed": "73e5984e540a76a2ee1868b91590c922da8c24c9"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42098.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.8.0"
                },
                {
                  "fixed": "5.15.162"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.97"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.37"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.9.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42098.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.409934465Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/39173b04abda87872b43c331468a4a14f8f05ce8",
        "https://git.kernel.org/stable/c/73e5984e540a76a2ee1868b91590c922da8c24c9",
        "https://git.kernel.org/stable/c/80575b252ab0358b7e93895b2a510beb3cb3f975",
        "https://git.kernel.org/stable/c/d96187eb8e59b572a8e6a68b6a9837a867ea29df",
        "https://git.kernel.org/stable/c/fd7ef325911eba1b7191b83cb580463242f2090d",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42098.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-42098",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42098.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-42098",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 504579,
  "published_at": "2024-07-29T17:39:33.395+00:00"
}