CVE-2022-50428 (GCVE-0-2022-50428)

Vulnerability from cvelistv5 – Published: 2025-10-01 11:42 – Updated: 2025-10-01 11:42
VLAI?
Title
ext4: fix off-by-one errors in fast-commit block filling
Summary
In the Linux kernel, the following vulnerability has been resolved: ext4: fix off-by-one errors in fast-commit block filling Due to several different off-by-one errors, or perhaps due to a late change in design that wasn't fully reflected in the code that was actually merged, there are several very strange constraints on how fast-commit blocks are filled with tlv entries: - tlvs must start at least 10 bytes before the end of the block, even though the minimum tlv length is 8. Otherwise, the replay code will ignore them. (BUG: ext4_fc_reserve_space() could violate this requirement if called with a len of blocksize - 9 or blocksize - 8. Fortunately, this doesn't seem to happen currently.) - tlvs must end at least 1 byte before the end of the block. Otherwise the replay code will consider them to be invalid. This quirk contributed to a bug (fixed by an earlier commit) where uninitialized memory was being leaked to disk in the last byte of blocks. Also, strangely these constraints don't apply to the replay code in e2fsprogs, which will accept any tlvs in the blocks (with no bounds checks at all, but that is a separate issue...). Given that this all seems to be a bug, let's fix it by just filling blocks with tlv entries in the natural way. Note that old kernels will be unable to replay fast-commit journals created by kernels that have this commit.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e , < 18f28f13301d1afb8cea9c4ddcecdbff14488ec6 (git)
Affected: aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e , < 5ca65dffdead16572ca046c43fb576b227f7f635 (git)
Affected: aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e , < 5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16 (git)
Affected: aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e , < 48a6a66db82b8043d298a630f22c62d43550cae5 (git)
Create a notification for this product.
    Linux Linux Affected: 5.10
Unaffected: 0 , < 5.10 (semver)
Unaffected: 5.15.87 , ≤ 5.15.* (semver)
Unaffected: 6.0.18 , ≤ 6.0.* (semver)
Unaffected: 6.1.4 , ≤ 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/ext4/fast_commit.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "18f28f13301d1afb8cea9c4ddcecdbff14488ec6",
              "status": "affected",
              "version": "aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e",
              "versionType": "git"
            },
            {
              "lessThan": "5ca65dffdead16572ca046c43fb576b227f7f635",
              "status": "affected",
              "version": "aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e",
              "versionType": "git"
            },
            {
              "lessThan": "5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16",
              "status": "affected",
              "version": "aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e",
              "versionType": "git"
            },
            {
              "lessThan": "48a6a66db82b8043d298a630f22c62d43550cae5",
              "status": "affected",
              "version": "aa75f4d3daaeb1389b9cce9d6b84401eaf228d4e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/ext4/fast_commit.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.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": "5.15.87",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.18",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.4",
                  "versionStartIncluding": "5.10",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "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: fix off-by-one errors in fast-commit block filling\n\nDue to several different off-by-one errors, or perhaps due to a late\nchange in design that wasn\u0027t fully reflected in the code that was\nactually merged, there are several very strange constraints on how\nfast-commit blocks are filled with tlv entries:\n\n- tlvs must start at least 10 bytes before the end of the block, even\n  though the minimum tlv length is 8.  Otherwise, the replay code will\n  ignore them.  (BUG: ext4_fc_reserve_space() could violate this\n  requirement if called with a len of blocksize - 9 or blocksize - 8.\n  Fortunately, this doesn\u0027t seem to happen currently.)\n\n- tlvs must end at least 1 byte before the end of the block.  Otherwise\n  the replay code will consider them to be invalid.  This quirk\n  contributed to a bug (fixed by an earlier commit) where uninitialized\n  memory was being leaked to disk in the last byte of blocks.\n\nAlso, strangely these constraints don\u0027t apply to the replay code in\ne2fsprogs, which will accept any tlvs in the blocks (with no bounds\nchecks at all, but that is a separate issue...).\n\nGiven that this all seems to be a bug, let\u0027s fix it by just filling\nblocks with tlv entries in the natural way.\n\nNote that old kernels will be unable to replay fast-commit journals\ncreated by kernels that have this commit."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-01T11:42:07.245Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/18f28f13301d1afb8cea9c4ddcecdbff14488ec6"
        },
        {
          "url": "https://git.kernel.org/stable/c/5ca65dffdead16572ca046c43fb576b227f7f635"
        },
        {
          "url": "https://git.kernel.org/stable/c/5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16"
        },
        {
          "url": "https://git.kernel.org/stable/c/48a6a66db82b8043d298a630f22c62d43550cae5"
        }
      ],
      "title": "ext4: fix off-by-one errors in fast-commit block filling",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50428",
    "datePublished": "2025-10-01T11:42:07.245Z",
    "dateReserved": "2025-09-17T14:53:07.008Z",
    "dateUpdated": "2025-10-01T11:42:07.245Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50428\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-01T12:15:34.403\",\"lastModified\":\"2025-10-02T19:12:17.160\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\next4: fix off-by-one errors in fast-commit block filling\\n\\nDue to several different off-by-one errors, or perhaps due to a late\\nchange in design that wasn\u0027t fully reflected in the code that was\\nactually merged, there are several very strange constraints on how\\nfast-commit blocks are filled with tlv entries:\\n\\n- tlvs must start at least 10 bytes before the end of the block, even\\n  though the minimum tlv length is 8.  Otherwise, the replay code will\\n  ignore them.  (BUG: ext4_fc_reserve_space() could violate this\\n  requirement if called with a len of blocksize - 9 or blocksize - 8.\\n  Fortunately, this doesn\u0027t seem to happen currently.)\\n\\n- tlvs must end at least 1 byte before the end of the block.  Otherwise\\n  the replay code will consider them to be invalid.  This quirk\\n  contributed to a bug (fixed by an earlier commit) where uninitialized\\n  memory was being leaked to disk in the last byte of blocks.\\n\\nAlso, strangely these constraints don\u0027t apply to the replay code in\\ne2fsprogs, which will accept any tlvs in the blocks (with no bounds\\nchecks at all, but that is a separate issue...).\\n\\nGiven that this all seems to be a bug, let\u0027s fix it by just filling\\nblocks with tlv entries in the natural way.\\n\\nNote that old kernels will be unable to replay fast-commit journals\\ncreated by kernels that have this commit.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/18f28f13301d1afb8cea9c4ddcecdbff14488ec6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/48a6a66db82b8043d298a630f22c62d43550cae5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5439ad45c0d0c8db41eb6f4dce6f778f15a5ee16\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5ca65dffdead16572ca046c43fb576b227f7f635\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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