drm/loongson: Handle buffer mapping failures when clearing a BO

Summary

CVECVE-2026-99752
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-11-20 06:18:13 UTC
Updated2026-11-20 06:18:13 UTC
DescriptionIn 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.

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected f39db26c54281da6a785259498ca74b5e470476f 389de73fb826e768c73d82c8f9f7e516b3fff70b git Not specified
CNA Linux Linux affected f39db26c54281da6a785259498ca74b5e470476f 834c2fdf737657c3a16c37b894a6bd07277ff082 git Not specified
CNA Linux Linux affected f39db26c54281da6a785259498ca74b5e470476f 256ca06920504adde310fb5252342e4b827ebcce git Not specified
CNA Linux Linux affected f39db26c54281da6a785259498ca74b5e470476f f00d7a241f846b053e89c0bb2285ef5988d4cafc git Not specified
CNA Linux Linux affected 6.6 Not specified
CNA Linux Linux unaffected 6.6 semver Not specified
CNA Linux Linux unaffected 6.12.118 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.64 6.18.* semver Not specified
CNA Linux Linux unaffected 7.3.5 7.3.* semver Not specified
CNA Linux Linux unaffected 7.4-rc2 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/389de73fb826e768c73d82c8f9f7e516b3fff70b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/834c2fdf737657c3a16c37b894a6bd07277ff082 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/256ca06920504adde310fb5252342e4b827ebcce 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/f00d7a241f846b053e89c0bb2285ef5988d4cafc 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report