CVE-2022-49348 (GCVE-0-2022-49348)
Vulnerability from cvelistv5
Published
2025-02-26 02:11
Modified
2025-06-19 12:56
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: ext4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state The EXT4_FC_REPLAY bit in sbi->s_mount_state is used to indicate that we are in the middle of replay the fast commit journal. This was actually a mistake, since the sbi->s_mount_info is initialized from es->s_state. Arguably s_mount_state is misleadingly named, but the name is historical --- s_mount_state and s_state dates back to ext2. What should have been used is the ext4_{set,clear,test}_mount_flag() inline functions, which sets EXT4_MF_* bits in sbi->s_mount_flags. The problem with using EXT4_FC_REPLAY is that a maliciously corrupted superblock could result in EXT4_FC_REPLAY getting set in s_mount_state. This bypasses some sanity checks, and this can trigger a BUG() in ext4_es_cache_extent(). As a easy-to-backport-fix, filter out the EXT4_FC_REPLAY bit for now. We should eventually transition away from EXT4_FC_REPLAY to something like EXT4_MF_REPLAY.
Impacted products
Vendor Product Version
Linux Linux Version: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
Version: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
Version: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
Version: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
Version: 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2
Create a notification for this product.
   Linux Linux Version: 5.10
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "cc5b09cb6dacd4b32640537929ab4ee8fb2b9e04",
              "status": "affected",
              "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
              "versionType": "git"
            },
            {
              "lessThan": "b99fd73418350dea360da8311e87a6a7b0e15a4c",
              "status": "affected",
              "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
              "versionType": "git"
            },
            {
              "lessThan": "af2f1932743fb52ebcb008ad7ac500d9df0aa796",
              "status": "affected",
              "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
              "versionType": "git"
            },
            {
              "lessThan": "55b4dbb29054a05d839562f6d635ce05669b016d",
              "status": "affected",
              "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
              "versionType": "git"
            },
            {
              "lessThan": "c878bea3c9d724ddfa05a813f30de3d25a0ba83f",
              "status": "affected",
              "version": "8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/super.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.10"
            },
            {
              "lessThan": "5.10",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.121",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.46",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.17.*",
              "status": "unaffected",
              "version": "5.17.14",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.19",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.121",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.46",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17.14",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.3",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state\n\nThe EXT4_FC_REPLAY bit in sbi-\u003es_mount_state is used to indicate that\nwe are in the middle of replay the fast commit journal.  This was\nactually a mistake, since the sbi-\u003es_mount_info is initialized from\nes-\u003es_state.  Arguably s_mount_state is misleadingly named, but the\nname is historical --- s_mount_state and s_state dates back to ext2.\n\nWhat should have been used is the ext4_{set,clear,test}_mount_flag()\ninline functions, which sets EXT4_MF_* bits in sbi-\u003es_mount_flags.\n\nThe problem with using EXT4_FC_REPLAY is that a maliciously corrupted\nsuperblock could result in EXT4_FC_REPLAY getting set in\ns_mount_state.  This bypasses some sanity checks, and this can trigger\na BUG() in ext4_es_cache_extent().  As a easy-to-backport-fix, filter\nout the EXT4_FC_REPLAY bit for now.  We should eventually transition\naway from EXT4_FC_REPLAY to something like EXT4_MF_REPLAY."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-19T12:56:18.264Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/cc5b09cb6dacd4b32640537929ab4ee8fb2b9e04"
        },
        {
          "url": "https://git.kernel.org/stable/c/b99fd73418350dea360da8311e87a6a7b0e15a4c"
        },
        {
          "url": "https://git.kernel.org/stable/c/af2f1932743fb52ebcb008ad7ac500d9df0aa796"
        },
        {
          "url": "https://git.kernel.org/stable/c/55b4dbb29054a05d839562f6d635ce05669b016d"
        },
        {
          "url": "https://git.kernel.org/stable/c/c878bea3c9d724ddfa05a813f30de3d25a0ba83f"
        }
      ],
      "title": "ext4: filter out EXT4_FC_REPLAY from on-disk superblock field s_state",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49348",
    "datePublished": "2025-02-26T02:11:02.518Z",
    "dateReserved": "2025-02-26T02:08:31.543Z",
    "dateUpdated": "2025-06-19T12:56:18.264Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}


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.
  • 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…