CVE-2026-139646

crypto: ccp - fix SFS ioctl race against device teardown

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

crypto: ccp - fix SFS ioctl race against device teardown

sfs_ioctl() reads psp_master->sfs_data and caches it in sfs_dev before
taking sfs_ioctl_mutex, while sfs_dev_destroy() frees sfs_dev->page
and sfs_dev->command_buf with no locking at all and only clears
psp->sfs_data afterwards. A call to sfs_ioctl() that reads sfs_data
just before sfs_dev_destroy() runs will still acquire the mutex and
go on to use the now-freed command buffer in send_sfs_cmd().

Have both functions take sfs_ioctl_mutex before touching
psp->sfs_data, so a call that is already using sfs_dev completes
before teardown can free it, and a call arriving after teardown sees
sfs_data cleared and returns -ENODEV instead of racing it.

Analysis

AI-generated

Technical impact

The vulnerability is a race condition in the Linux kernel crypto CCP driver. The sfs_ioctl() function reads data from the device controller page object and caches it before acquiring the sfs_ioctl_mutex lock, while the sfs_dev_destroy() function frees the command buffer without any synchronization. If an ioctl request is processed just before teardown begins, the driver can end up using a freed command buffer during send_sfs_cmd(), resulting in a use‑after‑free kernel memory corruption. An attacker who can trigger the ioctl on the CCP device while the device is being torn down would therefore corrupt kernel memory and could elevate privileges or execute arbitrary code.

Affected Systems

All Linux kernel releases that include the ccp driver without the patch commit referenced by the CVE are affected. The fixed code is present in kernel trees that apply commit 54a7e3828df45fdb85ea5a1e79a94d4e95b78823 and subsequent merges.

Risk and Exploitability

Although no EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, the impact of a use‑after‑free in a kernel driver is high and can lead to privilege escalation. The attack vector requires the ability to issue ioctl commands to the CCP device, typically from a local user with sufficient privileges or through a local privilege escalation exploit that gains access to the device. Once the race is triggered, the attacker can cause a kernel crash or achieve arbitrary code execution. The absence of an EPSS score does not diminish the severity of the potential exploit, and as the issue has been fixed, updating the kernel is the primary mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest Linux kernel update that includes the committed patch for the CCP driver.
  • If an update is not possible, disable or unload the ccp kernel module to prevent the race condition from being exploitable.
  • Restrict access to the CCP device file so that only privileged users can issue ioctl commands, reducing the likelihood of a local attack triggering the race.

Generated by OpenCVE AI on December 1, 2026 at 00:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: crypto: ccp - fix SFS ioctl race against device teardown sfs_ioctl() reads psp_master->sfs_data and caches it in sfs_dev before taking sfs_ioctl_mutex, while sfs_dev_destroy() frees sfs_dev->page and sfs_dev->command_buf with no locking at all and only clears psp->sfs_data afterwards. A call to sfs_ioctl() that reads sfs_data just before sfs_dev_destroy() runs will still acquire the mutex and go on to use the now-freed command buffer in send_sfs_cmd(). Have both functions take sfs_ioctl_mutex before touching psp->sfs_data, so a call that is already using sfs_dev completes before teardown can free it, and a call arriving after teardown sees sfs_data cleared and returns -ENODEV instead of racing it.
Title crypto: ccp - fix SFS ioctl race against device teardown
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

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