{"id":"CVE-2025-21783","summary":"gpiolib: Fix crash on error in gpiochip_get_ngpios()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ngpiolib: Fix crash on error in gpiochip_get_ngpios()\n\nThe gpiochip_get_ngpios() uses chip_*() macros to print messages.\nHowever these macros rely on gpiodev to be initialised and set,\nwhich is not the case when called via bgpio_init(). In such a case\nthe printing messages will crash on NULL pointer dereference.\nReplace chip_*() macros by the respective dev_*() ones to avoid\nsuch crash.","modified":"2026-03-20T12:41:10.459264Z","published":"2025-02-27T02:18:24.980Z","related":["USN-7521-2"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21783.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/189fb76215e479c10731baabb50f1a352d2078f5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4d9b2b62e1136d10f661ec4c0c268140b6f74f4f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a7052afa9eae2239e25943baa8817a6a56e8aa68"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21783.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-21783"},{"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":"55b2395e4e92adc492c6b30ac109eb78250dcd9d"},{"fixed":"4d9b2b62e1136d10f661ec4c0c268140b6f74f4f"},{"fixed":"a7052afa9eae2239e25943baa8817a6a56e8aa68"},{"fixed":"189fb76215e479c10731baabb50f1a352d2078f5"},{"fixed":"7b4aebeecbbd5b5fe73e35fad3f62ed21aa7ef44"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-21783.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}