FKIE_CVE-2022-49124

Vulnerability from fkie_nvd - Published: 2025-02-26 07:00 - Updated: 2025-10-15 19:44
Summary
In the Linux kernel, the following vulnerability has been resolved: x86/mce: Work around an erratum on fast string copy instructions A rare kernel panic scenario can happen when the following conditions are met due to an erratum on fast string copy instructions: 1) An uncorrected error. 2) That error must be in first cache line of a page. 3) Kernel must execute page_copy from the page immediately before that page. The fast string copy instructions ("REP; MOVS*") could consume an uncorrectable memory error in the cache line _right after_ the desired region to copy and raise an MCE. Bit 0 of MSR_IA32_MISC_ENABLE can be cleared to disable fast string copy and will avoid such spurious machine checks. However, that is less preferable due to the permanent performance impact. Considering memory poison is rare, it's desirable to keep fast string copy enabled until an MCE is seen. Intel has confirmed the following: 1. The CPU erratum of fast string copy only applies to Skylake, Cascade Lake and Cooper Lake generations. Directly return from the MCE handler: 2. Will result in complete execution of the "REP; MOVS*" with no data loss or corruption. 3. Will not result in another MCE firing on the next poisoned cache line due to "REP; MOVS*". 4. Will resume execution from a correct point in code. 5. Will result in the same instruction that triggered the MCE firing a second MCE immediately for any other software recoverable data fetch errors. 6. Is not safe without disabling the fast string copy, as the next fast string copy of the same buffer on the same CPU would result in a PANIC MCE. This should mitigate the erratum completely with the only caveat that the fast string copy is disabled on the affected hyper thread thus performance degradation. This is still better than the OS crashing on MCEs raised on an irrelevant process due to "REP; MOVS*' accesses in a kernel context, e.g., copy_page. Injected errors on 1st cache line of 8 anonymous pages of process 'proc1' and observed MCE consumption from 'proc2' with no panic (directly returned). Without the fix, the host panicked within a few minutes on a random 'proc2' process due to kernel access from copy_page. [ bp: Fix comment style + touch ups, zap an unlikely(), improve the quirk function's readability. ]
Impacted products
Vendor Product Version
linux linux_kernel *

{
  "configurations": [
    {
      "nodes": [
        {
          "cpeMatch": [
            {
              "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
              "matchCriteriaId": "68AC7372-D098-4584-A82A-1F7CD731042F",
              "versionEndExcluding": "5.17.3",
              "vulnerable": true
            }
          ],
          "negate": false,
          "operator": "OR"
        }
      ]
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nx86/mce: Work around an erratum on fast string copy instructions\n\nA rare kernel panic scenario can happen when the following conditions\nare met due to an erratum on fast string copy instructions:\n\n1) An uncorrected error.\n2) That error must be in first cache line of a page.\n3) Kernel must execute page_copy from the page immediately before that\npage.\n\nThe fast string copy instructions (\"REP; MOVS*\") could consume an\nuncorrectable memory error in the cache line _right after_ the desired\nregion to copy and raise an MCE.\n\nBit 0 of MSR_IA32_MISC_ENABLE can be cleared to disable fast string\ncopy and will avoid such spurious machine checks. However, that is less\npreferable due to the permanent performance impact. Considering memory\npoison is rare, it\u0027s desirable to keep fast string copy enabled until an\nMCE is seen.\n\nIntel has confirmed the following:\n1. The CPU erratum of fast string copy only applies to Skylake,\nCascade Lake and Cooper Lake generations.\n\nDirectly return from the MCE handler:\n2. Will result in complete execution of the \"REP; MOVS*\" with no data\nloss or corruption.\n3. Will not result in another MCE firing on the next poisoned cache line\ndue to \"REP; MOVS*\".\n4. Will resume execution from a correct point in code.\n5. Will result in the same instruction that triggered the MCE firing a\nsecond MCE immediately for any other software recoverable data fetch\nerrors.\n6. Is not safe without disabling the fast string copy, as the next fast\nstring copy of the same buffer on the same CPU would result in a PANIC\nMCE.\n\nThis should mitigate the erratum completely with the only caveat that\nthe fast string copy is disabled on the affected hyper thread thus\nperformance degradation.\n\nThis is still better than the OS crashing on MCEs raised on an\nirrelevant process due to \"REP; MOVS*\u0027 accesses in a kernel context,\ne.g., copy_page.\n\n\nInjected errors on 1st cache line of 8 anonymous pages of process\n\u0027proc1\u0027 and observed MCE consumption from \u0027proc2\u0027 with no panic\n(directly returned).\n\nWithout the fix, the host panicked within a few minutes on a\nrandom \u0027proc2\u0027 process due to kernel access from copy_page.\n\n  [ bp: Fix comment style + touch ups, zap an unlikely(), improve the\n    quirk function\u0027s readability. ]"
    },
    {
      "lang": "es",
      "value": "En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/mce: Workaround a una errata en instrucciones de copia r\u00e1pida de cadenas Un escenario poco com\u00fan de p\u00e1nico del kernel puede ocurrir cuando se cumplen las siguientes condiciones debido a una errata en instrucciones de copia r\u00e1pida de cadenas: 1) Un error sin corregir. 2) Ese error debe estar en la primera l\u00ednea de cach\u00e9 de una p\u00e1gina. 3) El kernel debe ejecutar page_copy desde la p\u00e1gina inmediatamente anterior a esa p\u00e1gina. Las instrucciones de copia r\u00e1pida de cadenas (\"REP; MOVS*\") podr\u00edan consumir un error de memoria incorregible en la l\u00ednea de cach\u00e9 _justo despu\u00e9s_ de la regi\u00f3n deseada para copiar y generar un MCE. El bit 0 de MSR_IA32_MISC_ENABLE se puede borrar para deshabilitar la copia r\u00e1pida de cadenas y evitar\u00e1 tales verificaciones de m\u00e1quina falsas. Sin embargo, eso es menos preferible debido al impacto permanente en el rendimiento. Teniendo en cuenta que el envenenamiento de memoria es poco com\u00fan, es deseable mantener habilitada la copia r\u00e1pida de cadenas hasta que se vea un MCE. Intel ha confirmado lo siguiente: 1. La errata de la CPU de la copia r\u00e1pida de cadenas solo se aplica a las generaciones Skylake, Cascade Lake y Cooper Lake. Regresa directamente del controlador MCE: 2. Dar\u00e1 como resultado la ejecuci\u00f3n completa de \"REP; MOVS*\" sin p\u00e9rdida ni corrupci\u00f3n de datos. 3. No dar\u00e1 como resultado que se active otro MCE en la siguiente l\u00ednea de cach\u00e9 envenenada debido a \"REP; MOVS*\". 4. Reanudar\u00e1 la ejecuci\u00f3n desde un punto correcto en el c\u00f3digo. 5. Dar\u00e1 como resultado que la misma instrucci\u00f3n que activ\u00f3 el MCE active un segundo MCE inmediatamente para cualquier otro error de obtenci\u00f3n de datos recuperable por software. 6. No es seguro sin deshabilitar la copia r\u00e1pida de cadenas, ya que la pr\u00f3xima copia r\u00e1pida de cadenas del mismo b\u00fafer en la misma CPU dar\u00eda como resultado un MCE de PANIC. Esto deber\u00eda mitigar la errata por completo con la \u00fanica salvedad de que la copia r\u00e1pida de cadenas est\u00e1 deshabilitada en el hiperproceso afectado, por lo que se degrada el rendimiento. Esto es a\u00fan mejor que el bloqueo del sistema operativo en MCE generados en un proceso irrelevante debido a accesos \"REP; MOVS*\" en un contexto de kernel, por ejemplo, copy_page. Se inyectaron errores en la primera l\u00ednea de cach\u00e9 de 8 p\u00e1ginas an\u00f3nimas del proceso \"proc1\" y se observ\u00f3 el consumo de MCE de \"proc2\" sin p\u00e1nico (devuelto directamente). Sin la soluci\u00f3n, el host entr\u00f3 en p\u00e1nico en unos pocos minutos en un proceso \"proc2\" aleatorio debido al acceso al kernel desde copy_page. [bp: Corregir el estilo de comentario + retoques, eliminar un Unlikely(), mejorar la legibilidad de la funci\u00f3n Quirk.]"
    }
  ],
  "id": "CVE-2022-49124",
  "lastModified": "2025-10-15T19:44:53.177",
  "metrics": {
    "cvssMetricV31": [
      {
        "cvssData": {
          "attackComplexity": "LOW",
          "attackVector": "LOCAL",
          "availabilityImpact": "HIGH",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "privilegesRequired": "LOW",
          "scope": "UNCHANGED",
          "userInteraction": "NONE",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
          "version": "3.1"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6,
        "source": "nvd@nist.gov",
        "type": "Primary"
      }
    ]
  },
  "published": "2025-02-26T07:00:49.740",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ],
      "url": "https://git.kernel.org/stable/c/8ca97812c3c830573f965a07bbd84223e8c5f5bd"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "tags": [
        "Patch"
      ],
      "url": "https://git.kernel.org/stable/c/ba37c73be3d5632f6fb9fa20b250ce45560ca85d"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Analyzed",
  "weaknesses": [
    {
      "description": [
        {
          "lang": "en",
          "value": "NVD-CWE-noinfo"
        }
      ],
      "source": "nvd@nist.gov",
      "type": "Primary"
    }
  ]
}


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…