CVE-2024-40974: powerpc/pseries: Enforce hcall result buffer validity and size

Published Jul 12, 2024
·
Updated

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

powerpc/pseries: Enforce hcall result buffer validity and size

plparhcall(), plparhcall9(), and related functions expect callers to provide valid result buffers of certain minimum size. Currently this is communicated only through comments in the code and the compiler has no idea.

For example, if I write a bug like this:

long retbuf[PLPARHCALLBUFSIZE]; // should be PLPARHCALL9BUFSIZE plparhcall9(HALLOCATEVASWINDOW, retbuf, ...);

This compiles with no diagnostics emitted, but likely results in stack corruption at runtime when plparhcall9() stores results past the end of the array. (To be clear this is a contrived example and I have not found a real instance yet.)

To make this class of error less likely, we can use explicitly-sized array parameters instead of pointers in the declarations for the hcall APIs. When compiled with -Warray-bounds[1], the code above now provokes a diagnostic like this:

error: array argument is too small; is of size 32, callee requires at least 72 [-Werror,-Warray-bounds] 60 | plparhcall9(HALLOCATEVASWINDOW, retbuf, | ^ ~~~~~~

[1] Enabled for LLVM builds but not GCC for now. See commit 0da6e5fd6c37 ("gcc: disable '-Warray-bounds' for gcc-13 too") and related changes.

Other sources

Linux Kernel is vulnerable to a denial of service, caused by a flaw in powerpc/pseries. By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to cause a denial of service.

IBM

Affected Software

21 affected componentsFixes available
redhat/kernel<4.19.317
4.19.317
redhat/kernel<5.4.279
5.4.279
redhat/kernel<5.10.221
5.10.221
redhat/kernel<5.15.162
5.15.162
redhat/kernel<6.1.96
6.1.96
redhat/kernel<6.6.36
6.6.36
redhat/kernel<6.9.7
6.9.7
redhat/kernel<6.10
6.10
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel<4.19.317
Linux Linux kernel>=4.20<5.4.279
Linux Linux kernel>=5.5<5.10.221
Linux Linux kernel>=5.11<5.15.162
Linux Linux kernel>=5.16<6.1.96
Linux Linux kernel>=6.2<6.6.36
Linux Linux kernel>=6.7<6.9.7

Event History

Jul 12, 2024
CVE Published
via MITRE·12:32 PM
Data Sourced
via MITRE·12:32 PM
Description
Data Sourced
via NVD·01:15 PM
Description
Data Sourced
via NVD·01:15 PM
RemedySeverityWeaknessAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·06:15 PM
RemedyDescriptionSeverityAffected Software
Sep 23, 57682
Event
via NVD·08:58 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-40974?

CVE-2024-40974 is considered a critical vulnerability due to its potential impact on kernel operations in Linux.

2

How do I fix CVE-2024-40974?

To fix CVE-2024-40974, update the kernel to at least version 4.19.317, 5.4.279, 5.10.221, 5.15.162, 6.1.96 or 6.6.36 on Red Hat, or corresponding patched versions on Debian.

3

What systems are affected by CVE-2024-40974?

CVE-2024-40974 affects multiple versions of the Linux kernel across various distributions including Red Hat and Debian.

4

What is the nature of CVE-2024-40974?

CVE-2024-40974 involves an issue where certain kernel functions do not adequately enforce result buffer validity, leading to potential security risks.

5

Was CVE-2024-40974 publicly disclosed?

CVE-2024-40974 was disclosed as part of a routine security update for the Linux kernel, ensuring the issue is addressed promptly.

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