From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C7AB35BDA8 for ; Sat, 15 Aug 2026 06:13:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786774389; cv=none; b=uPY8YtVO+b4rqSnzXP6OftAShQ8E7rZmx6h7jbodoVToYqjZLhcQId+ds9qhNMJgwF2PE0fbCu+2qiaI5wNwa6Sc1JNkHaMwI53C7qORpvHbfJJD+UG2FiNSUM16v21HFK2DZp1iIx3lscmWWMIhZwIYrGGoLAFCmjnl24pAEFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786774389; c=relaxed/simple; bh=R2X4C3hubGpmNYfBK4h6fjJ1mSk7HufzmHp4S9sUuhk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cz9vzQ0F9gb98fN5yAnfXbgItzw7+tHeJhTuyS7XOQUaZj8mABsuEuUZjF9/QGLBP3B391iludsmc354lwaTBONLjCAEGRa8dONQz6nULA/K4Mel+2+ssSZ4LQr0+nPRyOcZy9Elf3Kmg8R2ADClWDiI3UlGUUY+Q0iCvzRI2gU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JxY4wu9H; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JxY4wu9H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2549A1F000E9; Sat, 15 Aug 2026 06:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786774387; bh=l2xNFSOCaGtblIzgLLhcaSmv3aNj8kpzUbMtic77ozg=; h=From:To:Cc:Subject:Date:Reply-To; b=JxY4wu9HAxH4djDpiMI1KIn5rfBvwBiNaI+TdGluTV0vS7Mlu+YDZ1iPSoOtTQRDk hylBp2jcyuFdLuErXY+vhtCmdxnUtvtB3hPRBLzbuPPwm9ZZcRP1Z4thgE+dWZAgNB ipPC8Ga0qve2X+RIGajW+2xu/xRQFsAD7FBQz4Jw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-72138: xen/gntdev: fix error handling in ioctl Date: Sat, 15 Aug 2026 15:03:37 +0900 Message-ID: <2026081531-CVE-2026-72138-5d33@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3957; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=q+l5NT1mB2/5KZS4e8ohSscP8m0oA+FiqxlLrI47pIU=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNDLvfvX926Pg8D6OnV3f+b550S/Hn/DmTl0756uoex j81xPaicEcsC4MgE4OsmCLLl208R/dXHFL0MrQ9DTOHlQlkCAMXpwBMZOENhgVX/3Y9m/JGICpI 5cHKfye/lXVcmBPEMD/q2dF1sT8/2S4/LrHmvNDri0t82FUA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: xen/gntdev: fix error handling in ioctl When gntdev_ioctl_map_grant_ref() fails to copy the operation result back to userspace after successfully adding the mapping to the list, the error path returns -EFAULT without releasing the reference acquired by gntdev_alloc_map(). The mapping remains in priv->maps with a refcount of 1, causing a memory leak and a dangling list entry. Additionally, gntdev_add_map() may modify map->index to avoid overlap with existing mappings. Therefore, the index returned to userspace must be obtained after gntdev_add_map() completes. Fix this by holding the mutex across gntdev_add_map(), retrieving the correct index, and copy_to_user(). If copy_to_user() fails, remove the mapping from the list and release the reference while still holding the lock. Fix these issues by properly handling all error cases. The Linux kernel CVE team has assigned CVE-2026-72138 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 5.10.261 with commit 52dc40ef0cfee6ae89b7524967e73f0ba37906d7 Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 5.15.212 with commit 1dd9cb98fe228e017fff9efb33862ff38c741b65 Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 6.1.178 with commit 6df926130aee6cab9b5d2e5b7862e49ccac348dc Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 6.6.145 with commit 311011f8cc206c5af2877b03e3f627ee1b8fe024 Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 6.12.97 with commit 18a693733f7ad004e1ab0466693121ca70cd95dd Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 6.18.40 with commit 16d3ccdabb8dee9be2cdcd6d3f9a125572ec0454 Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 7.1.5 with commit 6883269a323609f68f6faa903f8f8ff3d191cec8 Issue introduced in 2.6.39 with commit 68b025c813c2eb41ff25628e3d4952d5185eb1a4 and fixed in 7.2-rc2 with commit 45ca1afe2fd14c04e37227e79d3f8455831d8408 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-72138 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/xen/gntdev.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/52dc40ef0cfee6ae89b7524967e73f0ba37906d7 https://git.kernel.org/stable/c/1dd9cb98fe228e017fff9efb33862ff38c741b65 https://git.kernel.org/stable/c/6df926130aee6cab9b5d2e5b7862e49ccac348dc https://git.kernel.org/stable/c/311011f8cc206c5af2877b03e3f627ee1b8fe024 https://git.kernel.org/stable/c/18a693733f7ad004e1ab0466693121ca70cd95dd https://git.kernel.org/stable/c/16d3ccdabb8dee9be2cdcd6d3f9a125572ec0454 https://git.kernel.org/stable/c/6883269a323609f68f6faa903f8f8ff3d191cec8 https://git.kernel.org/stable/c/45ca1afe2fd14c04e37227e79d3f8455831d8408