-

CVE-2026-99752

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

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.
Daten sind bereitgestellt durch das CVE Programm von einer CVE Numbering Authority (CNA) (Unstrukturiert).
HerstellerLinux
≫
Produkt Linux
Default Statusunaffected
Version f39db26c54281da6a785259498ca74b5e470476f
Version < 344a998475ef96b8640516f21b194fbf3b31063d
Status affected
Version f39db26c54281da6a785259498ca74b5e470476f
Version < 389de73fb826e768c73d82c8f9f7e516b3fff70b
Status affected
Version f39db26c54281da6a785259498ca74b5e470476f
Version < 834c2fdf737657c3a16c37b894a6bd07277ff082
Status affected
Version f39db26c54281da6a785259498ca74b5e470476f
Version < 256ca06920504adde310fb5252342e4b827ebcce
Status affected
Version f39db26c54281da6a785259498ca74b5e470476f
Version < f00d7a241f846b053e89c0bb2285ef5988d4cafc
Status affected
HerstellerLinux
≫
Produkt Linux
Default Statusaffected
Version 6.6
Status affected
Version 0
Version < 6.6
Status unaffected
Version <= 6.6.*
Version 6.6.163
Status unaffected
Version <= 6.12.*
Version 6.12.118
Status unaffected
Version <= 6.18.*
Version 6.18.64
Status unaffected
Version <= 7.3.*
Version 7.3.5
Status unaffected
Version <= *
Version 7.4-rc2
Status unaffected
VulnDex Vulnerability Enrichment
Diese Information steht angemeldeten Benutzern zur Verfügung. Login Login
Zu dieser CVE wurde keine Warnung gefunden.
EPSS Metriken
Typ Quelle Score Percentile
EPSS FIRST.org 0.2% 0.094
CVSS Metriken
Quelle Base Score Exploit Score Impact Score Vector String
Es wurden noch keine Informationen zu CWE veröffentlicht.
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
https://git.kernel.org/stable/c/344a998475ef96b8640516f21b194fbf3b31063d