CVE-2024-42126: powerpc: Avoid nmi_enter/nmi_exit in real mode interrupt.

Published Jul 30, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

powerpc: Avoid nmienter/nmiexit in real mode interrupt.

nmienter()/nmiexit() touches per cpu variables which can lead to kernel crash when invoked during real mode interrupt handling (e.g. early HMI/MCE interrupt handler) if percpu allocation comes from vmalloc area.

Early HMI/MCE handlers are called through DEFINEINTERRUPTHANDLERNMI() wrapper which invokes nmienter/nmiexit calls. We don't see any issue when percpu allocation is from the embedded first chunk. However with CONFIGNEEDPERCPUPAGEFIRSTCHUNK enabled there are chances where percpu allocation can come from the vmalloc area.

With kernel command line "percpualloc=page" we can force percpu allocation to come from vmalloc area and can see kernel crash in machinecheckearly:

[ 1.215714] NIP [c000000000e49eb4] rcunmienter+0x24/0x110 [ 1.215717] LR [c0000000000461a0] machinecheckearly+0xf0/0x2c0 [ 1.215719] --- interrupt: 200 [ 1.215720] [c000000fffd73180] [0000000000000000] 0x0 (unreliable) [ 1.215722] [c000000fffd731b0] [0000000000000000] 0x0 [ 1.215724] [c000000fffd73210] [c000000000008364] machinecheckearlycommon+0x134/0x1f8

Fix this by avoiding use of nmienter()/nmiexit() in real mode if percpu first chunk is not embedded.

Affected Software

7 affected componentsFixes available
debian/linux<=5.10.223-1, <=5.10.234-1
6.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=5.10<5.10.224
Linux Linux kernel>=5.11<5.15.165
Linux Linux kernel>=5.16<6.1.98
Linux Linux kernel>=6.2<6.6.39
Linux Linux kernel>=6.7<6.9.9

Event History

Jul 30, 2024
CVE Published
via MITRE·07:46 AM
Data Sourced
via MITRE·07:46 AM
Description
Data Sourced
via NVD·08:15 AM
Description
Data Sourced
via NVD·08:15 AM
RemedySeverityAffected Software
May 9, 2025
Data Sourced
via Ubuntu·12:35 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42126?

CVE-2024-42126 has a high severity rating due to its potential to cause kernel crashes.

2

How do I fix CVE-2024-42126?

To fix CVE-2024-42126, update to the latest patched versions of the Linux kernel, specifically versions 6.1.123-1, 6.1.128-1, or 6.12.12-1.

3

What versions of Linux are affected by CVE-2024-42126?

CVE-2024-42126 affects Linux kernel versions up to and including 5.10.226-1 and certain 6.1 versions.

4

Can CVE-2024-42126 lead to data loss?

Yes, CVE-2024-42126 can lead to data loss due to kernel crashes during real mode interrupt handling.

5

Is there a workaround for CVE-2024-42126?

There is no known workaround for CVE-2024-42126; the only mitigation is to apply the available updates.

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