Description
In the Linux kernel, the following vulnerability has been resolved:

nitro_enclaves: fix use-after-free on SLOT_ALLOC failure

When ne_create_vm_ioctl() fails the SLOT_ALLOC request after
anon_inode_getfile() has succeeded, the error path calls
fput(enclave_file) and then frees ne_enclave.

In normal userspace context, fput() defers the final __fput() via
task_work. ne_enclave_release() therefore runs after ne_enclave has
already been freed and dereferences ne_enclave->slot_uid, causing a
use-after-free: KASAN: slab-use-after-free in ne_enclave_release.

The enclave has no slot allocated and is not yet linked into the
enclaves list on this error path, so ne_enclave_release() is expected
to return early when slot_uid is zero. However, reading slot_uid
already accesses the freed object.

Clear enclave_file->private_data before fput() on the error path.
ne_enclave_release() then returns immediately when private_data is
NULL, leaving the ioctl error path as the sole owner of ne_enclave.
This is safe because the file has not been fd_install()'d yet.

Tested on an AWS EC2 m5.2xlarge with CONFIG_KASAN=y. Without the
patch, the reproducer triggers a KASAN slab-use-after-free on every
SLOT_ALLOC failure. With the patch, no KASAN report is produced and
the SLOT_ALLOC error is still returned. Normal enclave creation and
teardown are unaffected.
Published: 2026-10-18
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Use‑After‑Free leading to potential local privilege escalation (inferred from description)
Action: Apply Patch
AI Analysis

Impact

A use‑after‑free bug exists in the Linux kernel Nitro Enclaves subsystem. When an enclave creation ioctl fails after allocating the anonymized inode but before the slot allocation succeeds, the error path frees the enclave object before the reference count is fully released. Task‑work then runs the release routine on the already‑freed object, dereferencing memory that has been reclaimed. This results in a KASAN slab‑use‑after‑free and, if exploitable, could allow a local attacker to corrupt kernel memory or elevate privileges. Based on the description, it is inferred that the vulnerability could lead to local privilege escalation.

Affected Systems

Affected systems include any Linux kernel builds that contain Nitro Enclaves support. The vulnerability is exercised by the ne_create_vm_ioctl interface and is present in all kernel versions that do not contain the commit that clears enclave_file->private_data before fput(). The affected component is the kernel module that implements Nitro enclave functionality.

Risk and Exploitability

Risk and exploitability: The vulnerability is not listed in the CISA KEV catalog, and the EPSS score indicates less than 1% probability of exploitation. The CVSS score is 5.5, reflecting moderate severity. Exploitation would require the ability to invoke the Nitro Enclaves ioctl interface, implying local or elevated process access. Based on the description, the likely attack vector is local or requires elevated process access. In the absence of the patch, the bug could be triggered automatically on any kernel that attempts to create an enclave where the slot allocation fails.

Generated by OpenCVE AI on October 23, 2026 at 18:50 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a release that includes the Nitro Enclaves use‑after‑free patch (e.g., the kernel commit that clears enclave_file->private_data before fput()), ensuring that the vulnerable path is removed.
  • If a kernel upgrade is not immediately feasible, disable Nitro Enclaves support by removing the \"CONFIG_NITRO_ENCLAVES\" option or unloading the nitro_enclaves module so that the vulnerable code path cannot be executed.
  • Restrict access to the ne_create_vm ioctl interface to privileged users only, using capabilities or an eBPF filter to prevent misuse by untrusted processes.

Generated by OpenCVE AI on October 23, 2026 at 18:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
History

Fri, 30 Oct 2026 13:00:00 +0000


Fri, 23 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Wed, 21 Oct 2026 13:15:00 +0000


Sun, 18 Oct 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: nitro_enclaves: fix use-after-free on SLOT_ALLOC failure When ne_create_vm_ioctl() fails the SLOT_ALLOC request after anon_inode_getfile() has succeeded, the error path calls fput(enclave_file) and then frees ne_enclave. In normal userspace context, fput() defers the final __fput() via task_work. ne_enclave_release() therefore runs after ne_enclave has already been freed and dereferences ne_enclave->slot_uid, causing a use-after-free: KASAN: slab-use-after-free in ne_enclave_release. The enclave has no slot allocated and is not yet linked into the enclaves list on this error path, so ne_enclave_release() is expected to return early when slot_uid is zero. However, reading slot_uid already accesses the freed object. Clear enclave_file->private_data before fput() on the error path. ne_enclave_release() then returns immediately when private_data is NULL, leaving the ioctl error path as the sole owner of ne_enclave. This is safe because the file has not been fd_install()'d yet. Tested on an AWS EC2 m5.2xlarge with CONFIG_KASAN=y. Without the patch, the reproducer triggers a KASAN slab-use-after-free on every SLOT_ALLOC failure. With the patch, no KASAN report is produced and the SLOT_ALLOC error is still returned. Normal enclave creation and teardown are unaffected.
Title nitro_enclaves: fix use-after-free on SLOT_ALLOC failure
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-30T12:39:42.932Z

Reserved: 2026-09-25T10:25:14.369Z

Link: CVE-2026-98775

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:31.437

Modified: 2026-10-30T13:21:27.140

Link: CVE-2026-98775

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-18T00:00:00Z

Links: CVE-2026-98775 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T19:00:23Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference