# CVE-2022-50181: virtio-gpu: fix a missing check to avoid NULL dereference

- 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.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2025-06-18T11:03:30.273Z
- Modified: 2026-06-17T05:22:55.460Z
- Weaknesses: CWE-476
- Assigned by: Linux

## Description

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

virtio-gpu: fix a missing check to avoid NULL dereference

'cache_ent' could be set NULL inside virtio_gpu_cmd_get_capset()
and it will lead to a NULL dereference by a lately use of it
(i.e., ptr = cache_ent->caps_cache). Fix it with a NULL check.


[ kraxel: minor codestyle fixup ]

(As written by CVE List.)

## Affected

- Linux Linux: from 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 before 259773fc874258606c0121767a4a27466ff337eb; from 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 before 39caef09666c1d8274abf9472c72bcac236dc5fb; from 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 before adbdd21983fa292e53aec3eab97306b2961ea887; from 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 before 367882a5a9448b5e1ba756125308092d614cb96c; from 62fb7a5e10962ac6ae2a2d2dbd3aedcb2a3e3257 before bd63f11f4c3c46afec07d821f74736161ff6e526; 4.4 (not affected: before 4.4; from 5.10.137 up to 5.10.*; from 5.15.61 up to 5.15.*; from 5.18.18 up to 5.18.*; from 5.19.2 up to 5.19.*; from 6.0 up to *)
- linux linux_kernel: from 4.4 before 5.10.137; from 5.11 before 5.15.61; from 5.16 before 5.18.18; from 5.19 before 5.19.2

## References

- <https://git.kernel.org/stable/c/259773fc874258606c0121767a4a27466ff337eb> (patch)
- <https://git.kernel.org/stable/c/39caef09666c1d8274abf9472c72bcac236dc5fb> (patch)
- <https://git.kernel.org/stable/c/adbdd21983fa292e53aec3eab97306b2961ea887> (patch)
- <https://git.kernel.org/stable/c/367882a5a9448b5e1ba756125308092d614cb96c> (patch)
- <https://git.kernel.org/stable/c/bd63f11f4c3c46afec07d821f74736161ff6e526> (patch)

## Sources

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

---

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