Skip to content
Heist/ feed
Back to feed
MediumFix available

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

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.238, 5.10.111, 5.15.34, 5.16.20, 5.17.3, 5.4.189
CVEs
CVE-2022-49137
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 15:27 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 26 Feb 2025, 01:55 UTC

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.

osv:CVE-2022-49137

Kernel

Fixed versions: 4.19.238, 5.4.189, 5.10.111, 5.15.34, 5.16.20, 5.17.3

Complete source record
{
  "id": "667d2bacd513c255a74af317e7c011404fc88697455e5e43383dc8975828fec9",
  "url": "https://osv.dev/vulnerability/CVE-2022-49137",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj",
    "summary": "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.",
    "evidence": "osv:CVE-2022-49137",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.238",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.189",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.111",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.34",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.16.20",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.17.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-49137",
      "aliases": [
        "CVE-2022-49137"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "7ca24cf2d2269bde25e21c02a77fe81995a081ae"
                },
                {
                  "fixed": "72d77ddb2224ebc00648f4f78f8a9a259dccbdf7"
                },
                {
                  "fixed": "4009f104b02b223d1a11d74b36b1cc083bc37028"
                },
                {
                  "fixed": "927beb05aaa429c883cc0ec6adc48964b187e291"
                },
                {
                  "fixed": "3edd8646cb7c11b57c90e026bda6f21076223f5b"
                },
                {
                  "fixed": "b6d1f7d97c81ebaf2cda9c4c943ee2e484fffdcf"
                },
                {
                  "fixed": "bc2d5c0775c839e2b072884f4ee6a93ba410f107"
                },
                {
                  "fixed": "dfced44f122c500004a48ecc8db516bb6a295a1b"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49137.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.238"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.189"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.111"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.34"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.16.20"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.17.0"
                },
                {
                  "fixed": "5.17.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49137.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:20.649388462Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/3edd8646cb7c11b57c90e026bda6f21076223f5b",
        "https://git.kernel.org/stable/c/4009f104b02b223d1a11d74b36b1cc083bc37028",
        "https://git.kernel.org/stable/c/72d77ddb2224ebc00648f4f78f8a9a259dccbdf7",
        "https://git.kernel.org/stable/c/927beb05aaa429c883cc0ec6adc48964b187e291",
        "https://git.kernel.org/stable/c/b6d1f7d97c81ebaf2cda9c4c943ee2e484fffdcf",
        "https://git.kernel.org/stable/c/bc2d5c0775c839e2b072884f4ee6a93ba410f107",
        "https://git.kernel.org/stable/c/dfced44f122c500004a48ecc8db516bb6a295a1b",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49137.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49137",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49137.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49137",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 486498,
  "published_at": "2025-02-26T01:55:10.03+00:00"
}