7.2
CWE
416 476
Advisory Published
CVE Published
CVE Published
Updated

CVE-2021-3543: Use After Free

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 SoftwareAffected VersionHow 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

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Parent vulnerabilities

(Appears in the following advisories)

Frequently Asked Questions

  • What is the severity of CVE-2021-3543?

    CVE-2021-3543 is considered to have a high severity due to its potential for use-after-free exploitation scenarios.

  • How do I fix CVE-2021-3543?

    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.

  • Which software is affected by CVE-2021-3543?

    CVE-2021-3543 affects multiple versions of the kernel, specifically those prior to certain patched releases from Red Hat and Debian.

  • What type of vulnerability is CVE-2021-3543?

    CVE-2021-3543 is a use-after-free vulnerability that can lead to exploitation via dangling file descriptors.

  • Can CVE-2021-3543 be exploited remotely?

    Yes, CVE-2021-3543 could potentially be exploited remotely if an attacker has access to affected kernel components.

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.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203