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

Medium 5.5 Published Updated

A missing NULL check in the Linux kernel's virtio-gpu driver allows attackers to cause a system crash via NULL pointer dereference.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-50181?

CVE-2022-50181 is a medium-severity vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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 ]

Weakness: CWE-476

Which versions are affected by CVE-2022-50181?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-50181?

Apply the vendor's patch.

Is CVE-2022-50181 being exploited?

There is no known exploitation of CVE-2022-50181 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-50181, GHSA-r98c-6vfm-m459, UBUNTU-CVE-2022-50181.

Is CVE-2022-50181 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free