{"id":"CVE-2026-139647","state":"PUBLISHED","title":"crypto: qat - hold cfg->lock when accessing config sections","description":"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.","publishedAt":"2026-11-30T13:36:41.242Z","updatedAt":"2026-11-30T13:36:41.242Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"1686fb8e8abbd3994952a7b3762683f86cc1d579","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"0b3ae981c8f95f22f412d2f5933e453529a44ca8","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"cb3a1364fed9ea7b063e3ae026177a145abb5940","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/intel/qat/qat_common/adf_cfg.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.17","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/intel/qat/qat_common/adf_cfg.c"]}],"references":["https://git.kernel.org/stable/c/1686fb8e8abbd3994952a7b3762683f86cc1d579","https://git.kernel.org/stable/c/7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6","https://git.kernel.org/stable/c/0b3ae981c8f95f22f412d2f5933e453529a44ca8","https://git.kernel.org/stable/c/cb3a1364fed9ea7b063e3ae026177a145abb5940"],"weaknesses":[],"ingestedAt":"2026-11-30T13:54:04.526Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139647.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139647","state":"PUBLISHED","datePublished":"2026-11-30T13:36:41.242Z","dateUpdated":"2026-11-30T13:36:41.242Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.945Z"},"containers":{"cna":{"title":"crypto: qat - hold cfg->lock when accessing config sections","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"1686fb8e8abbd3994952a7b3762683f86cc1d579","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"0b3ae981c8f95f22f412d2f5933e453529a44ca8","versionType":"git"},{"version":"d8cba25d2c68992a6e7c1d329b690a9ebe01167d","status":"affected","lessThan":"cb3a1364fed9ea7b063e3ae026177a145abb5940","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/intel/qat/qat_common/adf_cfg.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.17","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/intel/qat/qat_common/adf_cfg.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1686fb8e8abbd3994952a7b3762683f86cc1d579"},{"url":"https://git.kernel.org/stable/c/7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6"},{"url":"https://git.kernel.org/stable/c/0b3ae981c8f95f22f412d2f5933e453529a44ca8"},{"url":"https://git.kernel.org/stable/c/cb3a1364fed9ea7b063e3ae026177a145abb5940"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:41.242Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.17","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.17","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.17","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.17","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}