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

powerpc/pseries: Enforce hcall result buffer validity and size

plpar_hcall(), plpar_hcall9(), 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[PLPAR_HCALL_BUFSIZE]; // should be PLPAR_HCALL9_BUFSIZE
plpar_hcall9(H_ALLOCATE_VAS_WINDOW, retbuf, ...);

This compiles with no diagnostics emitted, but likely results in stack
corruption at runtime when plpar_hcall9() 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 | plpar_hcall9(H_ALLOCATE_VAS_WINDOW, 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.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-4008-1 linux-6.1 security update
Debian DSA Debian DSA DSA-5730-1 linux security update
Debian DSA Debian DSA DSA-5731-1 linux security update
Ubuntu USN Ubuntu USN USN-6999-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-6999-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7003-5 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7004-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7005-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7005-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7006-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7007-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7008-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7009-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7009-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7019-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7029-1 Linux kernel vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Mon, 03 Nov 2025 22:30:00 +0000

Type Values Removed Values Added
References

Wed, 17 Sep 2025 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses CWE-787
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
Metrics cvssV3_1

{'score': 6.6, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Wed, 11 Sep 2024 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 08 Aug 2024 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/o:redhat:enterprise_linux:8
Vendors & Products Redhat
Redhat enterprise Linux

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2025-11-03T21:58:39.132Z

Reserved: 2024-07-12T12:17:45.603Z

Link: CVE-2024-40974

cve-icon Vulnrichment

Updated: 2025-11-03T21:58:39.132Z

cve-icon NVD

Status : Modified

Published: 2024-07-12T13:15:18.943

Modified: 2025-11-03T22:17:19.287

Link: CVE-2024-40974

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-07-12T00:00:00Z

Links: CVE-2024-40974 - Bugzilla

cve-icon OpenCVE Enrichment

No data.