drm/loongson: Fix double free on BO initialization failure
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: drm/loongson: Fix double free on BO initialization failure If ttm_bo_init_validate() fails, it drops the buffer object's reference and cleans it up through the supplied destroy callback. lsdc_bo_destroy() releases the GEM object and frees the enclosing lsdc_bo, so freeing it again in lsdc_bo_create() causes a double free on a synchronous failure path. Let TTM own the cleanup after initialization has started and return the error directly. Keep the explicit free on drm_gem_object_init() failure, which occurs before ownership is passed to TTM. Tested on LS7A2000 by making drm_vma_offset_add() return -ENOSPC for one selected dumb-buffer creation. The error reached userspace, the destroy callback ran once, and no handle was published or tracked BO retained. Normal buffer creation, zeroing, mapping, readback and release passed. AI assistance was used for the ownership analysis, fix, fault-injection tools, build and test execution.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from f39db26c54281da6a785259498ca74b5e470476f, before 683aa6e8d8dfd0c6b07a1ccdb99b5cfe179deb38; from f39db26c54281da6a785259498ca74b5e470476f, before 6ad25544f1dd24ac512e4d03b5613f4d6d40576d; from f39db26c54281da6a785259498ca74b5e470476f, before dd76e36520a9553a4416412aa114217541218f97; from f39db26c54281da6a785259498ca74b5e470476f, before c8da4789c0c916fed4d546a2b07423151e5f9d59; from f39db26c54281da6a785259498ca74b5e470476f, before f086dbdeb6e56510e158a853d752c6d8ed9e0674 | 683aa6e8d8dfd0c6b07a1ccdb99b5cfe179deb38; 6ad25544f1dd24ac512e4d03b5613f4d6d40576d; dd76e36520a9553a4416412aa114217541218f97; c8da4789c0c916fed4d546a2b07423151e5f9d59 |
| Linux Linux | Software | 6.6 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | Low | The attacker needs an ordinary user account. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 5 sources for this flaw, none tagged as a vendor patch.