Skip to content
CVE PROGRAM SOURCE RECORD5.5 Medium

CVE-2022-49137

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

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.

Affected products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Linux Linux

Default version status: unaffected

  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < 72d77ddb2224ebc00648f4f78f8a9a259dccbdf7affected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < 4009f104b02b223d1a11d74b36b1cc083bc37028affected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < 927beb05aaa429c883cc0ec6adc48964b187e291affected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < 3edd8646cb7c11b57c90e026bda6f21076223f5baffected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < b6d1f7d97c81ebaf2cda9c4c943ee2e484fffdcfaffected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < bc2d5c0775c839e2b072884f4ee6a93ba410f107affected
  • 7ca24cf2d2269bde25e21c02a77fe81995a081ae to < dfced44f122c500004a48ecc8db516bb6a295a1baffected

Linux Linux

Default version status: affected

  • 4.15affected
  • 0 to < 4.15unaffected
  • 4.19.238 to ≤ 4.19.*unaffected
  • 5.4.189 to ≤ 5.4.*unaffected
  • 5.10.111 to ≤ 5.10.*unaffected
  • 5.15.34 to ≤ 5.15.*unaffected
  • 5.16.20 to ≤ 5.16.*unaffected
  • 5.17.3 to ≤ 5.17.*unaffected
  • 5.18 to ≤ *unaffected

References