arm64: ptrace: fix partial SETREGSET for NT_ARM_TAGGED_ADDR_CTRL (Linux Linux)

CVE-2024-57874
MEDIUM 6.1

En bref

Source
NVD
EPSS
EPSS 0.21 % · centile 11 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
Linux
Statut NVD
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: arm64: ptrace: fix partial SETREGSET for NT_ARM_TAGGED_ADDR_CTRL Currently tagged_addr_ctrl_set() doesn't initialize the temporary 'ctrl' variable, and a SETREGSET call with a length of zero will leave this uninitialized. Consequently tagged_addr_ctrl_set() will consume an arbitrary value, potentially leaking up to 64 bits of memory from the kernel stack. The read is limited to a specific slot on the stack, and the issue does not provide a write mechanism. As set_tagged_addr_ctrl() only accepts values where bits [63:4] zero and rejects other values, a partial SETREGSET attempt will randomly succeed or fail depending on the value of the uninitialized value, and the exposure is significantly limited. Fix this by initializing the temporary value before copying the regset from userspace, as for other regsets (e.g. NT_PRSTATUS, NT_PRFPREG, NT_ARM_SYSTEM_CALL). In the case of a zero-length write, the existing value of the tagged address ctrl will be retained. The NT_ARM_TAGGED_ADDR_CTRL regset is only visible in the user_aarch64_view used by a native AArch64 task to manipulate another native AArch64 task. As get_tagged_addr_ctrl() only returns an error value when called for a compat task, tagged_addr_ctrl_get() and tagged_addr_ctrl_set() should never observe an error value from get_tagged_addr_ctrl(). Add a WARN_ON_ONCE() to both to indicate that such an error would be unexpected, and error handlnig is not missing in either case.

Faiblesses (CWE)

  • CWE-908 — Utilisation d'une ressource non initialisée

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1MEDIUM 6.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:HCISA-ADP
CVSS 3.1MEDIUM 6.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:HNVD · nvd@nist.gov (Primary)
CVSS 3.1MEDIUM 6.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:HNVD · 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary)

Références européennes

Avis du CERT-FR

Configurations affectées (CPE NVD)

Produits affectés

ProduitVersions
Linux · Linuxaffected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < 1152dd13845efde5554f80c7e1233bae1d26bd3e ; affected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < 1c176f5155ee6161fee6f416b64aa50394d3f220 ; affected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < 1370cf3eb5495d70e00547598583a4cd45b40b99 ; affected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < 96035c0093db258975b8887676afe59a64c34a72 ; affected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < abd614bbfcee73247495bd9472da8f85ac83546e ; affected 2200aa7154cb7ef76bac93e98326883ba64bfa2e < ca62d90085f4af36de745883faab9f8a7cbb45d3
Linux · Linuxaffected 5.10 ; unaffected 0 < 5.10 ; unaffected 5.10.231 ≤ 5.10.* ; unaffected 5.15.174 ≤ 5.15.* ; unaffected 6.1.120 ≤ 6.1.* ; unaffected 6.6.66 ≤ 6.6.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD