CVE-2025-40148 (GCVE-0-2025-40148)

Vulnerability from cvelistv5 – Published: 2025-11-12 10:23 – Updated: 2026-05-11 21:43
VLAI
Title
drm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions
Summary
In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions The function dc_stream_set_cursor_attributes() currently dereferences the `stream` pointer and nested members `stream->ctx->dc->current_state` without checking for NULL. All callers of these functions, such as in `dcn30_apply_idle_power_optimizations()` and `amdgpu_dm_plane_handle_cursor_update()`, already perform NULL checks before calling these functions. Fixes below: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:336 dc_stream_program_cursor_attributes() error: we previously assumed 'stream' could be null (see line 334) drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c 327 bool dc_stream_program_cursor_attributes( 328 struct dc_stream_state *stream, 329 const struct dc_cursor_attributes *attributes) 330 { 331 struct dc *dc; 332 bool reset_idle_optimizations = false; 333 334 dc = stream ? stream->ctx->dc : NULL; ^^^^^^ The old code assumed stream could be NULL. 335 --> 336 if (dc_stream_set_cursor_attributes(stream, attributes)) { ^^^^^^ The refactor added an unchecked dereference. drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c 313 bool dc_stream_set_cursor_attributes( 314 struct dc_stream_state *stream, 315 const struct dc_cursor_attributes *attributes) 316 { 317 bool result = false; 318 319 if (dc_stream_check_cursor_attributes(stream, stream->ctx->dc->current_state, attributes)) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here. This function used to check for if stream as NULL and return false at the start. Probably we should add that back.
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6641 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 4465dd0e41e8223a46a41ce4fcdfc55fabd319d8 , < 01e793e7d4d402c473f1a61ca5824f086693be65 (git)
Affected: 4465dd0e41e8223a46a41ce4fcdfc55fabd319d8 , < bf4e4b97d0fdc66f04fc19d807e24dd8421b8f11 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.16
Unaffected: 0 , < 6.16 (semver)
Unaffected: 6.17.3 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/dc/core/dc_stream.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "01e793e7d4d402c473f1a61ca5824f086693be65",
              "status": "affected",
              "version": "4465dd0e41e8223a46a41ce4fcdfc55fabd319d8",
              "versionType": "git"
            },
            {
              "lessThan": "bf4e4b97d0fdc66f04fc19d807e24dd8421b8f11",
              "status": "affected",
              "version": "4465dd0e41e8223a46a41ce4fcdfc55fabd319d8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpu/drm/amd/display/dc/core/dc_stream.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.3",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions\n\nThe function dc_stream_set_cursor_attributes() currently dereferences\nthe `stream` pointer and nested members `stream-\u003ectx-\u003edc-\u003ecurrent_state`\nwithout checking for NULL.\n\nAll callers of these functions, such as in\n`dcn30_apply_idle_power_optimizations()` and\n`amdgpu_dm_plane_handle_cursor_update()`, already perform NULL checks\nbefore calling these functions.\n\nFixes below:\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:336 dc_stream_program_cursor_attributes()\nerror: we previously assumed \u0027stream\u0027 could be null (see line 334)\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n    327 bool dc_stream_program_cursor_attributes(\n    328         struct dc_stream_state *stream,\n    329         const struct dc_cursor_attributes *attributes)\n    330 {\n    331         struct dc  *dc;\n    332         bool reset_idle_optimizations = false;\n    333\n    334         dc = stream ? stream-\u003ectx-\u003edc : NULL;\n                     ^^^^^^\nThe old code assumed stream could be NULL.\n\n    335\n--\u003e 336         if (dc_stream_set_cursor_attributes(stream, attributes)) {\n                                                    ^^^^^^\nThe refactor added an unchecked dereference.\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n   313  bool dc_stream_set_cursor_attributes(\n   314          struct dc_stream_state *stream,\n   315          const struct dc_cursor_attributes *attributes)\n   316  {\n   317          bool result = false;\n   318\n   319          if (dc_stream_check_cursor_attributes(stream, stream-\u003ectx-\u003edc-\u003ecurrent_state, attributes)) {\n                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here.\nThis function used to check for if stream as NULL and return false at\nthe start. Probably we should add that back."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-11T21:43:39.984Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/01e793e7d4d402c473f1a61ca5824f086693be65"
        },
        {
          "url": "https://git.kernel.org/stable/c/bf4e4b97d0fdc66f04fc19d807e24dd8421b8f11"
        }
      ],
      "title": "drm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40148",
    "datePublished": "2025-11-12T10:23:26.841Z",
    "dateReserved": "2025-04-16T07:20:57.175Z",
    "dateUpdated": "2026-05-11T21:43:39.984Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40148",
      "date": "2026-11-11",
      "epss": "0.00241",
      "percentile": "0.15403"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "drivers/gpu/drm/amd/display/dc/core/dc_stream.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "01e793e7d4d402c473f1a61ca5824f086693be65",
                    "status": "affected",
                    "version": "4465dd0e41e8223a46a41ce4fcdfc55fabd319d8",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "bf4e4b97d0fdc66f04fc19d807e24dd8421b8f11",
                    "status": "affected",
                    "version": "4465dd0e41e8223a46a41ce4fcdfc55fabd319d8",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "drivers/gpu/drm/amd/display/dc/core/dc_stream.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.16"
                  },
                  {
                    "lessThan": "6.16",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.17.*",
                    "status": "unaffected",
                    "version": "6.17.3",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.18",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions\n\nThe function dc_stream_set_cursor_attributes() currently dereferences\nthe `stream` pointer and nested members `stream-\u003ectx-\u003edc-\u003ecurrent_state`\nwithout checking for NULL.\n\nAll callers of these functions, such as in\n`dcn30_apply_idle_power_optimizations()` and\n`amdgpu_dm_plane_handle_cursor_update()`, already perform NULL checks\nbefore calling these functions.\n\nFixes below:\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:336 dc_stream_program_cursor_attributes()\nerror: we previously assumed \u0027stream\u0027 could be null (see line 334)\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n    327 bool dc_stream_program_cursor_attributes(\n    328         struct dc_stream_state *stream,\n    329         const struct dc_cursor_attributes *attributes)\n    330 {\n    331         struct dc  *dc;\n    332         bool reset_idle_optimizations = false;\n    333\n    334         dc = stream ? stream-\u003ectx-\u003edc : NULL;\n                     ^^^^^^\nThe old code assumed stream could be NULL.\n\n    335\n--\u003e 336         if (dc_stream_set_cursor_attributes(stream, attributes)) {\n                                                    ^^^^^^\nThe refactor added an unchecked dereference.\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n   313  bool dc_stream_set_cursor_attributes(\n   314          struct dc_stream_state *stream,\n   315          const struct dc_cursor_attributes *attributes)\n   316  {\n   317          bool result = false;\n   318\n   319          if (dc_stream_check_cursor_attributes(stream, stream-\u003ectx-\u003edc-\u003ecurrent_state, attributes)) {\n                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here.\nThis function used to check for if stream as NULL and return false at\nthe start. Probably we should add that back."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\ndrm/amd/display: A\u00f1adir comprobaciones de puntero NULL en las funciones de atributo de cursor dc_stream\n\nLa funci\u00f3n dc_stream_set_cursor_attributes() actualmente desreferencia el puntero \u0027stream\u0027 y los miembros anidados \u0027stream-\u003ectx-\u003edc-\u003ecurrent_state\u0027 sin comprobar si es NULL.\n\nTodos los llamadores de estas funciones, como en \u0027dcn30_apply_idle_power_optimizations()\u0027 y \u0027amdgpu_dm_plane_handle_cursor_update()\u0027, ya realizan comprobaciones de NULL antes de llamar a estas funciones.\n\nCorrecciones a continuaci\u00f3n:\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:336 dc_stream_program_cursor_attributes()\nerror: anteriormente asumimos que \u0027stream\u0027 podr\u00eda ser nulo (ver l\u00ednea 334)\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n    327 bool dc_stream_program_cursor_attributes(\n    328         struct dc_stream_state *stream,\n    329         const struct dc_cursor_attributes *attributes)\n    330 {\n    331         struct dc  *dc;\n    332         bool reset_idle_optimizations = false;\n    333\n    334         dc = stream ? stream-\u003ectx-\u003edc : NULL;\n                     ^^^^^^\nEl c\u00f3digo antiguo asum\u00eda que stream podr\u00eda ser NULL.\n\n    335\n--\u003e 336         if (dc_stream_set_cursor_attributes(stream, attributes)) {\n                                                    ^^^^^^\nLa refactorizaci\u00f3n a\u00f1adi\u00f3 una desreferencia sin comprobar.\n\ndrivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c\n   313  bool dc_stream_set_cursor_attributes(\n   314          struct dc_stream_state *stream,\n   315          const struct dc_cursor_attributes *attributes)\n   316  {\n   317          bool result = false;\n   318\n   319          if (dc_stream_check_cursor_attributes(stream, stream-\u003ectx-\u003edc-\u003ecurrent_state, attributes)) {\n                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Aqu\u00ed.\nEsta funci\u00f3n sol\u00eda comprobar si stream era NULL y devolver false al principio. Probablemente deber\u00edamos volver a a\u00f1adir eso."
          }
        ],
        "id": "CVE-2025-40148",
        "lastModified": "2026-10-19T21:10:00.160",
        "metrics": {},
        "published": "2025-11-12T11:15:44.700",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/01e793e7d4d402c473f1a61ca5824f086693be65"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/bf4e4b97d0fdc66f04fc19d807e24dd8421b8f11"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-11-07T10:36:52+00:00",
      "cve": "CVE-2025-40148",
      "id": "CVE-2025-40148",
      "initial_release_date": "2025-11-12T00:00:00+00:00",
      "product_status:known_not_affected": "200",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: drm/amd/display: Add NULL pointer checks in dc_stream cursor attribute functions",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40148.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-11-05T01:32:44Z",
      "cve": "CVE-2025-40148",
      "id": "CVE-2025-40148",
      "initial_release_date": "2025-11-14T00:24:56Z",
      "product_status:known_not_affected": "512",
      "product_status:recommended": "58",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40148",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/2025/cve-2025-40148.json",
      "version": "9"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.