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 F2C4725B1D3 for ; Fri, 22 Aug 2025 16:04:22 +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=1755878663; cv=none; b=IOcBYk1lkjD5vCpPx+CPk6STkzTP5TODnppeluKcS398xpMvUn9yT/BuJKao+MuCcEfZfiUfp5G12u8sypuD6KUiV6R8beW4ICSAtCd5G/R79cYLNzMJ8knFTyARXB8V5OchPvWTkk2J6ZU8xv0xJfEfUMITeIeXvVUUc12WWxI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755878663; c=relaxed/simple; bh=2+ojGidIEDM+/6b8gbntA+5LCoaLFronnyHygOc11Ac=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BGXdzQZiATOc0fkC35gRhRuImuAaSMH32SVtALpQrtINh+QSCvaeCyhV1a4Nlk9z207IUQ62j3h5cuGvFpatAMURqzpKN/kF2XRNaxMJKp9dJzomqSf2Aeu9SHb+x3HccZ2eu08snuZSPHguOZtschZrosgNNb0uiq6k+t+jf1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MA11H21f; 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="MA11H21f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 170D0C4CEED; Fri, 22 Aug 2025 16:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755878662; bh=2+ojGidIEDM+/6b8gbntA+5LCoaLFronnyHygOc11Ac=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MA11H21frI5/KSwaAzNYo5NjHv86gVRAeje0Ndi0YzzeV8pA3ldyeNTGxTOEpZTzK 1rQ5UlYJ+p1fFRbnap6FDVVcbFJEl2EdpTGcjWKTvXhtUO7AKPK/a7N8abMWs/t7Nx vtTOCZ5iiO2tCLdG4xrpDsCOhIrwL/3+hdrffYCI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38674: Revert "drm/prime: Use dma_buf from GEM object instance" Date: Fri, 22 Aug 2025 18:03:11 +0200 Message-ID: <2025082202-CVE-2025-38674-58f1@gregkh> X-Mailer: git-send-email 2.50.1 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=2460; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3AHbWMXoF3gWZGafQ/sPCbwMk+PlIxr0U5wOd5feQLc=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkrpmw7ra/eUtn1TjSzNNm/et2yv2cl4+a0Re6Mu2/cG +jldOZkRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzEoZBhrqQ784W9YRs+TApL KYxdz5atcCvSmmHBqriMCc8OzLqir1vyle9oYl69oggbAA== 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: Revert "drm/prime: Use dma_buf from GEM object instance" This reverts commit f83a9b8c7fd0557b0c50784bfdc1bbe9140c9bf8. The dma_buf field in struct drm_gem_object is not stable over the object instance's lifetime. The field becomes NULL when user space releases the final GEM handle on the buffer object. This resulted in a NULL-pointer deref. Workarounds in commit 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers") and commit f6bfc9afc751 ("drm/framebuffer: Acquire internal references on GEM handles") only solved the problem partially. They especially don't work for buffer objects without a DRM framebuffer associated. Hence, this revert to going back to using .import_attach->dmabuf. v3: - cc stable The Linux kernel CVE team has assigned CVE-2025-38674 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit f83a9b8c7fd0557b0c50784bfdc1bbe9140c9bf8 and fixed in 6.15.9 with commit 5f05d83ce689a8930a70dfa73f879604aef8cc03 Issue introduced in 6.15 with commit f83a9b8c7fd0557b0c50784bfdc1bbe9140c9bf8 and fixed in 6.16 with commit fb4ef4a52b79a22ad382bfe77332642d02aef773 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-2025-38674 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/gpu/drm/drm_prime.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/5f05d83ce689a8930a70dfa73f879604aef8cc03 https://git.kernel.org/stable/c/fb4ef4a52b79a22ad382bfe77332642d02aef773