VDB

CVE-2024-49941

CVE-2024-49941 PUBLISHED

gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()

Reported by linux · Published October 21, 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 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`.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
LinuxLinux9ee4b907d7a5d7a53b4ff7727c371ff3d44ccbbb

Affected products

VendorProductVersions
LinuxLinuxa86d27693066a34a29be86f394bbad847b2d1749, a86d27693066a34a29be86f394bbad847b2d1749
LinuxLinux6.9, 0, 6.11.3
LinuxLinux6.9, 6.12, *
linuxlinux_kernel6.9, 6.9

Timeline

  • Oct 21, 2024 CVE Published
  • Oct 22, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 22, 2024 Coalition ESS Score (9 in total, the first dated here)
  • Jan 2, 2026 Security Advisory (425 in total, the first dated here)
  • Apr 29, 2026 Distribution Patch (358 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-49941
vulnetix vdb fixes CVE-2024-49941

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-49941/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›