CVE-2022-50842
Description
In the Linux kernel, the following vulnerability has been resolved:
drm/virtio: Check whether transferred 2D BO is shmem
Transferred 2D BO always must be a shmem BO. Add check for that to prevent NULL dereference if userspace passes a VRAM BO.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A missing shmem BO check in the virtio-gpu driver could cause a NULL dereference when a VRAM BO is submitted as a transferred 2D BO.
Root
Cause
The vulnerability resides in the virtio-gpu DRM driver in the Linux kernel. When handling transferred 2D buffer objects (BOs), the driver assumed the BO was always backed by shmem (shared memory). It lacked a check to verify this assumption, so if a user-space application provided a VRAM (video RAM) BO instead of a shmem BO, the kernel would dereference a NULL pointer, leading to a potential denial-of-service crash [1][2].
Attack
Vector
An attacker with the ability to submit a crafted DRM command to the virtio-gpu device can exploit this issue. The attacker does not need special privileges beyond being able to open and control the DRM device (e.g., a local user with access to /dev/dri/card0). By passing a VRAM BO as the source or destination in a 2D transfer operation, the kernel's code path reaches the NULL pointer dereference before any type check occurs [1][2].
Impact
If exploited, this flaw causes a NULL pointer dereference in kernel space. The immediate consequence is a system crash (kernel panic) or a denial-of-service condition. There is no indication in the references that this can lead to privilege escalation or information disclosure; the impact is limited to availability disruption [1][2].
Mitigation
The fix, introduced in Linux kernel commits [1] and [2], adds an explicit shmem BO check at the start of the transfer handling function. If the BO is not shmem, the operation returns an error (-EINVAL) instead of proceeding to the vulnerable dereference. Users should apply the latest stable kernel updates to resolve the issue. No workarounds are available for unpatched kernels.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
5f122bcb34f1a989164305b9336e133af33eae473216b42aaf134f261d76aVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/36e133af33ea54193378b190cf92c47c12a43d34nvd
- git.kernel.org/stable/c/989164305b933af06d69bb91044dafbd01025371nvd
- git.kernel.org/stable/c/e473216b42aa1fd9fc6b94b608b42c210c655908nvd
- git.kernel.org/stable/c/f122bcb34f1a4b02ef3d95058d8fd1316ea03785nvd
- git.kernel.org/stable/c/f134f261d76ae3d5ecf68db642eaa746ceb84cfbnvd
News mentions
0No linked articles in our index yet.