CVE-2024-49941
kernel: gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()
Overview
Description
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 that srcu_dereference_check() may
return a NULL pointer, leading to a scenario where label->str is accessed
without verifying if label itself is NULL.
This patch adds a proper NULL check for label before accessing
label->str. The check for label->str != NULL is removed because
label->str can never be NULL if label 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.
Source: OX vulnerability database
Severity
5.5 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-476
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 8 fixes
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | bpftool +25 | eol |
debian 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 13 | linux | 6.11.4-1 |
| 14 | linux | 6.11.4-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.11.4-1 |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | kernel-devel +3 | 6.11.8-1.1 | openSUSE-SU-2024:14500-1 |
| Tumbleweed | kernel-devel-longterm +1 | 6.12.11-1.1 | openSUSE-SU-2025:14705-1 |
root.io debian 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 13 | rootio-linux | 6.11.4-1 |
ubuntu 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 24.04 | linux-oem-6-11 | 6.11.0-1015.15 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-49941
- git.kernel.org https://git.kernel.org/linus/7b99b5ab885993bff010ebcd93be5e511c56e28a (6.12-rc2)
- git.kernel.org https://git.kernel.org/stable/c/7b99b5ab885993bff010ebcd93be5e511c56e28a
- git.kernel.org https://git.kernel.org/stable/c/9ee4b907d7a5d7a53b4ff7727c371ff3d44ccbbb
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2024102128-CVE-2024-49941-442e@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-49941
- ubuntu.com https://ubuntu.com/security/notices/USN-7276-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7277-1
- ubuntu.com https://ubuntu.com/security/notices/USN-7310-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2024-49941
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.