CVE-2026-98775: nitro_enclaves: fix use-after-free on SLOT_ALLOC failure

Published Oct 18, 2026
·
Updated

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

nitroenclaves: fix use-after-free on SLOTALLOC failure

When necreatevmioctl() fails the SLOTALLOC request after anoninodegetfile() has succeeded, the error path calls fput(enclavefile) and then frees neenclave.

In normal userspace context, fput() defers the final fput() via taskwork. neenclaverelease() therefore runs after neenclave has already been freed and dereferences neenclave->slotuid, causing a use-after-free: KASAN: slab-use-after-free in neenclaverelease.

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

Clear enclavefile->privatedata before fput() on the error path. neenclaverelease() then returns immediately when privatedata is NULL, leaving the ioctl error path as the sole owner of neenclave. This is safe because the file has not been fdinstall()'d yet.

Tested on an AWS EC2 m5.2xlarge with CONFIGKASAN=y. Without the patch, the reproducer triggers a KASAN slab-use-after-free on every SLOTALLOC failure. With the patch, no KASAN report is produced and the SLOTALLOC error is still returned. Normal enclave creation and teardown are unaffected.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In the nitro_enclaves SLOT_ALLOC failure path, clear enclave_file->private_data before calling fput(enclave_file), and make ne_enclave_release() return early when slot_uid is zero.

Event History

Oct 18, 2026
CVE Published
via MITRE·03:48 PM
Data Sourced
via MITRE·03:48 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203