CVE-2026-99752

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

State
Published
Severity
Not scored
Published
Nov 20, 2026
Updated
Nov 20, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • f39db26c54281da6a785259498ca74b5e470476f to before 389de73fb826e768c73d82c8f9f7e516b3fff70bAffected
  • f39db26c54281da6a785259498ca74b5e470476f to before 834c2fdf737657c3a16c37b894a6bd07277ff082Affected
  • f39db26c54281da6a785259498ca74b5e470476f to before 256ca06920504adde310fb5252342e4b827ebcceAffected
  • f39db26c54281da6a785259498ca74b5e470476f to before f00d7a241f846b053e89c0bb2285ef5988d4cafcAffected
LinuxLinux
  • 6.6Affected
  • before 6.6Not affected
  • 6.12.118 through 6.12.*Not affected
  • 6.18.64 through 6.18.*Not affected
  • 7.3.5 through 7.3.*Not affected
  • 7.4-rc2 and laterNot affected

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.