{"id":"CVE-2024-49941","summary":"gpiolib: Fix potential NULL pointer dereference in gpiod_get_label()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ngpiolib: Fix potential NULL pointer dereference in gpiod_get_label()\n\nIn `gpiod_get_label()`, it is possible that `srcu_dereference_check()` may\nreturn a NULL pointer, leading to a scenario where `label-\u003estr` is accessed\nwithout verifying if `label` itself is NULL.\n\nThis patch adds a proper NULL check for `label` before accessing\n`label-\u003estr`. The check for `label-\u003estr != NULL` is removed because\n`label-\u003estr` can never be NULL if `label` is not NULL.\n\nThis fixes the issue where the label name was being printed as `(efault)`\nwhen dumping the sysfs GPIO file when `label == NULL`.","modified":"2026-03-20T12:38:10.692316Z","published":"2024-10-21T18:02:00.361Z","related":["USN-7276-1","USN-7277-1","openSUSE-SU-2024:14500-1","openSUSE-SU-2025:14705-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49941.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/7b99b5ab885993bff010ebcd93be5e511c56e28a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9ee4b907d7a5d7a53b4ff7727c371ff3d44ccbbb"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/49xxx/CVE-2024-49941.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-49941"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a86d27693066a34a29be86f394bbad847b2d1749"},{"fixed":"9ee4b907d7a5d7a53b4ff7727c371ff3d44ccbbb"},{"fixed":"7b99b5ab885993bff010ebcd93be5e511c56e28a"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-49941.json"}}],"schema_version":"1.7.5"}