CVE-2022-50765 (GCVE-0-2022-50765)

Vulnerability from cvelistv5 – Published: 2025-12-24 13:05 – Updated: 2026-05-11 19:25
VLAI
Title
RISC-V: kexec: Fix memory leak of elf header buffer
Summary
In the Linux kernel, the following vulnerability has been resolved: RISC-V: kexec: Fix memory leak of elf header buffer This is reported by kmemleak detector: unreferenced object 0xff2000000403d000 (size 4096): comm "kexec", pid 146, jiffies 4294900633 (age 64.792s) hex dump (first 32 bytes): 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 .ELF............ 04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000566ca97c>] kmemleak_vmalloc+0x3c/0xbe [<00000000979283d8>] __vmalloc_node_range+0x3ac/0x560 [<00000000b4b3712a>] __vmalloc_node+0x56/0x62 [<00000000854f75e2>] vzalloc+0x2c/0x34 [<00000000e9a00db9>] crash_prepare_elf64_headers+0x80/0x30c [<0000000067e8bf48>] elf_kexec_load+0x3e8/0x4ec [<0000000036548e09>] kexec_image_load_default+0x40/0x4c [<0000000079fbe1b4>] sys_kexec_file_load+0x1c4/0x322 [<0000000040c62c03>] ret_from_syscall+0x0/0x2 In elf_kexec_load(), a buffer is allocated via vzalloc() to store elf headers. While it's not freed back to system when kdump kernel is reloaded or unloaded, or when image->elf_header is successfully set and then fails to load kdump kernel for some reason. Fix it by freeing the buffer in arch_kimage_file_post_load_cleanup().
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6652 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 8acea455fafaf2620b247de6c00774828b618a82 , < 090bfcfc9f14d05154893c67eeaecc56e894fbae (git)
Affected: 8acea455fafaf2620b247de6c00774828b618a82 , < cdea2da6787583ecca43594132533a2ac8d7cd21 (git)
Affected: 8acea455fafaf2620b247de6c00774828b618a82 , < cbc32023ddbdf4baa3d9dc513a2184a84080a5a2 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.19
Unaffected: 0 , < 5.19 (semver)
Unaffected: 6.0.18 , ≤ 6.0.* (semver)
Unaffected: 6.1.4 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/kernel/elf_kexec.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "090bfcfc9f14d05154893c67eeaecc56e894fbae",
              "status": "affected",
              "version": "8acea455fafaf2620b247de6c00774828b618a82",
              "versionType": "git"
            },
            {
              "lessThan": "cdea2da6787583ecca43594132533a2ac8d7cd21",
              "status": "affected",
              "version": "8acea455fafaf2620b247de6c00774828b618a82",
              "versionType": "git"
            },
            {
              "lessThan": "cbc32023ddbdf4baa3d9dc513a2184a84080a5a2",
              "status": "affected",
              "version": "8acea455fafaf2620b247de6c00774828b618a82",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/riscv/kernel/elf_kexec.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.19"
            },
            {
              "lessThan": "5.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.18",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.4",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "5.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: kexec: Fix memory leak of elf header buffer\n\nThis is reported by kmemleak detector:\n\nunreferenced object 0xff2000000403d000 (size 4096):\n  comm \"kexec\", pid 146, jiffies 4294900633 (age 64.792s)\n  hex dump (first 32 bytes):\n    7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00  .ELF............\n    04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00  ................\n  backtrace:\n    [\u003c00000000566ca97c\u003e] kmemleak_vmalloc+0x3c/0xbe\n    [\u003c00000000979283d8\u003e] __vmalloc_node_range+0x3ac/0x560\n    [\u003c00000000b4b3712a\u003e] __vmalloc_node+0x56/0x62\n    [\u003c00000000854f75e2\u003e] vzalloc+0x2c/0x34\n    [\u003c00000000e9a00db9\u003e] crash_prepare_elf64_headers+0x80/0x30c\n    [\u003c0000000067e8bf48\u003e] elf_kexec_load+0x3e8/0x4ec\n    [\u003c0000000036548e09\u003e] kexec_image_load_default+0x40/0x4c\n    [\u003c0000000079fbe1b4\u003e] sys_kexec_file_load+0x1c4/0x322\n    [\u003c0000000040c62c03\u003e] ret_from_syscall+0x0/0x2\n\nIn elf_kexec_load(), a buffer is allocated via vzalloc() to store elf\nheaders.  While it\u0027s not freed back to system when kdump kernel is\nreloaded or unloaded, or when image-\u003eelf_header is successfully set and\nthen fails to load kdump kernel for some reason. Fix it by freeing the\nbuffer in arch_kimage_file_post_load_cleanup()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T19:25:06.575Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/090bfcfc9f14d05154893c67eeaecc56e894fbae"
        },
        {
          "url": "https://git.kernel.org/stable/c/cdea2da6787583ecca43594132533a2ac8d7cd21"
        },
        {
          "url": "https://git.kernel.org/stable/c/cbc32023ddbdf4baa3d9dc513a2184a84080a5a2"
        }
      ],
      "title": "RISC-V: kexec: Fix memory leak of elf header buffer",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50765",
    "datePublished": "2025-12-24T13:05:56.123Z",
    "dateReserved": "2025-12-24T13:02:21.546Z",
    "dateUpdated": "2026-05-11T19:25:06.575Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50765",
      "date": "2026-11-17",
      "epss": "0.00235",
      "percentile": "0.146"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "arch/riscv/kernel/elf_kexec.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "090bfcfc9f14d05154893c67eeaecc56e894fbae",
                    "status": "affected",
                    "version": "8acea455fafaf2620b247de6c00774828b618a82",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "cdea2da6787583ecca43594132533a2ac8d7cd21",
                    "status": "affected",
                    "version": "8acea455fafaf2620b247de6c00774828b618a82",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "cbc32023ddbdf4baa3d9dc513a2184a84080a5a2",
                    "status": "affected",
                    "version": "8acea455fafaf2620b247de6c00774828b618a82",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "arch/riscv/kernel/elf_kexec.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "5.19"
                  },
                  {
                    "lessThan": "5.19",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.0.*",
                    "status": "unaffected",
                    "version": "6.0.18",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.4",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.2",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nRISC-V: kexec: Fix memory leak of elf header buffer\n\nThis is reported by kmemleak detector:\n\nunreferenced object 0xff2000000403d000 (size 4096):\n  comm \"kexec\", pid 146, jiffies 4294900633 (age 64.792s)\n  hex dump (first 32 bytes):\n    7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00  .ELF............\n    04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00  ................\n  backtrace:\n    [\u003c00000000566ca97c\u003e] kmemleak_vmalloc+0x3c/0xbe\n    [\u003c00000000979283d8\u003e] __vmalloc_node_range+0x3ac/0x560\n    [\u003c00000000b4b3712a\u003e] __vmalloc_node+0x56/0x62\n    [\u003c00000000854f75e2\u003e] vzalloc+0x2c/0x34\n    [\u003c00000000e9a00db9\u003e] crash_prepare_elf64_headers+0x80/0x30c\n    [\u003c0000000067e8bf48\u003e] elf_kexec_load+0x3e8/0x4ec\n    [\u003c0000000036548e09\u003e] kexec_image_load_default+0x40/0x4c\n    [\u003c0000000079fbe1b4\u003e] sys_kexec_file_load+0x1c4/0x322\n    [\u003c0000000040c62c03\u003e] ret_from_syscall+0x0/0x2\n\nIn elf_kexec_load(), a buffer is allocated via vzalloc() to store elf\nheaders.  While it\u0027s not freed back to system when kdump kernel is\nreloaded or unloaded, or when image-\u003eelf_header is successfully set and\nthen fails to load kdump kernel for some reason. Fix it by freeing the\nbuffer in arch_kimage_file_post_load_cleanup()."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nRISC-V: kexec: Correcci\u00f3n de fuga de memoria del b\u00fafer de cabecera elf\n\nEsto es reportado por el detector kmemleak:\n\nobjeto sin referencia 0xff2000000403d000 (tama\u00f1o 4096):\n  comm \u2019kexec\u2019, pid 146, jiffies 4294900633 (antig\u00fcedad 64.792s)\n  volcado hexadecimal (primeros 32 bytes):\n    7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00  .ELF............\n    04 00 f3 00 01 00 00 00 00 00 00 00 00 00 00 00  ................\n  rastreo de pila:\n    [[00000000566ca97c]] kmemleak_vmalloc+0x3c/0xbe\n    [[00000000979283d8]] __vmalloc_node_range+0x3ac/0x560\n    [[00000000b4b3712a]] __vmalloc_node+0x56/0x62\n    [[00000000854f75e2]] vzalloc+0x2c/0x34\n    [[00000000e9a00db9]] crash_prepare_elf64_headers+0x80/0x30c\n    [[0000000067e8bf48]] elf_kexec_load+0x3e8/0x4ec\n    [[0000000036548e09]] kexec_image_load_default+0x40/0x4c\n    [[0000000079fbe1b4]] sys_kexec_file_load+0x1c4/0x322\n    [[0000000040c62c03]] ret_from_syscall+0x0/0x2\n\nEn elf_kexec_load(), se asigna un b\u00fafer mediante vzalloc() para almacenar cabeceras elf. Mientras no se libera de nuevo al sistema cuando el kernel kdump es recargado o descargado, o cuando image  -\u003e  elf_header se establece con \u00e9xito y luego falla al cargar el kernel kdump por alguna raz\u00f3n. Corregirlo liberando el b\u00fafer en arch_kimage_file_post_load_cleanup()."
          }
        ],
        "id": "CVE-2022-50765",
        "lastModified": "2026-11-10T12:10:00.177",
        "metrics": {},
        "published": "2025-12-24T13:16:03.297",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/090bfcfc9f14d05154893c67eeaecc56e894fbae"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/cbc32023ddbdf4baa3d9dc513a2184a84080a5a2"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/cdea2da6787583ecca43594132533a2ac8d7cd21"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-11-07T10:34:36+00:00",
      "cve": "CVE-2022-50765",
      "id": "CVE-2022-50765",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "200",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: RISC-V: kexec: Fix memory leak of elf header buffer",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50765.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "low",
      "current_release_date": "2026-11-02T00:46:35Z",
      "cve": "CVE-2022-50765",
      "id": "CVE-2022-50765",
      "initial_release_date": "2025-12-25T01:03:51Z",
      "product_status:known_affected": "0",
      "product_status:known_not_affected": "557",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-50765",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2025/cve-2022-50765.json",
      "version": "13"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.