Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154466; b=TFQLLyrJrKGEWqstD24ofV1PfsVB29bope8yj/RIqePPTEN8d8ctXik67n+ykoDihqW2 teIJ9A44Tg8Ni0O6dk1zLaYkok0P93GukcgWHco7Epp9779FE7F1reCwoPfZJ5WfEWakm VDG0lJ2W/4DaylAYeVdKeyLIWB6bzQF/d6pTiQgX+w6xDbu4YM84+fmN/CtCUaKIb9yht rKlXF7d8NKI8l9jsJ2bUaoje8bYEygfUjOk3hfiWkcPIwPRaUjw36WuY8Y+lUrlPOLiFj kE1X4LfVk2QoCx9exHFxQwMQ++PW1ccIE1sDk8lzzfcE6vH/3lSrwFXbjTTojzSeocA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154466; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=i/AAAluGaGZJ0bGU+O1xxaaOv0MFLL8EejzvZ8cwuaE=; b=s92f10LfML6U6uZA+szvxk3XvsaCa0X7e6ao2W+3X2UHLtOo39BdvTa7b4ciXwtiPPXu Du745Tz6J8GCMwFaP1d1XbnYqCR4LzNEuMY2Nox9GOMHNr5YF4Vfx/kc2NwfYH7QW0aH9 3ZpQBMV8aXdQojXXMgiVJXbwPBK80czte3HpAXu1YgnXFaM/WJv62ofODm8pGonw3D03h Q6iyoUncN6JMSi9Eg8B5v4/SAC+9Oosa/tqddqZ8D9UGRoaVexbUAldOj6i7zGEQymc8/ jT0kXgdbe3U5ozkXDq6URwa/nX+KMVA7U4I3urcZ5QgUMcfXmxfKCMUvPUuPcv9io8w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=wD5eizXg; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DD53606A339 for ; Fri, 20 Nov 2026 06:01:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=wD5eizXg Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5070D1F000C6; Fri, 20 Nov 2026 06:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154465; bh=i/AAAluGaGZJ0bGU+O1xxaaOv0MFLL8EejzvZ8cwuaE=; h=From:To:Cc:Subject:Date:Reply-To; b=wD5eizXgqMk731hHe/kmWDdbMpjkOwp0iQatcZtdhE/w4IVWM00a+q3KWtiJh7HUS BeeIeuVN3hXXWm/HXGhFBl7eriUb0/dCqWquUWC9Sr+mc7LBgbWC9Z4rvF7KO2VB3s kM9uD0SRCeOkO8Hj9x3a3c/KZ7mY1adwqAm9sn64= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99752: drm/loongson: Handle buffer mapping failures when clearing a BO Date: Fri, 20 Nov 2026 06:52:18 +0100 Message-ID: <2026112021-CVE-2026-99752-3354@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3358; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jYX2f1ILvEvBXcBqiDX0cZGgyaUMyj/OuznrMLxDG/I=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/7899Ixhf4B7HwuA19YNq2wl7Hb2V04xO32cLSTLcZ imavXhGRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkVxXDgpVdZj1azcFvBLYt nC4VrpqWMb/SlWEmo8sT9Sjj28qZB7Rnv5YWOdU3aUoIAA== 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: drm/loongson: Handle buffer mapping failures when clearing a BO lsdc_bo_clear() ignores the return value from lsdc_bo_kmap() and writes to lbo->kptr unconditionally. When the first mapping of a newly allocated buffer fails, kptr is still NULL and the subsequent memset accesses it. Return the mapping error without touching the buffer and propagate it from lsdc_gem_object_create(). Install the GEM object functions before clearing so that drm_gem_object_put() can release the buffer correctly on failure. Do not add the failed object to the tracking list or return an uncleared buffer to the caller. Imported buffers still skip clearing, and successfully mapped buffers are cleared and unmapped as before. Tested on LS7A2000 with a one-shot range error in ttm_bo_kmap(). Its -EINVAL return reached userspace, the object was destroyed once, and no GEM handle was published. Normal create/map/zero/write/read/close cycles passed, with the tracked BO count and VRAM usage unchanged. AI assistance was used for the lifetime analysis, fix, fault-injection tools, build and test execution. The Linux kernel CVE team has assigned CVE-2026-99752 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit f39db26c54281da6a785259498ca74b5e470476f and fixed in 6.12.118 with commit 389de73fb826e768c73d82c8f9f7e516b3fff70b Issue introduced in 6.6 with commit f39db26c54281da6a785259498ca74b5e470476f and fixed in 6.18.64 with commit 834c2fdf737657c3a16c37b894a6bd07277ff082 Issue introduced in 6.6 with commit f39db26c54281da6a785259498ca74b5e470476f and fixed in 7.3.5 with commit 256ca06920504adde310fb5252342e4b827ebcce Issue introduced in 6.6 with commit f39db26c54281da6a785259498ca74b5e470476f and fixed in 7.4-rc2 with commit f00d7a241f846b053e89c0bb2285ef5988d4cafc 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-99752 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/loongson/lsdc_gem.c drivers/gpu/drm/loongson/lsdc_ttm.c drivers/gpu/drm/loongson/lsdc_ttm.h 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/389de73fb826e768c73d82c8f9f7e516b3fff70b https://git.kernel.org/stable/c/834c2fdf737657c3a16c37b894a6bd07277ff082 https://git.kernel.org/stable/c/256ca06920504adde310fb5252342e4b827ebcce https://git.kernel.org/stable/c/f00d7a241f846b053e89c0bb2285ef5988d4cafc