CVE-2026-139647

crypto: qat - hold cfg->lock when accessing config sections

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

crypto: qat - hold cfg->lock when accessing config sections

adf_cfg_sec_find() walks the per-device section list without holding
cfg->lock, and the returned section pointer is used later under the
lock. A concurrent section deletion under cfg->lock
(adf_cfg_del_all_except() on device down, or adf_cfg_dev_remove() on
removal) can free the section first, leading to a use-after-free.

The debugfs dev_cfg reader has the same problem: qat_dev_cfg_show()
walks both the section list and each section's param_head under the
global qat_cfg_read_lock mutex, not the per-device cfg->lock used by the
add and delete paths, so the two do not serialise. Updating an existing
key frees the old key_val under cfg->lock, so even a config write
concurrent with an open dev_cfg read can free an entry mid-walk, a wider
window than section deletion alone.

Take cfg->lock around the section lookup in adf_cfg_add_key_value_param()
and around the lookup and insert in adf_cfg_section_add(), and use
down_read()/up_read(&cfg->lock) in the debugfs start/stop callbacks.
Remove the now-unused qat_cfg_read_lock.

While here, return -ENOENT rather than -EFAULT when the section is not
found; EFAULT (bad userspace address) is not meaningful for this case.

Analysis

AI-generated

Technical impact

An unsynchronized read of per‑device configuration sections in the Linux kernel QAT crypto driver can result in a use‑after‑free error. The flaw arises because adf_cfg_sec_find() and the debugfs dev_cfg reader traverse section lists without holding the appropriate lock; a concurrent deletion or configuration update frees the referenced memory before it is reused, causing kernel memory corruption. This corruption can be leveraged to crash the system or potentially execute arbitrary code with kernel privileges.

Affected Systems

The affected product is the Linux kernel, specifically the QAT crypto driver module. Any system running a kernel containing this code and that has the QAT driver enabled is at risk, regardless of vendor distribution, as the issue appears in the upstream source code.

Risk and Exploitability

The vulnerability has no EPSS score available and it is not listed in the CISA KEV catalog. While a documented exploit is not public, the race condition can be triggered by manipulating QAT configuration via debugfs or by feeding crafted parameters to the driver, actions that require the ability to write to QAT device files. The attack vector is thus inferred to be a local or potentially a remote user who can influence kernel configuration. Given the absence of a public exploit, the severity is moderate, but the potential for arbitrary kernel code execution or denial of service warrants urgent attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the patch fixing the missing lock before reading or modifying QAT configuration. The patch is available in the following kernel commit logs: https://git.kernel.org/stable/c/0b3ae981c8f95f22f412d2f5933e453529a44ca8, https://git.kernel.org/stable/c/1686fb8e8abbd3994952a7b3762683f86cc1d579, https://git.kernel.org/stable/c/7eb8b19a140ac4feeb0acb2b3e7077fc8c5fbef6, https://git.kernel.org/stable/c/cb3a1364fed9ea7b063e3ae026177a145abb5940.
  • Disable the QAT crypto module or unregister the QAT device if the functionality is not required for the system’s operation. This removes the code paths that can trigger the use‑after‑free without waiting for a patch.
  • Restrict QAT device and debugfs access: limit write and read permissions on the QAT device files to root or a dedicated group, and if possible remove the dev_cfg debugfs entry to reduce the race window.

Generated by OpenCVE AI on December 1, 2026 at 17:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-362
CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: qat - hold cfg->lock when accessing config sections adf_cfg_sec_find() walks the per-device section list without holding cfg->lock, and the returned section pointer is used later under the lock. A concurrent section deletion under cfg->lock (adf_cfg_del_all_except() on device down, or adf_cfg_dev_remove() on removal) can free the section first, leading to a use-after-free. The debugfs dev_cfg reader has the same problem: qat_dev_cfg_show() walks both the section list and each section's param_head under the global qat_cfg_read_lock mutex, not the per-device cfg->lock used by the add and delete paths, so the two do not serialise. Updating an existing key frees the old key_val under cfg->lock, so even a config write concurrent with an open dev_cfg read can free an entry mid-walk, a wider window than section deletion alone. Take cfg->lock around the section lookup in adf_cfg_add_key_value_param() and around the lookup and insert in adf_cfg_section_add(), and use down_read()/up_read(&cfg->lock) in the debugfs start/stop callbacks. Remove the now-unused qat_cfg_read_lock. While here, return -ENOENT rather than -EFAULT when the section is not found; EFAULT (bad userspace address) is not meaningful for this case.
Title crypto: qat - hold cfg->lock when accessing config sections
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM