NFSD: Fix ia_size underflow (Linux Linux)

CVE-2022-48828
CRITICAL 9.1

At a glance

Source
NVD
EPSS
EPSS 0.63 % · percentile 50 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix ia_size underflow iattr::ia_size is a loff_t, which is a signed 64-bit type. NFSv3 and NFSv4 both define file size as an unsigned 64-bit type. Thus there is a range of valid file size values an NFS client can send that is already larger than Linux can handle. Currently decode_fattr4() dumps a full u64 value into ia_size. If that value happens to be larger than S64_MAX, then ia_size underflows. I'm about to fix up the NFSv3 behavior as well, so let's catch the underflow in the common code path: nfsd_setattr().

Weaknesses (CWE)

  • CWE-191 — Integer Underflow (Wrap or Wraparound)

References

Scores

VersionScoreVectorScored by
CVSS 3.1CRITICAL 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:HLinux
CVSS 3.1CRITICAL 9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:HNVD · 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary)
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < d2211e6e34d0755f35e2f8c22d81999fa81cfc71 ; affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 38d02ba22e43b6fc7d291cf724bc6e3b7be6626b ; affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 8e0ecaf7a7e57b30284d6b3289cc436100fadc48 ; affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < da22ca1ad548429d7822011c54cfe210718e0aa7 ; affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < e6faac3f58c7c4176b66f63def17a34232a17b0e
Linux · Linuxaffected 2.6.12 ; unaffected 0 < 2.6.12 ; unaffected 5.4.295 ≤ 5.4.* ; unaffected 5.10.220 ≤ 5.10.* ; unaffected 5.15.24 ≤ 5.15.* ; unaffected 5.16.10 ≤ 5.16.*

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