fkie_cve-2022-49348
Vulnerability from fkie_nvd
Published
2025-02-26 07:01
Modified
2025-02-26 07:01
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



{
  "cveTags": [],
  "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."
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ext4: filtrar EXT4_FC_REPLAY del campo s_state del superbloque en disco El bit EXT4_FC_REPLAY en sbi-\u0026gt;s_mount_state se usa para indicar que estamos en medio de la reproducci\u00f3n del diario de confirmaci\u00f3n r\u00e1pida. En realidad, esto fue un error, ya que sbi-\u0026gt;s_mount_info se inicializa desde es-\u0026gt;s_state. Podr\u00eda decirse que s_mount_state tiene un nombre enga\u00f1oso, pero el nombre es hist\u00f3rico --- s_mount_state y s_state se remontan a ext2. Lo que se deber\u00eda haber usado son las funciones en l\u00ednea ext4_{set,clear,test}_mount_flag(), que establecen los bits EXT4_MF_* en sbi-\u0026gt;s_mount_flags. El problema con el uso de EXT4_FC_REPLAY es que un superbloque da\u00f1ado maliciosamente podr\u00eda provocar que EXT4_FC_REPLAY se establezca en s_mount_state. Esto evita algunas comprobaciones de cordura y puede desencadenar un error en ext4_es_cache_extent(). Como soluci\u00f3n f\u00e1cil de implementar, filtre el bit EXT4_FC_REPLAY por ahora. Deber\u00edamos dejar de usar EXT4_FC_REPLAY para pasar a algo como EXT4_MF_REPLAY."
    }
  ],
  "id": "CVE-2022-49348",
  "lastModified": "2025-02-26T07:01:11.533",
  "metrics": {},
  "published": "2025-02-26T07:01:11.533",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/55b4dbb29054a05d839562f6d635ce05669b016d"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/af2f1932743fb52ebcb008ad7ac500d9df0aa796"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/b99fd73418350dea360da8311e87a6a7b0e15a4c"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/c878bea3c9d724ddfa05a813f30de3d25a0ba83f"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/cc5b09cb6dacd4b32640537929ab4ee8fb2b9e04"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Awaiting Analysis"
}


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…