{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-38595","id":"CVE-2025-38595","title":"xen: fix UAF in dmabuf_exp_from_pages()","description":"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, ","descriptionLong":"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.","published":"2025-08-19T17:03:25.527Z","updated":"2026-11-01T02:30:26.581006034Z","reserved":"2025-04-16T04:51:24.028Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"2be49867e68abbeb52d7f5d15eb1216154e2c0a0","status":"affected","versionType":"git"},{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"ba8bc644f168509c16d48444991de7cfea3f12ec","status":"affected","versionType":"git"},{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"e5907885260401bba300d4d18d79875c05b82651","status":"affected","versionType":"git"},{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"3edfd2353f301bfffd5ee41066e37320a59ccc2d","status":"affected","versionType":"git"},{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"d59d49af4aeed9a81e673e37c26c6a3bacf1a181","status":"affected","versionType":"git"},{"version":"a240d6e42e28c34fdc34b3a98ca838a31c939901","lessThan":"532c8b51b3a8676cbf533a291f8156774f30ea87","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","lessThan":"4.19","status":"unaffected","versionType":"semver"},{"version":"6.1.191","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.160","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.42","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.15.10","lessThanOrEqual":"6.15.*","status":"unaffected","versionType":"semver"},{"version":"6.16.1","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/2be49867e68abbeb52d7f5d15eb1216154e2c0a0","tags":["web"]},{"url":"https://git.kernel.org/stable/c/ba8bc644f168509c16d48444991de7cfea3f12ec","tags":["web"]},{"url":"https://git.kernel.org/stable/c/e5907885260401bba300d4d18d79875c05b82651","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3edfd2353f301bfffd5ee41066e37320a59ccc2d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d59d49af4aeed9a81e673e37c26c6a3bacf1a181","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/532c8b51b3a8676cbf533a291f8156774f30ea87","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38595.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38595","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.0023,"epssPercentile":0.13952,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-38595","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38595","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-38595","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-38595","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}