# CVE-2022-48663: gpio: mockup: fix NULL pointer dereference when removing debugfs

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-04-28T13:01:36.158Z
- Modified: 2026-06-17T05:15:51.750Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

gpio: mockup: fix NULL pointer dereference when removing debugfs

We now remove the device's debugfs entries when unbinding the driver.
This now causes a NULL-pointer dereference on module exit because the
platform devices are unregistered *after* the global debugfs directory
has been recursively removed. Fix it by unregistering the devices first.

(As written by CVE List.)

## Affected

- Linux Linux: from 3815e66c2183f3430490e450ba16779cf5214ec6 before bdea98b98f844bd8a983ca880893e509a8b4162f; from 3a10e8edee2b45a654f1f7b05f747129ec84cf9d before 18352095a0d581f6aeb1e9fc9d68cc0152cd64b4; from bc55c1677edbe86a1c66a35e800df47dff16ad61 before af0bfabf06c74c260265c30ba81a34e7dec0e881; from 303e6da99429510b1e4edf833afe90ac8542e747 before b7df41a6f79dfb18ba2203f8c5f0e9c0b9b57f68; from 5.10.144 before 5.10.146; from 5.15.69 before 5.15.71; from 5.19.10 before 5.19.12
- linux linux_kernel: from 5.10.144 before 5.10.146; from 5.15.69 before 5.15.71; from 5.19.10 before 5.19.12

## References

- <https://git.kernel.org/stable/c/bdea98b98f844bd8a983ca880893e509a8b4162f> (patch)
- <https://git.kernel.org/stable/c/18352095a0d581f6aeb1e9fc9d68cc0152cd64b4> (patch)
- <https://git.kernel.org/stable/c/af0bfabf06c74c260265c30ba81a34e7dec0e881> (patch)
- <https://git.kernel.org/stable/c/b7df41a6f79dfb18ba2203f8c5f0e9c0b9b57f68> (patch)

## Sources

- CVE List: [CVE-2022-48663](https://www.cve.org/CVERecord?id=CVE-2022-48663), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-48663](https://nvd.nist.gov/vuln/detail/CVE-2022-48663), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-48663 · Whole record: https://cve.day/CVE-2022-48663.json · Rebuilt by cve.day 2026-11-25T22:58:19.791Z
