CVE-2022-50453

gpiolib: cdev: fix NULL-pointer dereferences

No CVSS score yet EPSS 0.17%

Published 1 Oct 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2022-50453

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50453 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In the Linux kernel, the following vulnerability has been resolved:

gpiolib: cdev: fix NULL-pointer dereferences

There are several places where we can crash the kernel by requesting lines, unbinding the GPIO device, then calling any of the system calls relevant to the GPIO character device's annonymous file descriptors: ioctl(), read(), poll().

While I observed it with the GPIO simulator, it will also happen for any of the GPIO devices that can be hot-unplugged - for instance any HID GPIO expander (e.g. CP2112).

This affects both v1 and v2 uAPI.

This fixes it partially by checking if gdev->chip is not NULL but it doesn't entirely remedy the situation as we still have a race condition in which another thread can remove the device after the check.

Exploitation

EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.55% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from d7c51b47ac11e66f547b55640405c1c474642d72, before 6d79546622baab843172b52c3af035f83c1b21df
affected from d7c51b47ac11e66f547b55640405c1c474642d72, before 7c755a2d6df511eeb5afba966ac28140f9ea5063
affected from d7c51b47ac11e66f547b55640405c1c474642d72, before d66f68ac9e7ba46b6b90fbe25155723f2126088a
affected from d7c51b47ac11e66f547b55640405c1c474642d72, before ac6ce3cd7a3e10a2e37b8970bab81b4d33d5cfc3
affected from d7c51b47ac11e66f547b55640405c1c474642d72, before 533aae7c94dbc2b14301cfd68ae7e0e90f0c8438
Other versions: unaffected
Linux
affected 4.8
unaffected before 4.8
unaffected from 5.10.163 up to and including 5.10.*
unaffected from 5.15.86 up to and including 5.15.*
unaffected from 6.0.16 up to and including 6.0.*
unaffected from 6.1.2 up to and including 6.1.*
unaffected 6.2 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50453 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50453

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2022-50453
trivy image --scanners vuln IMAGE | grep CVE-2022-50453

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2022-50453 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.