First published: Fri Apr 23 2021(Updated: )
A failing usercopy of the slot uid will lead to a stale entry in the file descriptor table as put_unused_fd() won't release it. This enables userland to refer to a dangling 'file' object through that still valid file descriptor, leading to all kinds of use-after-free exploitation scenarios. Exchanging put_unused_fd() for close_fd(), ksys_close() or alike won't solve the underlying issue, as the file descriptor might have been replaced in the meantime, e.g. via userland calling close() on it (leading to a NULL pointer dereference in the error handling code as 'fget(enclave_fd)' will return a NULL pointer) or by dup2()'ing a completely different file object to that very file descriptor, leading to the same situation: a dangling file descriptor pointing to a freed object -- just in this case to a file object of user's choosing. Generally speaking, after the call to fd_install() the file descriptor is live and userland is free to do whatever with it. We cannot rely on it to still refer to our enclave object afterwards. In fact, by abusing userfaultfd() userland can hit the condition without any racing and abuse the error handling in the nitro code as it pleases.
Credit: secalert@redhat.com
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/kernel-rt | <0:4.18.0-305.3.1.rt7.75.el8_4 | 0:4.18.0-305.3.1.rt7.75.el8_4 |
redhat/kernel | <0:4.18.0-305.3.1.el8_4 | 0:4.18.0-305.3.1.el8_4 |
redhat/kernel | <4.18.0 | 4.18.0 |
Nitro Enclaves | <5.10.0 | |
Red Hat Enterprise Linux | =8.0 | |
Red Hat Fedora | =34 | |
debian/linux | 5.10.223-1 5.10.234-1 6.1.129-1 6.1.128-1 6.12.20-1 6.12.21-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2021-3543 is considered to have a high severity due to its potential for use-after-free exploitation scenarios.
To fix CVE-2021-3543, users should update to kernel versions 0:4.18.0-305.3.1.rt7.75.el8_4, 0:4.18.0-305.3.1.el8_4, or appropriate patched versions from Red Hat or Debian.
CVE-2021-3543 affects multiple versions of the kernel, specifically those prior to certain patched releases from Red Hat and Debian.
CVE-2021-3543 is a use-after-free vulnerability that can lead to exploitation via dangling file descriptors.
Yes, CVE-2021-3543 could potentially be exploited remotely if an attacker has access to affected kernel components.