acpi: nfit: fix narrowing conversion in acpi_nfit_ctl (Linux Linux)

CVE-2025-22044
HIGH 7.1

At a glance

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

Description

In the Linux kernel, the following vulnerability has been resolved: acpi: nfit: fix narrowing conversion in acpi_nfit_ctl Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary bus families can be translated". This warning is emited if the argument is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first verifies that a user-provided value call_pkg->nd_family of type u64 is not equal to 0. Then the value is converted to int, and only after that is compared to NVDIMM_BUS_FAMILY_MAX. This can lead to passing an invalid argument to acpi_nfit_ctl(), if call_pkg->nd_family is non-zero, while the lower 32 bits are zero. Furthermore, it is best to return EINVAL immediately upon seeing the invalid user input. The WARNING is insufficient to prevent further undefined behavior based on other invalid user input. All checks of the input value should be applied to the original variable call_pkg->nd_family. [iweiny: update commit message]

Weaknesses (CWE)

  • CWE-704 — Incorrect Type Conversion or Cast

References

Scores

VersionScoreVectorScored by
CVSS 3.1HIGH 7.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:HLinux
CVSS 3.1HIGH 7.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/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 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < 4b65cff06a004ac54f6ea8886060f0d07b1ca055 ; affected 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < 92ba06aef65522483784dcbd6697629ddbd4c4f9 ; affected 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < bae5b55e0f327102e78f6a66fb127275e9bc91b6 ; affected 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < c90402d2a226ff7afbe1d0650bee8ecc15a91049 ; affected 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < e71a57c5aaa389d4c3c82f920761262efdd18d38 ; affected 6450ddbd5d8e83ea9927c7f9076a21f829699e0f < 73851cfceb00cc77d7a0851bc10f2263394c3e87
Linux · Linuxaffected 5.9 ; unaffected 0 < 5.9 ; unaffected 5.10.236 ≤ 5.10.* ; unaffected 5.15.180 ≤ 5.15.* ; unaffected 6.1.134 ≤ 6.1.* ; unaffected 6.6.87 ≤ 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