CVE-2024-46850 (GCVE-0-2024-46850)
Vulnerability from cvelistv5
Published
2024-09-27 12:42
Modified
2026-08-05 11:38
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct() dc_state_destruct() nulls the resource context of the DC state. The pipe context passed to dcn35_set_drr() is a member of this resource context. If dc_state_destruct() is called parallel to the IRQ processing (which calls dcn35_set_drr() at some point), we can end up using already nulled function callback fields of struct stream_resource. The logic in dcn35_set_drr() already tries to avoid this, by checking tg against NULL. But if the nulling happens exactly after the NULL check and before the next access, then we get a race. Avoid this by copying tg first to a local variable, and then use this variable for all the operations. This should work, as long as nobody frees the resource pool where the timing generators live. (cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5)
Impacted products
Vendor Product Version
Linux Linux Version: 06ad7e16425619a4a77154c2e85bededb3e04a4f
Version: 06ad7e16425619a4a77154c2e85bededb3e04a4f
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-46850",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-29T13:58:36.447027Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-29T13:58:40.768Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "42850927656a540428e58d370b3c1599a617bac7",
              "status": "affected",
              "version": "06ad7e16425619a4a77154c2e85bededb3e04a4f",
              "versionType": "git"
            },
            {
              "lessThan": "e835d5144f5ef78e4f8828c63e2f0d61144f283a",
              "status": "affected",
              "version": "06ad7e16425619a4a77154c2e85bededb3e04a4f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.11",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10.11",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()\n\ndc_state_destruct() nulls the resource context of the DC state. The pipe\ncontext passed to dcn35_set_drr() is a member of this resource context.\n\nIf dc_state_destruct() is called parallel to the IRQ processing (which\ncalls dcn35_set_drr() at some point), we can end up using already nulled\nfunction callback fields of struct stream_resource.\n\nThe logic in dcn35_set_drr() already tries to avoid this, by checking tg\nagainst NULL. But if the nulling happens exactly after the NULL check and\nbefore the next access, then we get a race.\n\nAvoid this by copying tg first to a local variable, and then use this\nvariable for all the operations. This should work, as long as nobody\nfrees the resource pool where the timing generators live.\n\n(cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5)"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable path is reached through the local DRM device node (/dev/dri/cardN) via DRM_IOCTL_MODE_ATOMIC commits and the resulting display interrupt processing on the amdgpu DCN3.5 display engine. There is no network-facing component.\nAC:L - The attacker drives both sides of the race: atomic commits/suspend requests trigger dc_state_destruct() on demand, while the vblank/vupdate IRQ invokes dcn35_set_drr() tens to hundreds of times per second once VRR is enabled, so the window can be retried indefinitely until hit. The bug is in fact reported to occur spontaneously during normal suspend/modeset activity (freedesktop issue 3142).\nPR:L - An ordinary unprivileged local user in a graphical session (or any user with seat/video-group access to the card node) holds DRM master and can set the VRR_ENABLED property, submit atomic modesets, and request suspend via logind. No root or CAP_SYS_ADMIN is needed.\nUI:N - The attacker performs the modesets, FreeSync range changes, and state teardown entirely on its own. No action by any other user is required.\nS:U - The corruption and its consequences are confined to the kernel\u0027s own memory and the amdgpu display hardware within the same security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - dc_state_destruct() kfree()s the dc_stream_state before zeroing res_ctx, so dcn35_set_drr() can dereference a freed object via pipe_ctx[i]-\u003estream-\u003ectx-\u003edc and then read dc-\u003edebug/dc-\u003ecaps/dc-\u003econfig through a pointer sourced from freed slab memory. An attacker who reclaims that object with sprayed data obtains a controlled-address read primitive.\nI:H - The same use-after-free lets attacker-reclaimed heap contents supply the dc pointer and control the branch taken and the num_frames value programmed into the OTG static-screen-control register, and UAF of a large driver object is a well-established basis for heap-spray-driven write/control-flow primitives.\nA:H - The common outcome is a NULL function-pointer dereference on tg-\u003efuncs-\u003eset_drr (or on stream-\u003etiming) inside a hard IRQ handler under event_lock, which the kernel escalates to \"Fatal exception in interrupt\" \u2014 a full system panic rather than a killed task."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:38:59.980Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/42850927656a540428e58d370b3c1599a617bac7"
        },
        {
          "url": "https://git.kernel.org/stable/c/e835d5144f5ef78e4f8828c63e2f0d61144f283a"
        }
      ],
      "title": "drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-46850",
    "datePublished": "2024-09-27T12:42:43.967Z",
    "dateReserved": "2024-09-11T15:12:18.290Z",
    "dateUpdated": "2026-08-05T11:38:59.980Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-46850\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-29T13:58:36.447027Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-29T13:58:37.712Z\"}}], \"cna\": {\"title\": \"drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"06ad7e16425619a4a77154c2e85bededb3e04a4f\", \"lessThan\": \"42850927656a540428e58d370b3c1599a617bac7\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"06ad7e16425619a4a77154c2e85bededb3e04a4f\", \"lessThan\": \"e835d5144f5ef78e4f8828c63e2f0d61144f283a\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.7\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.7\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.10.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/42850927656a540428e58d370b3c1599a617bac7\"}, {\"url\": \"https://git.kernel.org/stable/c/e835d5144f5ef78e4f8828c63e2f0d61144f283a\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndrm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()\\n\\ndc_state_destruct() nulls the resource context of the DC state. The pipe\\ncontext passed to dcn35_set_drr() is a member of this resource context.\\n\\nIf dc_state_destruct() is called parallel to the IRQ processing (which\\ncalls dcn35_set_drr() at some point), we can end up using already nulled\\nfunction callback fields of struct stream_resource.\\n\\nThe logic in dcn35_set_drr() already tries to avoid this, by checking tg\\nagainst NULL. But if the nulling happens exactly after the NULL check and\\nbefore the next access, then we get a race.\\n\\nAvoid this by copying tg first to a local variable, and then use this\\nvariable for all the operations. This should work, as long as nobody\\nfrees the resource pool where the timing generators live.\\n\\n(cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5)\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.10.11\", \"versionStartIncluding\": \"6.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.11\", \"versionStartIncluding\": \"6.7\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T09:35:54.764Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-46850\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-05-04T09:35:54.764Z\", \"dateReserved\": \"2024-09-11T15:12:18.290Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-09-27T12:42:43.967Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…