{"id":"CVE-2026-139647","summary":"crypto: qat - hold cfg-\u003elock when accessing config sections","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - hold cfg-\u003elock when accessing config sections\n\nadf_cfg_sec_find() walks the per-device section list without holding\ncfg-\u003elock, and the returned section pointer is used later under the\nlock. A concurrent section deletion under cfg-\u003elock\n(adf_cfg_del_all_except() on device down, or adf_cfg_dev_remove() on\nremoval) can free the section first, leading to a use-after-free.\n\nThe debugfs dev_cfg reader has the same problem: qat_dev_cfg_show()\nwalks both the section list and each section's param_head under the\nglobal qat_cfg_read_lock mutex, not the per-device cfg-\u003elock used by the\nadd and delete paths, so the two do not serialise. Updating an existing\nkey frees the old key_val under cfg-\u003elock, so even a config write\nconcurrent with an open dev_cfg read can free an entry mid-walk, a wider\nwindow than section deletion alone.\n\nTake cfg-\u003elock around the section lookup in adf_cfg_add_key_value_param()\nand around the lookup and insert in adf_cfg_section_add(), and use\ndown_read()/up_read(&cfg-\u003elock) in the debugfs start/stop callbacks.\nRemove the now-unused qat_cfg_read_lock.\n\nWhile here, return -ENOENT rather than -EFAULT when the section is not\nfound; EFAULT (bad userspace address) is not meaningful for this case.","modified":"2026-11-30T15:02:29.871370869Z","published":"2026-11-30T13:36:41.242Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139647.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0b3ae981c8f95f22f412d2f5933e453529a44ca8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/1686fb8e8abbd3994952a7b3762683f86cc1d579"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cb3a1364fed9ea7b063e3ae026177a145abb5940"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139647.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139647"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d"},{"fixed":"1686fb8e8abbd3994952a7b3762683f86cc1d579"},{"fixed":"7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6"},{"fixed":"0b3ae981c8f95f22f412d2f5933e453529a44ca8"},{"fixed":"cb3a1364fed9ea7b063e3ae026177a145abb5940"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139647.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.17.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139647.json"}}],"schema_version":"1.9.2"}