CVE-2025-38131 (GCVE-0-2025-38131)
Vulnerability from cvelistv5
Published
2025-07-03 08:35
Modified
2025-07-28 04:13
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
coresight: prevent deactivate active config while enabling the config
While enable active config via cscfg_csdev_enable_active_config(),
active config could be deactivated via configfs' sysfs interface.
This could make UAF issue in below scenario:
CPU0 CPU1
(sysfs enable) load module
cscfg_load_config_sets()
activate config. // sysfs
(sys_active_cnt == 1)
...
cscfg_csdev_enable_active_config()
lock(csdev->cscfg_csdev_lock)
// here load config activate by CPU1
unlock(csdev->cscfg_csdev_lock)
deactivate config // sysfs
(sys_activec_cnt == 0)
cscfg_unload_config_sets()
unload module
// access to config_desc which freed
// while unloading module.
cscfg_csdev_enable_config
To address this, use cscfg_config_desc's active_cnt as a reference count
which will be holded when
- activate the config.
- enable the activated config.
and put the module reference when config_active_cnt == 0.
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "drivers/hwtracing/coresight/coresight-config.h", "drivers/hwtracing/coresight/coresight-syscfg.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "dfe8224c9c7a43d356eb9f74b06868aa05f90223", "status": "affected", "version": "f8cce2ff3c04361b8843d8489620fda8880f668b", "versionType": "git" }, { "lessThan": "b3b4efa2e623aecaebd7c9b9e4171f5c659e9724", "status": "affected", "version": "f8cce2ff3c04361b8843d8489620fda8880f668b", "versionType": "git" }, { "lessThan": "31028812724cef7bd57a51525ce58a32a6d73b22", "status": "affected", "version": "f8cce2ff3c04361b8843d8489620fda8880f668b", "versionType": "git" }, { "lessThan": "ed42ee1ed05ff2f4c36938379057413a40c56680", "status": "affected", "version": "f8cce2ff3c04361b8843d8489620fda8880f668b", "versionType": "git" }, { "lessThan": "408c97c4a5e0b634dcd15bf8b8808b382e888164", "status": "affected", "version": "f8cce2ff3c04361b8843d8489620fda8880f668b", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "drivers/hwtracing/coresight/coresight-config.h", "drivers/hwtracing/coresight/coresight-syscfg.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.15" }, { "lessThan": "5.15", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.1.*", "status": "unaffected", "version": "6.1.142", "versionType": "semver" }, { "lessThanOrEqual": "6.6.*", "status": "unaffected", "version": "6.6.94", "versionType": "semver" }, { "lessThanOrEqual": "6.12.*", "status": "unaffected", "version": "6.12.34", "versionType": "semver" }, { "lessThanOrEqual": "6.15.*", "status": "unaffected", "version": "6.15.3", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.16", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.1.142", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.6.94", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.12.34", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.15.3", "versionStartIncluding": "5.15", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16", "versionStartIncluding": "5.15", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "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\u0027 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\u0027s 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." } ], "providerMetadata": { "dateUpdated": "2025-07-28T04:13:00.836Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/dfe8224c9c7a43d356eb9f74b06868aa05f90223" }, { "url": "https://git.kernel.org/stable/c/b3b4efa2e623aecaebd7c9b9e4171f5c659e9724" }, { "url": "https://git.kernel.org/stable/c/31028812724cef7bd57a51525ce58a32a6d73b22" }, { "url": "https://git.kernel.org/stable/c/ed42ee1ed05ff2f4c36938379057413a40c56680" }, { "url": "https://git.kernel.org/stable/c/408c97c4a5e0b634dcd15bf8b8808b382e888164" } ], "title": "coresight: prevent deactivate active config while enabling the config", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-38131", "datePublished": "2025-07-03T08:35:35.036Z", "dateReserved": "2025-04-16T04:51:23.987Z", "dateUpdated": "2025-07-28T04:13:00.836Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-38131\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-03T09:15:27.430\",\"lastModified\":\"2025-07-03T15:13:53.147\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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\u0027 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\u0027s 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.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: coresight: impide la desactivaci\u00f3n de la configuraci\u00f3n activa al habilitarla. Al habilitar la configuraci\u00f3n activa mediante cscfg_csdev_enable_active_config(), esta podr\u00eda desactivarse mediante la interfaz sysfs de configfs. Esto podr\u00eda generar un problema de UAF en el siguiente escenario: CPU0 CPU1 (habilitaci\u00f3n sysfs) carga el m\u00f3dulo cscfg_load_config_sets() activa la configuraci\u00f3n. // sysfs (sys_active_cnt == 1) ... cscfg_csdev_enable_active_config() lock(csdev-\u0026gt;cscfg_csdev_lock) // aqu\u00ed carga la configuraci\u00f3n activada por CPU1 unlock(csdev-\u0026gt;cscfg_csdev_lock) desactiva la configuraci\u00f3n // sysfs (sys_activec_cnt == 0) cscfg_unload_config_sets() descarga el m\u00f3dulo // acceso a config_desc que se liber\u00f3 // mientras se descargaba el m\u00f3dulo. cscfg_csdev_enable_config Para solucionar esto, utilice active_cnt de cscfg_config_desc como un recuento de referencia que se mantendr\u00e1 cuando: - active la configuraci\u00f3n. - habilite la configuraci\u00f3n activada y coloque la referencia del m\u00f3dulo cuando config_active_cnt == 0.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/31028812724cef7bd57a51525ce58a32a6d73b22\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/408c97c4a5e0b634dcd15bf8b8808b382e888164\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b3b4efa2e623aecaebd7c9b9e4171f5c659e9724\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/dfe8224c9c7a43d356eb9f74b06868aa05f90223\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ed42ee1ed05ff2f4c36938379057413a40c56680\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
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.
- 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…