CVE-2024-49941

Severity CVSS v4.0:
Pending analysis
Type:
CWE-476 NULL Pointer Dereference
Publication date:
21/10/2024
Last modified:
25/10/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()<br /> <br /> In `gpiod_get_label()`, it is possible that `srcu_dereference_check()` may<br /> return a NULL pointer, leading to a scenario where `label-&gt;str` is accessed<br /> without verifying if `label` itself is NULL.<br /> <br /> This patch adds a proper NULL check for `label` before accessing<br /> `label-&gt;str`. The check for `label-&gt;str != NULL` is removed because<br /> `label-&gt;str` can never be NULL if `label` is not NULL.<br /> <br /> This fixes the issue where the label name was being printed as `(efault)`<br /> when dumping the sysfs GPIO file when `label == NULL`.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.9 (including) 6.11.3 (excluding)
cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:*