In the Linux kernel, the following vulnerability has been resolved:
drm/vmwgfx: reject DXBINDQUERY without a DX context
vmwcmddxbindquery() unconditionally dereferences swcontext->dxctxnode->ctx. Userspace can trigger a NULL pointer dereference from any render-node fd by submitting an execbuf with dxcontexthandle == SVGA3DINVALIDID and a SVGA3DCMDDXBINDQUERY opcode in the command stream: dxctxnode is left NULL and the kernel oopses on the assignment. The same NULL is then re-read in vmwresourcesreserve() via vmwcontextgetdxquery_mob().
All sibling DX handlers fail-close on a missing dxctxnode using VMWGETCTX_NODE(). Use the same pattern here, returning -EINVAL up front before any relocation state is published.