drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj (Linux Linux)

CVE-2022-49137
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.27 % · percentile 19 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Modified

Description

In the Linux kernel, the following vulnerability has been resolved: drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj This issue takes place in an error path in amdgpu_cs_fence_to_handle_ioctl(). When `info->in.what` falls into default case, the function simply returns -EINVAL, forgetting to decrement the reference count of a dma_fence obj, which is bumped earlier by amdgpu_cs_get_fence(). This may result in reference count leaks. Fix it by decreasing the refcount of specific object before returning the error code.

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < 72d77ddb2224ebc00648f4f78f8a9a259dccbdf7 ; affected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < 4009f104b02b223d1a11d74b36b1cc083bc37028 ; affected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < 927beb05aaa429c883cc0ec6adc48964b187e291 ; affected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < 3edd8646cb7c11b57c90e026bda6f21076223f5b ; affected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < b6d1f7d97c81ebaf2cda9c4c943ee2e484fffdcf ; affected 7ca24cf2d2269bde25e21c02a77fe81995a081ae < bc2d5c0775c839e2b072884f4ee6a93ba410f107
Linux · Linuxaffected 4.15 ; unaffected 0 < 4.15 ; unaffected 4.19.238 ≤ 4.19.* ; unaffected 5.4.189 ≤ 5.4.* ; unaffected 5.10.111 ≤ 5.10.* ; unaffected 5.15.34 ≤ 5.15.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD