{"api_version":"1","generated_at":"2026-11-20T07:29:57+00:00","cve":"CVE-2026-99752","urls":{"html":"https://cve.report/CVE-2026-99752","api":"https://cve.report/api/cve/CVE-2026-99752.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99752","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99752"},"summary":{"title":"drm/loongson: Handle buffer mapping failures when clearing a BO","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/loongson: Handle buffer mapping failures when clearing a BO\n\nlsdc_bo_clear() ignores the return value from lsdc_bo_kmap() and writes\nto lbo->kptr unconditionally. When the first mapping of a newly allocated\nbuffer fails, kptr is still NULL and the subsequent memset accesses it.\n\nReturn the mapping error without touching the buffer and propagate it\nfrom lsdc_gem_object_create(). Install the GEM object functions before\nclearing so that drm_gem_object_put() can release the buffer correctly\non failure. Do not add the failed object to the tracking list or return\nan uncleared buffer to the caller.\n\nImported buffers still skip clearing, and successfully mapped buffers\nare cleared and unmapped as before.\n\nTested on LS7A2000 with a one-shot range error in ttm_bo_kmap(). Its\n-EINVAL return reached userspace, the object was destroyed once, and\nno GEM handle was published. Normal create/map/zero/write/read/close\ncycles passed, with the tracked BO count and VRAM usage unchanged.\n\nAI assistance was used for the lifetime analysis, fix, fault-injection\ntools, build and test execution.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:18:13","updated_at":"2026-11-20 06:18:13"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/389de73fb826e768c73d82c8f9f7e516b3fff70b","name":"https://git.kernel.org/stable/c/389de73fb826e768c73d82c8f9f7e516b3fff70b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/834c2fdf737657c3a16c37b894a6bd07277ff082","name":"https://git.kernel.org/stable/c/834c2fdf737657c3a16c37b894a6bd07277ff082","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/256ca06920504adde310fb5252342e4b827ebcce","name":"https://git.kernel.org/stable/c/256ca06920504adde310fb5252342e4b827ebcce","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f00d7a241f846b053e89c0bb2285ef5988d4cafc","name":"https://git.kernel.org/stable/c/f00d7a241f846b053e89c0bb2285ef5988d4cafc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99752","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99752","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f39db26c54281da6a785259498ca74b5e470476f 389de73fb826e768c73d82c8f9f7e516b3fff70b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f39db26c54281da6a785259498ca74b5e470476f 834c2fdf737657c3a16c37b894a6bd07277ff082 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f39db26c54281da6a785259498ca74b5e470476f 256ca06920504adde310fb5252342e4b827ebcce git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f39db26c54281da6a785259498ca74b5e470476f f00d7a241f846b053e89c0bb2285ef5988d4cafc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.118 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.64 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/gpu/drm/loongson/lsdc_gem.c","drivers/gpu/drm/loongson/lsdc_ttm.c","drivers/gpu/drm/loongson/lsdc_ttm.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"389de73fb826e768c73d82c8f9f7e516b3fff70b","status":"affected","version":"f39db26c54281da6a785259498ca74b5e470476f","versionType":"git"},{"lessThan":"834c2fdf737657c3a16c37b894a6bd07277ff082","status":"affected","version":"f39db26c54281da6a785259498ca74b5e470476f","versionType":"git"},{"lessThan":"256ca06920504adde310fb5252342e4b827ebcce","status":"affected","version":"f39db26c54281da6a785259498ca74b5e470476f","versionType":"git"},{"lessThan":"f00d7a241f846b053e89c0bb2285ef5988d4cafc","status":"affected","version":"f39db26c54281da6a785259498ca74b5e470476f","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/gpu/drm/loongson/lsdc_gem.c","drivers/gpu/drm/loongson/lsdc_ttm.c","drivers/gpu/drm/loongson/lsdc_ttm.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.6"},{"lessThan":"6.6","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.118","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.64","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.118","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.64","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"6.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"6.6","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/loongson: Handle buffer mapping failures when clearing a BO\n\nlsdc_bo_clear() ignores the return value from lsdc_bo_kmap() and writes\nto lbo->kptr unconditionally. When the first mapping of a newly allocated\nbuffer fails, kptr is still NULL and the subsequent memset accesses it.\n\nReturn the mapping error without touching the buffer and propagate it\nfrom lsdc_gem_object_create(). Install the GEM object functions before\nclearing so that drm_gem_object_put() can release the buffer correctly\non failure. Do not add the failed object to the tracking list or return\nan uncleared buffer to the caller.\n\nImported buffers still skip clearing, and successfully mapped buffers\nare cleared and unmapped as before.\n\nTested on LS7A2000 with a one-shot range error in ttm_bo_kmap(). Its\n-EINVAL return reached userspace, the object was destroyed once, and\nno GEM handle was published. Normal create/map/zero/write/read/close\ncycles passed, with the tracked BO count and VRAM usage unchanged.\n\nAI assistance was used for the lifetime analysis, fix, fault-injection\ntools, build and test execution."}],"providerMetadata":{"dateUpdated":"2026-11-20T05:51:22.212Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/389de73fb826e768c73d82c8f9f7e516b3fff70b"},{"url":"https://git.kernel.org/stable/c/834c2fdf737657c3a16c37b894a6bd07277ff082"},{"url":"https://git.kernel.org/stable/c/256ca06920504adde310fb5252342e4b827ebcce"},{"url":"https://git.kernel.org/stable/c/f00d7a241f846b053e89c0bb2285ef5988d4cafc"}],"title":"drm/loongson: Handle buffer mapping failures when clearing a BO","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99752","datePublished":"2026-11-20T05:51:22.212Z","dateReserved":"2026-09-25T10:25:14.432Z","dateUpdated":"2026-11-20T05:51:22.212Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:18:13","lastModifiedDate":"2026-11-20 06:18:13","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99752","Ordinal":"1","Title":"drm/loongson: Handle buffer mapping failures when clearing a BO","CVE":"CVE-2026-99752","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99752","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/loongson: Handle buffer mapping failures when clearing a BO\n\nlsdc_bo_clear() ignores the return value from lsdc_bo_kmap() and writes\nto lbo->kptr unconditionally. When the first mapping of a newly allocated\nbuffer fails, kptr is still NULL and the subsequent memset accesses it.\n\nReturn the mapping error without touching the buffer and propagate it\nfrom lsdc_gem_object_create(). Install the GEM object functions before\nclearing so that drm_gem_object_put() can release the buffer correctly\non failure. Do not add the failed object to the tracking list or return\nan uncleared buffer to the caller.\n\nImported buffers still skip clearing, and successfully mapped buffers\nare cleared and unmapped as before.\n\nTested on LS7A2000 with a one-shot range error in ttm_bo_kmap(). Its\n-EINVAL return reached userspace, the object was destroyed once, and\nno GEM handle was published. Normal create/map/zero/write/read/close\ncycles passed, with the tracked BO count and VRAM usage unchanged.\n\nAI assistance was used for the lifetime analysis, fix, fault-injection\ntools, build and test execution.","Type":"Description","Title":"drm/loongson: Handle buffer mapping failures when clearing a BO"}]}}}