CVE-2022-49124: x86/mce: Work around an erratum on fast string copy instructions

Published Feb 26, 2025
·
Updated

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 pagecopy 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 MSRIA32MISCENABLE 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., copypage.

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 copypage.

[ bp: Fix comment style + touch ups, zap an unlikely(), improve the quirk function's readability. ]

Affected Software

3 affected components
Linux Kernel<5.10
Linux Linux kernel<5.17.3
Microsoft cbl2 kernel 5.15.186.1-1

Event History

Feb 26, 2025
CVE Published
via MITRE·01:55 AM
Data Sourced
via MITRE·01:55 AM
Description
Data Sourced
via NVD·07:00 AM
RemedyDescriptionSeverityAffected Software
Oct 17, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:01 AM
DescriptionSeverity

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203