cifs: Fix buffer overflow when parsing NFS reparse points (Linux Linux)

CVE-2024-49996
CRITICAL 9.4

En bref

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

Description

In the Linux kernel, the following vulnerability has been resolved: cifs: Fix buffer overflow when parsing NFS reparse points ReparseDataLength is sum of the InodeType size and DataBuffer size. So to get DataBuffer size it is needed to subtract InodeType's size from ReparseDataLength. Function cifs_strndup_from_utf16() is currentlly accessing buf->DataBuffer at position after the end of the buffer because it does not subtract InodeType size from the length. Fix this problem and correctly subtract variable len. Member InodeType is present only when reparse buffer is large enough. Check for ReparseDataLength before accessing InodeType to prevent another invalid memory access. Major and minor rdev values are present also only when reparse buffer is large enough. Check for reparse buffer size before calling reparse_mkdev().

Faiblesses (CWE)

  • CWE-120 — Copie de tampon sans vérification de taille (débordement classique)

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1CRITICAL 9.4CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:HLinux
CVSS 3.1CRITICAL 9.4CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:HNVD · 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary)
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)

Références européennes

Avis du CERT-FR

Configurations affectées (CPE NVD)

Produits affectés

ProduitVersions
Linux · Linuxaffected d5ecebc4900df7f6e8dff0717574668885110553 < 7b222d6cb87077faf56a687a72af1951cf78c8a9 ; affected d5ecebc4900df7f6e8dff0717574668885110553 < 73b078e3314d4854fd8286f3ba65c860ddd3a3dd ; affected d5ecebc4900df7f6e8dff0717574668885110553 < 01cdddde39b065074fd48f07027757783cbf5b7d ; affected d5ecebc4900df7f6e8dff0717574668885110553 < ec79e6170bcae8a6036a4b6960f5e7e59a785601 ; affected d5ecebc4900df7f6e8dff0717574668885110553 < c6db81c550cea0c73bd72ef55f579991e0e4ba07 ; affected d5ecebc4900df7f6e8dff0717574668885110553 < 803b3a39cb096d8718c0aebc03fd19f11c7dc919
Linux · Linuxaffected 5.3 ; unaffected 0 < 5.3 ; unaffected 5.4.287 ≤ 5.4.* ; unaffected 5.10.231 ≤ 5.10.* ; unaffected 5.15.174 ≤ 5.15.* ; unaffected 6.1.120 ≤ 6.1.*

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