In the Linux kernel, the following vulnerability has been...
Moderate severity
Unreviewed
Published
Oct 21, 2024
to the GitHub Advisory Database
•
Updated Oct 25, 2024
Description
Published by the National Vulnerability Database
Oct 21, 2024
Published to the GitHub Advisory Database
Oct 21, 2024
Last updated
Oct 25, 2024
In the Linux kernel, the following vulnerability has been resolved:
gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()
In
gpiod_get_label()
, it is possible thatsrcu_dereference_check()
mayreturn a NULL pointer, leading to a scenario where
label->str
is accessedwithout verifying if
label
itself is NULL.This patch adds a proper NULL check for
label
before accessinglabel->str
. The check forlabel->str != NULL
is removed becauselabel->str
can never be NULL iflabel
is not NULL.This fixes the issue where the label name was being printed as
(efault)
when dumping the sysfs GPIO file when
label == NULL
.References