1. Accueil
  2. Vulnérabilités
  3. CVE-2024-40974

CVE-2024-40974

In the Linux kernel, the following vulnerability has been resolved: powerpc/pseries: Enforce hcall result…

Publiée le 12 juil. 2024 · modifiée le 4 août 2026 · Sources : NVD, EPSS (FIRST)

Faible 37/100

Résumé

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.

Aucune traduction française : description d’origine affichée.

Produits et versions affectés

Linux (7 ligne(s))
Linux
ProduitVersionsCorrigé dansSource
Linux kernel avant 4.19.317 (exclu) — NVD
Linux kernel de 4.20 (inclus) à 5.4.279 (exclu) — NVD
Linux kernel de 5.5 (inclus) à 5.10.221 (exclu) — NVD
Linux kernel de 5.11 (inclus) à 5.15.162 (exclu) — NVD
Linux kernel de 5.16 (inclus) à 6.1.96 (exclu) — NVD
Linux kernel de 6.2 (inclus) à 6.6.36 (exclu) — NVD
Linux kernel de 6.7 (inclus) à 6.9.7 (exclu) — NVD

Correctif

Non renseigné par l’éditeur.

Contournement

Aucun contournement renseigné.

Savoir si vous êtes touché

Aucune méthode de vérification renseignée.

Chronologie

  1. — Publication de la CVE (cve)

Références

Provenance des données

Statut
NVD
Date de publication
NVD
Description
NVD
Score CVSS
NVD
Faiblesse (CWE)
NVD
Vecteur CVSS
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (CVSS 3.1, NVD)
Faiblesse
CWE-787 · Corruption mémoire

Comment sont obtenues et calculées ces données