AZL-115645: CVE-2026-99752 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
drm/loongson: Handle buffer mapping failures when clearing a BO
lsdcboclear() ignores the return value from lsdcbokmap() 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 lsdcgemobjectcreate(). Install the GEM object functions before clearing so that drmgemobjectput() 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 ttmbokmap(). 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In lsdc_bo_clear(), check the return value from lsdc_bo_kmap(); on failure, return the mapping error without touching the buffer, propagate the error from lsdc_gem_object_create(), and do not add the failed object to the tracking list.
- Compensating control
Install the GEM object functions before clearing the buffer so drm_gem_object_put() can release it correctly if clearing fails.