CVE-2025-21783

gpiolib: Fix crash on error in gpiochip_get_ngpios()

State
Published
Severity
5.5 Medium
Published
Feb 27, 2025
Updated
May 11, 2026
Reserved
Dec 29, 2024

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

gpiolib: Fix crash on error in gpiochip_get_ngpios()

The gpiochip_get_ngpios() uses chip_*() macros to print messages. However these macros rely on gpiodev to be initialised and set, which is not the case when called via bgpio_init(). In such a case the printing messages will crash on NULL pointer dereference. Replace chip_*() macros by the respective dev_*() ones to avoid such crash.

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 55b2395e4e92adc492c6b30ac109eb78250dcd9d to before 4d9b2b62e1136d10f661ec4c0c268140b6f74f4fAffected
  • 55b2395e4e92adc492c6b30ac109eb78250dcd9d to before a7052afa9eae2239e25943baa8817a6a56e8aa68Affected
  • 55b2395e4e92adc492c6b30ac109eb78250dcd9d to before 189fb76215e479c10731baabb50f1a352d2078f5Affected
  • 55b2395e4e92adc492c6b30ac109eb78250dcd9d to before 7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44Affected
LinuxLinux
  • 6.6Affected
  • before 6.6Not affected
  • 6.6.79 through 6.6.*Not affected
  • 6.12.16 through 6.12.*Not affected
  • 6.13.4 through 6.13.*Not affected
  • 6.14 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.