Skip to content
Heist/ feed
Back to feed
HighFix available

cdx: Fix possible UAF error in driver_override_show()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: cdx: Fix possible UAF error in driver_override_show() Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() function uses driver_set_override() to update the driver_override value, and driver_set_override() internally locks the device (device_lock(dev)). If driver_override_show() reads cdx_dev->driver_override without locking, it could potentially access a freed pointer if driver_override_store() frees the string concurrently. This could lead to printing a kernel address, which is a security risk since DEVICE_ATTR can be read by all users. Additionally, a similar pattern is used in drivers/amba/bus.c, as well as many other bus drivers, where device_lock() is taken in the show function, and it has been working without issues. This potential bug was detected by our experimental static analysis tool, which analyzes locking APIs and paired functions to identify data races and atomicity violations.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.19, 6.13.7, 6.6.83
CVEs
CVE-2025-21915
Confirmed fixed CVEs
Not specified
Updated in this feed
8 Nov 2026, 00:44 UTC · Revision 1

Source evidence

cdx: Fix possible UAF error in driver_override_show()

core-osv · Original source

Published 1 Apr 2025, 15:40 UTC

In the Linux kernel, the following vulnerability has been resolved: cdx: Fix possible UAF error in driver_override_show() Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() function uses driver_set_override() to update the driver_override value, and driver_set_override() internally locks the device (device_lock(dev)). If driver_override_show() reads cdx_dev->driver_override without locking, it could potentially access a freed pointer if driver_override_store() frees the string concurrently. This could lead to printing a kernel address, which is a security risk since DEVICE_ATTR can be read by all users. Additionally, a similar pattern is used in drivers/amba/bus.c, as well as many other bus drivers, where device_lock() is taken in the show function, and it has been working without issues. This potential bug was detected by our experimental static analysis tool, which analyzes locking APIs and paired functions to identify data races and atomicity violations.

osv:CVE-2025-21915

Kernel

Fixed versions: 6.6.83, 6.12.19, 6.13.7

Complete source record
{
  "id": "9a66f16b39a1ba7b2a4c8f37abfaf78e97f39d441ee458a897442d4622040fe1",
  "url": "https://osv.dev/vulnerability/CVE-2025-21915",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "cdx: Fix possible UAF error in driver_override_show()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: cdx: Fix possible UAF error in driver_override_show() Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() function uses driver_set_override() to update the driver_override value, and driver_set_override() internally locks the device (device_lock(dev)). If driver_override_show() reads cdx_dev->driver_override without locking, it could potentially access a freed pointer if driver_override_store() frees the string concurrently. This could lead to printing a kernel address, which is a security risk since DEVICE_ATTR can be read by all users. Additionally, a similar pattern is used in drivers/amba/bus.c, as well as many other bus drivers, where device_lock() is taken in the show function, and it has been working without issues. This potential bug was detected by our experimental static analysis tool, which analyzes locking APIs and paired functions to identify data races and atomicity violations.",
    "evidence": "osv:CVE-2025-21915",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.6.83",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.19",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.13.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2025-21915",
      "aliases": [
        "CVE-2025-21915"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "2959ab247061e67485d83b6af8feb3761ec08cb9"
                },
                {
                  "fixed": "d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf"
                },
                {
                  "fixed": "8473135f89c0949436a22adb05b8cece2fb3da91"
                },
                {
                  "fixed": "0439d541aa8d3444ad41c39e39eb71acb57acde3"
                },
                {
                  "fixed": "91d44c1afc61a2fec37a9c7a3485368309391e0b"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21915.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.4.0"
                },
                {
                  "fixed": "6.6.83"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.19"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.13.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-21915.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:52.744164149Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0439d541aa8d3444ad41c39e39eb71acb57acde3",
        "https://git.kernel.org/stable/c/8473135f89c0949436a22adb05b8cece2fb3da91",
        "https://git.kernel.org/stable/c/91d44c1afc61a2fec37a9c7a3485368309391e0b",
        "https://git.kernel.org/stable/c/d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/21xxx/CVE-2025-21915.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-21915",
        "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/2025/21xxx/CVE-2025-21915.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-21915",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 521065,
  "published_at": "2025-04-01T15:40:52.019+00:00"
}