{"id":"CVE-2026-139647","aliases":["CVE-2026-139647"],"related":[],"kind":"vulnerability","state":"published","title":"crypto: qat - hold cfg->lock when accessing config sections","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - hold cfg->lock when accessing config sections\n\nadf_cfg_sec_find() walks the per-device section list without holding\ncfg->lock, and the returned section pointer is used later under the\nlock. A concurrent section deletion under cfg->lock\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->lock used by the\nadd and delete paths, so the two do not serialise. Updating an existing\nkey frees the old key_val under cfg->lock, 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->lock 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->lock) 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - hold cfg->lock when accessing config sections\n\nadf_cfg_sec_find() walks the per-device section list without holding\ncfg->lock, and the returned section pointer is used later under the\nlock. A concurrent section deletion under cfg->lock\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->lock used by the\nadd and delete paths, so the two do not serialise. Updating an existing\nkey frees the old key_val under cfg->lock, 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->lock 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->lock) 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.","source":"cvelist"}],"published":"2026-11-30T13:36:41.242Z","modified":"2026-11-30T14:19:48.323Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","fixed":"1686fb8e8abbd3994952a7b3762683f86cc1d579","status":"affected"},{"type":"git","introduced":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","fixed":"7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6","status":"affected"},{"type":"git","introduced":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","fixed":"0b3ae981c8f95f22f412d2f5933e453529a44ca8","status":"affected"},{"type":"git","introduced":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","fixed":"cb3a1364fed9ea7b063e3ae026177a145abb5940","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.17","status":"unaffected"},{"type":"semver","introduced":"6.12.120","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.66","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/1686fb8e8abbd3994952a7b3762683f86cc1d579","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/0b3ae981c8f95f22f412d2f5933e453529a44ca8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cb3a1364fed9ea7b063e3ae026177a145abb5940","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139647","url":"https://www.cve.org/CVERecord?id=CVE-2026-139647","licence":"CVE Terms of Use","modified":"2026-11-30T13:36:41.242Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139647","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139647","licence":"Public domain","modified":"2026-11-30T14:19:48.323Z"}],"updatedAt":"2026-11-30T14:33:38.519Z","epss":{"score":0.00168,"percentile":0.06383,"date":"2026-12-01T12:00:22.000Z"}}