{"id":"CVE-2025-40111","state":"PUBLISHED","title":"drm/vmwgfx: Fix Use-after-free in validation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/vmwgfx: Fix Use-after-free in validation\n\nNodes stored in the validation duplicates hashtable come from an arena\nallocator that is cleared at the end of vmw_execbuf_process. All nodes\nare expected to be cleared in vmw_validation_drop_ht but this node escaped\nbecause its resource was destroyed prematurely.","publishedAt":"2025-11-12T01:07:25.203Z","updatedAt":"2026-10-15T22:02:38.116Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"1822e5287b7dfa59d0af966756ebf1dc652b60ee","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"fb7165e5f3b3b10721ff70553583ad12e90e447a","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"4c918f9d1ccccc0e092f43dcb2d8266f54d7340b","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"9a8eaca539708ca532747f606d231f70e684e8ca","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"867bda5d95d36f10da398fd4409e21c7002b2332","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"655a2f29bfc21105c80bf8a7d7aafa6eca8b4496","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"65608e991c2d771c13404e5c7ae122ac3c3357a4","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"dfe1323ab3c8a4dd5625ebfdba44dc47df84512a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/vmwgfx/vmwgfx_validation.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.20","versionType":"semver"},{"version":"5.4.301","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.246","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.195","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.157","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.113","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.54","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.4","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/vmwgfx/vmwgfx_validation.c"]}],"references":["https://git.kernel.org/stable/c/1822e5287b7dfa59d0af966756ebf1dc652b60ee","https://git.kernel.org/stable/c/fb7165e5f3b3b10721ff70553583ad12e90e447a","https://git.kernel.org/stable/c/4c918f9d1ccccc0e092f43dcb2d8266f54d7340b","https://git.kernel.org/stable/c/9a8eaca539708ca532747f606d231f70e684e8ca","https://git.kernel.org/stable/c/867bda5d95d36f10da398fd4409e21c7002b2332","https://git.kernel.org/stable/c/655a2f29bfc21105c80bf8a7d7aafa6eca8b4496","https://git.kernel.org/stable/c/65608e991c2d771c13404e5c7ae122ac3c3357a4","https://git.kernel.org/stable/c/dfe1323ab3c8a4dd5625ebfdba44dc47df84512a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40111.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40111","state":"PUBLISHED","datePublished":"2025-11-12T01:07:25.203Z","dateUpdated":"2026-10-15T22:02:38.116Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.167Z"},"containers":{"cna":{"title":"drm/vmwgfx: Fix Use-after-free in validation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/vmwgfx: Fix Use-after-free in validation\n\nNodes stored in the validation duplicates hashtable come from an arena\nallocator that is cleared at the end of vmw_execbuf_process. All nodes\nare expected to be cleared in vmw_validation_drop_ht but this node escaped\nbecause its resource was destroyed prematurely."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"1822e5287b7dfa59d0af966756ebf1dc652b60ee","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"fb7165e5f3b3b10721ff70553583ad12e90e447a","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"4c918f9d1ccccc0e092f43dcb2d8266f54d7340b","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"9a8eaca539708ca532747f606d231f70e684e8ca","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"867bda5d95d36f10da398fd4409e21c7002b2332","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"655a2f29bfc21105c80bf8a7d7aafa6eca8b4496","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"65608e991c2d771c13404e5c7ae122ac3c3357a4","versionType":"git"},{"version":"64ad2abfe9a628ce79859d072704bd1ef7682044","status":"affected","lessThan":"dfe1323ab3c8a4dd5625ebfdba44dc47df84512a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/vmwgfx/vmwgfx_validation.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.20","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.20","versionType":"semver"},{"version":"5.4.301","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.246","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.195","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.157","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.113","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.54","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.4","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/vmwgfx/vmwgfx_validation.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1822e5287b7dfa59d0af966756ebf1dc652b60ee"},{"url":"https://git.kernel.org/stable/c/fb7165e5f3b3b10721ff70553583ad12e90e447a"},{"url":"https://git.kernel.org/stable/c/4c918f9d1ccccc0e092f43dcb2d8266f54d7340b"},{"url":"https://git.kernel.org/stable/c/9a8eaca539708ca532747f606d231f70e684e8ca"},{"url":"https://git.kernel.org/stable/c/867bda5d95d36f10da398fd4409e21c7002b2332"},{"url":"https://git.kernel.org/stable/c/655a2f29bfc21105c80bf8a7d7aafa6eca8b4496"},{"url":"https://git.kernel.org/stable/c/65608e991c2d771c13404e5c7ae122ac3c3357a4"},{"url":"https://git.kernel.org/stable/c/dfe1323ab3c8a4dd5625ebfdba44dc47df84512a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached only through `DRM_IOCTL_VMW_EXECBUF` on the vmwgfx DRM device node, which requires local execution to issue ioctls. There is no network or adjacent-network path into the command-submission validation code.\nAC:L - The attacker controls both sides of the race — one thread loops `vmw_execbuf_ioctl()` over a DX context with bound resources while another destroys a bound view/shader/surface — and the window is widened because `vmw_resource_release()` drops the kref and then blocks on `binding_mutex` that the execbuf walker already holds. The attempt is infinitely repeatable, and a single success permanently poisons the device-global `res_ht`.\nPR:L - `DRM_IOCTL_VMW_EXECBUF` is marked `DRM_RENDER_ALLOW`, so any unprivileged local user holding an fd on `/dev/dri/renderD*` (the default for logged-in desktop users, GPU-enabled containers, and sandboxed GPU processes in VMware guests) can reach it. No capability, DRM master status, or authentication is needed.\nUI:N - The attacking process drives both the execbuf submission and the concurrent resource destruction entirely on its own via ioctls. No action by another user or administrator is required.\nS:U - The corruption is confined to the guest kernel's own memory within the same security authority; no hypervisor, IOMMU, or VM boundary is crossed even though vmwgfx is a paravirtual GPU driver.\nC:H - The stale hlist entry points into a page freed to the buddy allocator, so subsequent `hash_for_each_possible_rcu()` walks read attacker-groomed memory; a matching sprayed `hash->key` yields a fully fabricated `vmw_validation_res_node` whose `private` data is consumed as `struct vmw_ctx_validation_info` pointers, enabling arbitrary kernel memory disclosure.\nI:H - `hash_add_rcu()` writes a kernel pointer into the freed page through the dangling node's `pprev`, and a sprayed fake node supplies attacker-controlled `res`, `ctx`, and binding-state pointers that the binding/validation code dereferences and writes through — a use-after-free with both write and control-flow-hijack primitives.\nA:H - The dangling hash entry survives in the device-global `res_ht` and is traversed by every later execbuf from any process on that device, so a single trigger reliably produces list corruption and oopses/panics affecting the whole system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:07:51.842Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.4.301"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.10.246"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"5.15.195"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.1.157"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.6.113"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.12.54"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.17.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.20","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-40111","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:57:01.164715Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:38.116Z"}}]}}}