Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 290D54A2A46 for ; Sun, 18 Oct 2026 16:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340056; cv=none; b=V9+vz6+bHE5u7ymj+6JIuO856iscXV/70FKpfcprNGsVYIeOeSL66SoMNJEEP4YsyC+EA0onVGE4iJSA9DgLr009W0eTaNQ7HvJ0iRAZUx2JEc58K130G9yS5t+zqg9vxPzjtxNvrAjmVr37sHrR7OJtqi9zRJm0Imikmr7MTHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792340056; c=relaxed/simple; bh=f3NCwrty9bNCdfLxIgZyCkwJ1NzGoBZhc0z9DSb0uIE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SkrdNDMcAgAXw7y1ba1tmAkT+k5sPKrH1r8MmV4BinQj4S2qhXcDVGJ/lK/z71jdXnEarbHIoaq39ytrfmp/QF84wc5X9xw7LSNqfshqlSILByrGIMBTEAG9rmRZxF02UL2k0j0e2oZz3udG7sAI+tO+lG4OunEAM+CBEjQsh8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zJXb05+5; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zJXb05+5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E60181F000C4; Sun, 18 Oct 2026 16:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792340054; bh=JchqTl6yU+DwQxMIqKJjzLilnwG3CY0r0+eAVKpJ2M0=; h=From:To:Cc:Subject:Date:Reply-To; b=zJXb05+5XBJ6hJjysGu3S1Jt4jm41OWjqa+9Uq/eqDkOq3VfFVz14A8P+U8zRmVbX VS6joAWbBOS9pxIe/VRKAytYtE+Ayjz66VL0OW2uE6oeyo4i4Fvk/o8hIYofZqyYn1 TvmFQnAcs/QyJ0g3oYRvluaXxLZ2sV43v4V7CI24= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98775: nitro_enclaves: fix use-after-free on SLOT_ALLOC failure Date: Sun, 18 Oct 2026 17:45:50 +0200 Message-ID: <2026101819-CVE-2026-98775-dac1@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3494; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NmaIQYfGXPbLNbiRWyxgwLedK/w48RlhV95BeLwV15Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXXoZ8WTrhyeO1rdd3nDjyMPrUavW3Dx66t6xa3VqgL 5DstGbSm45YFgZBJgZZMUWWL9t4ju6vOKToZWh7GmYOKxPIEAYuTgGYyG9VhgUXty3fc+5v6dVz yvHqjNY83U7SP20Y5rum6maklS42b3yUu///0X2OXgei1gAA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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. The Linux kernel CVE team has assigned CVE-2026-98775 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 9c8eb50fe9e2bb8a2e725979e052fbf592b6b799 and fixed in 6.12.113 with commit 466041d14f26dc2babd606a2e85dce08774112a6 Issue introduced in 5.10 with commit 9c8eb50fe9e2bb8a2e725979e052fbf592b6b799 and fixed in 6.18.56 with commit f7fb6c2835ede1b8ad84cf7e78a528a9d0159b84 Issue introduced in 5.10 with commit 9c8eb50fe9e2bb8a2e725979e052fbf592b6b799 and fixed in 7.2.10 with commit 43f78b328f3907ca2f7424e15b7e45ffbf9fe21c Issue introduced in 5.10 with commit 9c8eb50fe9e2bb8a2e725979e052fbf592b6b799 and fixed in 7.3-rc6 with commit 9bc184a2eda8b773c88ecbff934001ad649b9cc1 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-98775 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/virt/nitro_enclaves/ne_misc_dev.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/466041d14f26dc2babd606a2e85dce08774112a6 https://git.kernel.org/stable/c/f7fb6c2835ede1b8ad84cf7e78a528a9d0159b84 https://git.kernel.org/stable/c/43f78b328f3907ca2f7424e15b7e45ffbf9fe21c https://git.kernel.org/stable/c/9bc184a2eda8b773c88ecbff934001ad649b9cc1