{"id":"CVE-2025-38131","summary":"coresight: prevent deactivate active config while enabling the config","details":"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.","modified":"2026-04-16T04:34:19.137817509Z","published":"2025-07-03T08:35:35.036Z","related":["SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38131.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/31028812724cef7bd57a51525ce58a32a6d73b22"},{"type":"WEB","url":"https://git.kernel.org/stable/c/408c97c4a5e0b634dcd15bf8b8808b382e888164"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b3b4efa2e623aecaebd7c9b9e4171f5c659e9724"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dfe8224c9c7a43d356eb9f74b06868aa05f90223"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ed42ee1ed05ff2f4c36938379057413a40c56680"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38131.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38131"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f8cce2ff3c04361b8843d8489620fda8880f668b"},{"fixed":"dfe8224c9c7a43d356eb9f74b06868aa05f90223"},{"fixed":"b3b4efa2e623aecaebd7c9b9e4171f5c659e9724"},{"fixed":"31028812724cef7bd57a51525ce58a32a6d73b22"},{"fixed":"ed42ee1ed05ff2f4c36938379057413a40c56680"},{"fixed":"408c97c4a5e0b634dcd15bf8b8808b382e888164"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38131.json"}}],"schema_version":"1.7.5"}