CVE-2025-21783

gpiolib: Fix crash on error in gpiochip_get_ngpios()

Medium · published February 27, 2025

CVSS v3.1
5.5
EPSS
0%
Percentile
12.2
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
5.5 · MEDIUM
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00222 · 12.2th percentile
Published
2025-02-27T02:18Z
EPSS history
Timeline
  • 27 FEB 02:18Z
    gpiolib: Fix crash on error in gpiochip_get_ngpios()
    cvelistv5