{
  "id": "CVE-2025-38131",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-38131",
  "published_at": "2025-07-03T08:35:35.036Z",
  "title": "coresight: prevent deactivate active config while enabling the config",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\ncoresight: prevent deactivate active config while enabling the config\n\nWhile enable active config via cscfg_csdev_enable_active_config(),\nactive config could be deactivated via configfs' sysfs interface.\nThis could make UAF issue in below scenario:\n\nCPU0                                          CPU1\n(sysfs enable)                                load module\n                                              cscfg_load_config_sets()\n                                              activate config. // sysfs\n                                              (sys_active_cnt == 1)\n...\ncscfg_csdev_enable_active_config()\nlock(csdev-\u003ecscfg_csdev_lock)\n// here load config activate by CPU1\nunlock(csdev-\u003ecscfg_csdev_lock)\n\n                                              deactivate config // sysfs\n                                              (sys_activec_cnt == 0)\n                                              cscfg_unload_config_sets()\n                                              unload module\n\n// access to config_desc which freed\n// while unloading module.\ncscfg_csdev_enable_config\n\nTo address this, use cscfg_config_desc's active_cnt as a reference count\n which will be holded when\n    - activate the config.\n    - enable the activated config.\nand put the module reference when config_active_cnt == 0.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= f8cce2ff3c04361b8843d8489620fda8880f668b, \u003c dfe8224c9c7a43d356eb9f74b06868aa05f90223",
          "\u003e= f8cce2ff3c04361b8843d8489620fda8880f668b, \u003c b3b4efa2e623aecaebd7c9b9e4171f5c659e9724",
          "\u003e= f8cce2ff3c04361b8843d8489620fda8880f668b, \u003c 31028812724cef7bd57a51525ce58a32a6d73b22",
          "\u003e= f8cce2ff3c04361b8843d8489620fda8880f668b, \u003c ed42ee1ed05ff2f4c36938379057413a40c56680",
          "\u003e= f8cce2ff3c04361b8843d8489620fda8880f668b, \u003c 408c97c4a5e0b634dcd15bf8b8808b382e888164"
        ],
        "fixed_in": [
          "dfe8224c9c7a43d356eb9f74b06868aa05f90223",
          "b3b4efa2e623aecaebd7c9b9e4171f5c659e9724",
          "31028812724cef7bd57a51525ce58a32a6d73b22",
          "ed42ee1ed05ff2f4c36938379057413a40c56680",
          "408c97c4a5e0b634dcd15bf8b8808b382e888164"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.15"
        ],
        "fixed_in": [
          "0",
          "6.1.142",
          "6.6.94",
          "6.12.34",
          "6.15.3",
          "6.16"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to dfe8224c9c7a43d356eb9f74b06868aa05f90223 or b3b4efa2e623aecaebd7c9b9e4171f5c659e9724 or 31028812724cef7bd57a51525ce58a32a6d73b22 or ed42ee1ed05ff2f4c36938379057413a40c56680 or 408c97c4a5e0b634dcd15bf8b8808b382e888164 or later.",
      "Upgrade Linux to 0 or 6.1.142 or 6.6.94 or 6.12.34 or 6.15.3 or 6.16 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
