{"id":"CVE-2025-38595","published":"2025-08-19T17:03:25Z","modified":"2026-10-30T12:22:06Z","title":"xen: fix UAF in dmabuf_exp_from_pages()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nxen: fix UAF in dmabuf_exp_from_pages()\n\n[dma_buf_fd() fixes; no preferences regarding the tree it goes through -\nup to xen folks]\n\nAs soon as we'd inserted a file reference into descriptor table, another\nthread could close it.  That's fine for the case when all we are doing is\nreturning that descriptor to userland (it's a race, but it's a userland\nrace and there's nothing the kernel can do about it).  However, if we\nfollow fd_install() with any kind of access to objects that would be\ndestroyed on close (be it the struct file itself or anything destroyed\nby its ->release()), we have a UAF.\n\ndma_buf_fd() is a combination of reserving a descriptor and fd_install().\ngntdev dmabuf_exp_from_pages() calls it and then proceeds to access the\nobjects destroyed on close - starting with gntdev_dmabuf itself.\n\nFix that by doing reserving descriptor before anything else and do\nfd_install() only when everything had been set up.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00247,"percentile":0.16289,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/2be49867e68abbeb52d7f5d15eb1216154e2c0a0","tags":[]},{"url":"https://git.kernel.org/stable/c/ba8bc644f168509c16d48444991de7cfea3f12ec","tags":[]},{"url":"https://git.kernel.org/stable/c/e5907885260401bba300d4d18d79875c05b82651","tags":[]},{"url":"https://git.kernel.org/stable/c/3edfd2353f301bfffd5ee41066e37320a59ccc2d","tags":[]},{"url":"https://git.kernel.org/stable/c/d59d49af4aeed9a81e673e37c26c6a3bacf1a181","tags":[]},{"url":"https://git.kernel.org/stable/c/532c8b51b3a8676cbf533a291f8156774f30ea87","tags":[]}],"priority":{"score":8.7,"factors":[{"name":"EPSS percentile","points":3.26},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < 2be49867e68abbeb52d7f5d15eb1216154e2c0a0",">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < ba8bc644f168509c16d48444991de7cfea3f12ec",">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < e5907885260401bba300d4d18d79875c05b82651",">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < 3edfd2353f301bfffd5ee41066e37320a59ccc2d",">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < d59d49af4aeed9a81e673e37c26c6a3bacf1a181",">= a240d6e42e28c34fdc34b3a98ca838a31c939901, < 532c8b51b3a8676cbf533a291f8156774f30ea87"]},{"vendor":"Linux","product":"Linux","versions":["4.19"]}],"euvd":{"id":"EUVD-2025-27924","exploited":false,"provenance":"source"}}