CVE-2022-50286 (GCVE-0-2022-50286)
Vulnerability from cvelistv5
Published
2025-09-15 14:21
Modified
2026-08-05 08:58
Summary
In the Linux kernel, the following vulnerability has been resolved: ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline When converting files with inline data to extents, delayed allocations made on a file system created with both the bigalloc and inline options can result in invalid extent status cache content, incorrect reserved cluster counts, kernel memory leaks, and potential kernel panics. With bigalloc, the code that determines whether a block must be delayed allocated searches the extent tree to see if that block maps to a previously allocated cluster. If not, the block is delayed allocated, and otherwise, it isn't. However, if the inline option is also used, and if the file containing the block is marked as able to store data inline, there isn't a valid extent tree associated with the file. The current code in ext4_clu_mapped() calls ext4_find_extent() to search the non-existent tree for a previously allocated cluster anyway, which typically finds nothing, as desired. However, a side effect of the search can be to cache invalid content from the non-existent tree (garbage) in the extent status tree, including bogus entries in the pending reservation tree. To fix this, avoid searching the extent tree when allocating blocks for bigalloc + inline files that are being converted from inline to extent mapped.
Impacted products
Vendor Product Version
Linux Linux Version: d40e09f701cf7a44e595a558b067b2b4f67fbf87
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6
Version: 4.19.270   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/extents.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f83391339d8493b9ff24167516aaa5a5e88d8f81",
              "status": "affected",
              "version": "d40e09f701cf7a44e595a558b067b2b4f67fbf87",
              "versionType": "git"
            },
            {
              "lessThan": "6f4200ec76a0d31200c308ec5a71c68df5417004",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "9404839e0c9db5a517ea83c0ca3388b39d105fdf",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "d440d6427a5e3a877c1c259b8d2b216ddb65e185",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "c0c8edbc8abbe8f16d80a1d794d1ba2c12b6f193",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "81b915181c630ee1cffa052e52874fe4e1ba91ac",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "131294c35ed6f777bd4e79d42af13b5c41bf2775",
              "status": "affected",
              "version": "0b02f4c0d6d9e2c611dfbdd4317193e9dca740e6",
              "versionType": "git"
            },
            {
              "lessThan": "4.19.271",
              "status": "affected",
              "version": "4.19.270",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/extents.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.20"
            },
            {
              "lessThan": "4.20",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.271",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.87",
              "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": "4.19.271",
                  "versionStartIncluding": "4.19.270",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.87",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.18",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.4",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "4.20",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline\n\nWhen converting files with inline data to extents, delayed allocations\nmade on a file system created with both the bigalloc and inline options\ncan result in invalid extent status cache content, incorrect reserved\ncluster counts, kernel memory leaks, and potential kernel panics.\n\nWith bigalloc, the code that determines whether a block must be\ndelayed allocated searches the extent tree to see if that block maps\nto a previously allocated cluster.  If not, the block is delayed\nallocated, and otherwise, it isn\u0027t.  However, if the inline option is\nalso used, and if the file containing the block is marked as able to\nstore data inline, there isn\u0027t a valid extent tree associated with\nthe file.  The current code in ext4_clu_mapped() calls\next4_find_extent() to search the non-existent tree for a previously\nallocated cluster anyway, which typically finds nothing, as desired.\nHowever, a side effect of the search can be to cache invalid content\nfrom the non-existent tree (garbage) in the extent status tree,\nincluding bogus entries in the pending reservation tree.\n\nTo fix this, avoid searching the extent tree when allocating blocks\nfor bigalloc + inline files that are being converted from inline to\nextent mapped."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - Triggered via local write(2) on an ext4 filesystem with bigalloc+inline_data during delayed-allocation inline-to-extent conversion (ext4_da_write_begin \u2192 ext4_da_get_block_prep \u2192 ext4_clu_mapped). Not network-facing kernel code.\nAC:L - An unprivileged writer can reliably trigger the bug by creating a small inline file and writing past the inline size on a bigalloc+inline filesystem; no race or unpredictable conditions are required.\nPR:L - Only requires an unprivileged local account with write access to a file on the affected filesystem; no CAP_SYS_ADMIN or init-namespace root is needed.\nUI:N - The attacker triggers the vulnerability directly through their own write syscalls; no separate victim action is required.\nS:U - Impact is confined to the local kernel/host authority (DoS, kernel memory corruption, possible privilege impact on the same system); there is no VM/IOMMU/sandbox boundary crossing.\nC:H - ext4_clu_mapped() calls ext4_find_extent() on i_data that still holds attacker-controlled inline file contents, which can poison the extent status cache and (as shown by related CVE-2023-53692 on the same path) cause use-after-free reads.\nI:H - Interpreting inline data as an extent tree yields bogus ES/pending-reservation state and UAF-class memory corruption on the same find_extent path, enabling heap corruption primitives consistent with integrity compromise and control-flow hijacking.\nA:H - The fix commit explicitly documents kernel memory leaks and potential kernel panics from invalid extent-status/pending-reservation state; UAF on this path also crashes the kernel."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:58:03.464Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f83391339d8493b9ff24167516aaa5a5e88d8f81"
        },
        {
          "url": "https://git.kernel.org/stable/c/6f4200ec76a0d31200c308ec5a71c68df5417004"
        },
        {
          "url": "https://git.kernel.org/stable/c/9404839e0c9db5a517ea83c0ca3388b39d105fdf"
        },
        {
          "url": "https://git.kernel.org/stable/c/d440d6427a5e3a877c1c259b8d2b216ddb65e185"
        },
        {
          "url": "https://git.kernel.org/stable/c/c0c8edbc8abbe8f16d80a1d794d1ba2c12b6f193"
        },
        {
          "url": "https://git.kernel.org/stable/c/81b915181c630ee1cffa052e52874fe4e1ba91ac"
        },
        {
          "url": "https://git.kernel.org/stable/c/131294c35ed6f777bd4e79d42af13b5c41bf2775"
        }
      ],
      "title": "ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50286",
    "datePublished": "2025-09-15T14:21:22.489Z",
    "dateReserved": "2025-09-15T13:58:00.977Z",
    "dateUpdated": "2026-08-05T08:58:03.464Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…