Back to CVE catalog
CVE-2024-49941

gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()

Linux Linux

At a glance

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 description · CVE List / CNA

System impact

Attack complexityLow
ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS summary v3.1

5.5Medium
Published:
Updated:
EPSS:
0.263%
Exploited in attacks:
Not confirmed
Ransomware campaigns:
Not confirmed
Attack vector:
Local

Affected software

Vendor, product and affected version ranges.

Vendor, product and affected versions
Vendor:LinuxLinuxAffected versions:
6.9Show full version range for Linux
  • Other versions are affected by default; consult the source for exceptions.
  • Other source statuses: unaffected: < 6.9; unaffected: ≥ 6.11.3, ≤ 6.11.*; unaffected: ≥ 6.12

Git commit ranges (source code)

  • From commit a86d27693066a34a29be86f394bbad847b2d1749; before commit 9ee4b907d7a5d7a53b4ff7727c371ff3d44ccbbb
  • From commit a86d27693066a34a29be86f394bbad847b2d1749; before commit 7b99b5ab885993bff010ebcd93be5e511c56e28a
Vendor:Red HatRed Hat Enterprise Linux 6Affected versions:Source does not specify a version range
Vendor:Red HatRed Hat Enterprise Linux 7Affected versions:Source does not specify a version range
Vendor:SUSEopenSUSE TumbleweedAffected versions:Source does not specify a version range
Vendor:linuxlinux kernelAffected versions:
≥ 6.9, < 6.11.3Show full version range for linux kernel
6.12
  • CPE applicability can depend on other products or environments. Consult the full source configuration.
Vendor:Not specifiedKernel
Environments (1)
  • Linux
Affected versions:
≥ 6.9.0, < 6.11.3

1–6 of 6 · Page 1 of 1

CVSS scores and metrics3
[email protected] · NVD (Primary)Primary5.5 / 10MediumCVSS 3.1Details
Attack complexity
Low
Confidentiality
None
Integrity
None
Availability
High
Attack vector
Local
Privileges required
Low
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Red Hat · Red Hat VEX (adp)5.5 / 10MediumCVSS 3.1Details
Attack complexity
Low
Confidentiality
None
Integrity
None
Availability
High
Attack vector
Local
Privileges required
Low
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
SUSE · SUSE VEX (adp)5.5 / 10MediumCVSS 3.1Details
Attack complexity
Low
Confidentiality
None
Integrity
None
Availability
High
Attack vector
Local
Privileges required
Low
User interaction
Not required
Scope
Unchanged

Source vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CVSS measures severity; EPSS estimates exploitation probability. Lack of confirmed attacks does not mean lack of risk.

Sources and advisories10

This product uses the NVD API but is not endorsed or certified by the NVD. CVE® records © The MITRE Corporation, reproduced under the CVE Terms of Use. Data sources and licences