Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2608B27F017 for ; Wed, 18 Jun 2025 10:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244094; cv=none; b=s6yKCcec6dJYMhQwqMvtzXwvXyMvZpNgdRDZd/3dd6ccrNe+pPpVxmlR0bTnc5CbaskHiOPjj9R1a4u9tM7vPGgTYeRoPy3Fcij9ANwkBZeJMmFDnEGBGoeioWNvt/avcom/C2q7Jt2toNQ17nTL0+hlh0goB5LBmdw5hjlHaeI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244094; c=relaxed/simple; bh=j2SAqwOqTmAvRd8wufGMRCrQ0E7QUNwfGA6PMMd1EJk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y1od+GyciHu+v6/5TpKnENa+T6T/G8ydcQTNXtirVzcKiNEYDNahrlofdOobrhkHHYDw6Bu/AtSJKwRFyUl4hqRbDE1eMQWrFWzWy3MtIT9t/7xTj8+lc5GuB9R+MZThMZGaA02CN+RIeXYI6YnZbQfP65x13C/FU5CNrYehUcc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l5oh/qTw; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l5oh/qTw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21891C4CEE7; Wed, 18 Jun 2025 10:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244093; bh=j2SAqwOqTmAvRd8wufGMRCrQ0E7QUNwfGA6PMMd1EJk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=l5oh/qTwHt/V2+WaYtvq/KosvJRwJyxZEcZP/Crw1LdMs5m8llyeImD4WiDVwsr3I UuBVrb6v+EpnePRbV5p0ZvAYsd2MRhGqQqEOklXRc8w1lMMYPx2xdckEsB7GZlSW4p L4IqK+WFX9Ct1GrF1Kv7UpkgGFe2Zxgsnm5Ztwnw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49935: dma-buf/dma-resv: check if the new fence is really later Date: Wed, 18 Jun 2025 12:54:46 +0200 Message-ID: <2025061847-CVE-2022-49935-bf21@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2104; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WOGPkM9Om/sYSpvFr1JVpzqQLqytH+DcTZ9qZL+ASDM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBs76Xl28MecaatSPGMaOr2iywZMMlPrNl3T9TLJ93a c/z/SDdEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABO5M5FhnvVK28Lcyw4r/djm BFVxLRW7zjYxiGGu/JK/WW/fzJDJj3BzvP75Sv7vafEPAQ== 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: dma-buf/dma-resv: check if the new fence is really later Previously when we added a fence to a dma_resv object we always assumed the the newer than all the existing fences. With Jason's work to add an UAPI to explicit export/import that's not necessary the case any more. So without this check we would allow userspace to force the kernel into an use after free error. Since the change is very small and defensive it's probably a good idea to backport this to stable kernels as well just in case others are using the dma_resv object in the same way. The Linux kernel CVE team has assigned CVE-2022-49935 to this issue. Affected and fixed versions =========================== Fixed in 5.19.8 with commit c4c798fe98adceb642050819cb57cbc8f5c27870 Fixed in 6.0 with commit a3f7c10a269d5b77dd5822ade822643ced3057f0 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-2022-49935 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/dma-buf/dma-resv.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/c4c798fe98adceb642050819cb57cbc8f5c27870 https://git.kernel.org/stable/c/a3f7c10a269d5b77dd5822ade822643ced3057f0