CVE-2022-50746 (GCVE-0-2022-50746)

Vulnerability from cvelistv5 – Published: 2025-12-24 13:05 – Updated: 2026-08-05 08:59
VLAI
Title
erofs: validate the extent length for uncompressed pclusters
Summary
In the Linux kernel, the following vulnerability has been resolved: erofs: validate the extent length for uncompressed pclusters syzkaller reported a KASAN use-after-free: https://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2 The referenced fuzzed image actually has two issues: - m_pa == 0 as a non-inlined pcluster; - The logical length is longer than its physical length. The first issue has already been addressed. This patch addresses the second issue by checking the extent length validity.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 02827e1796b33f1794966f5c3101f8da2dfa9c1d , < dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e (git)
Affected: 02827e1796b33f1794966f5c3101f8da2dfa9c1d , < 40c73b2ea9611b5388807be406f30f5e4e1162da (git)
Affected: 02827e1796b33f1794966f5c3101f8da2dfa9c1d , < c505feba4c0d76084e56ec498ce819f02a7043ae (git)
Create a notification for this product.
Linux Linux Affected: 4.19
Unaffected: 0 , < 4.19 (semver)
Unaffected: 6.0.16 , ≤ 6.0.* (semver)
Unaffected: 6.1.2 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/erofs/zmap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e",
              "status": "affected",
              "version": "02827e1796b33f1794966f5c3101f8da2dfa9c1d",
              "versionType": "git"
            },
            {
              "lessThan": "40c73b2ea9611b5388807be406f30f5e4e1162da",
              "status": "affected",
              "version": "02827e1796b33f1794966f5c3101f8da2dfa9c1d",
              "versionType": "git"
            },
            {
              "lessThan": "c505feba4c0d76084e56ec498ce819f02a7043ae",
              "status": "affected",
              "version": "02827e1796b33f1794966f5c3101f8da2dfa9c1d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/erofs/zmap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.19"
            },
            {
              "lessThan": "4.19",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "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.16",
                  "versionStartIncluding": "4.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "4.19",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "4.19",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: validate the extent length for uncompressed pclusters\n\nsyzkaller reported a KASAN use-after-free:\nhttps://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2\n\nThe referenced fuzzed image actually has two issues:\n - m_pa == 0 as a non-inlined pcluster;\n - The logical length is longer than its physical length.\n\nThe first issue has already been addressed.  This patch addresses\nthe second issue by checking the extent length validity."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.4,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The bug is reached only after a local EROFS mount and read/mmap/open (z_erofs_read_folio \u2192 z_erofs_do_map_blocks \u2192 z_erofs_transform_plain); erofs has FS_REQUIRES_DEV and no network-protocol entry into the decompressor.\nAC:L - A crafted image with a PLAIN pcluster whose logical extent length exceeds its physical length deterministically drives outpages \u003e inpages and the oversized memcpy on ordinary file open/read, with no race or attacker-uncontrollable condition.\nPR:N - The attacker only needs to supply the malicious image; mounting is performed by an automated consumer (container/composefs/APEX/OTA image runtime or removable-media automounter) and requires no account or capability on the target.\nUI:N - In those deployments the mount and subsequent open/read (including IMA measurement on open as in the syzbot crash) happen as part of image pull/run or media insertion, with no separate interactive victim step required.\nS:U - The OOB/UAF copy and resulting kernel memory corruption stay within the host kernel\u0027s security authority; no VM escape, IOMMU bypass, or other cross-boundary impact occurs.\nC:H - KASAN reports a use-after-free read of 4096 bytes where memcpy copies adjacent/freed kernel memory into the file\u0027s page cache, which userspace can then read\u2014an arbitrary kernel-memory disclosure.\nI:H - The same path is a UAF/OOB memory-corruption class bug (and can take the memmove path that writes past the source page), which per kernel guidance enables heap corruption and control-flow hijacking primitives.\nA:H - The demonstrated KASAN use-after-free/out-of-bounds access can oops or panic the kernel even when not fully exploited, which is Availability High under kernel CVSS guidance."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:59:35.903Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e"
        },
        {
          "url": "https://git.kernel.org/stable/c/40c73b2ea9611b5388807be406f30f5e4e1162da"
        },
        {
          "url": "https://git.kernel.org/stable/c/c505feba4c0d76084e56ec498ce819f02a7043ae"
        }
      ],
      "title": "erofs: validate the extent length for uncompressed pclusters",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50746",
    "datePublished": "2025-12-24T13:05:42.628Z",
    "dateReserved": "2025-12-24T13:02:21.543Z",
    "dateUpdated": "2026-08-05T08:59:35.903Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50746",
      "date": "2026-08-05",
      "epss": "0.00185",
      "percentile": "0.08268"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50746\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-24T13:16:01.313\",\"lastModified\":\"2026-06-17T05:24:06.460\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nerofs: validate the extent length for uncompressed pclusters\\n\\nsyzkaller reported a KASAN use-after-free:\\nhttps://syzkaller.appspot.com/bug?extid=2ae90e873e97f1faf6f2\\n\\nThe referenced fuzzed image actually has two issues:\\n - m_pa == 0 as a non-inlined pcluster;\\n - The logical length is longer than its physical length.\\n\\nThe first issue has already been addressed.  This patch addresses\\nthe second issue by checking the extent length validity.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/erofs/zmap.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"02827e1796b33f1794966f5c3101f8da2dfa9c1d\",\"lessThan\":\"dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"02827e1796b33f1794966f5c3101f8da2dfa9c1d\",\"lessThan\":\"40c73b2ea9611b5388807be406f30f5e4e1162da\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"02827e1796b33f1794966f5c3101f8da2dfa9c1d\",\"lessThan\":\"c505feba4c0d76084e56ec498ce819f02a7043ae\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/erofs/zmap.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4.19\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.19\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0.16\",\"lessThanOrEqual\":\"6.0.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.2\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.2\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/40c73b2ea9611b5388807be406f30f5e4e1162da\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c505feba4c0d76084e56ec498ce819f02a7043ae\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/dc8b6bd587b13b85aff6e9d36cdfcd3f955cac9e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-04T19:37:10+00:00",
      "cve": "CVE-2022-50746",
      "id": "CVE-2022-50746",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_affected": "108",
      "product_status:known_not_affected": "166",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: erofs: validate the extent length for uncompressed pclusters",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50746.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…