CVE-2021-4202: Use After Free

Published Jan 3, 2022
·
Updated

A flaw was found in the Linux kernel. Similar to the CVE-2021-35373, the ncirequest() function in NFC NCI code also suffers from a data race. This race will allow ncirequest() to be awaken while the device is getting removed and cause UAF. The attacker can spray the released object to gain powerful primitive.

Upstream commit:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=86cdf8e38792545161dbe3350a7eced558ba4d15 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48b71a9e66c2eab60564b1b1c85f4928ed04e406 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3e3b5dfcd16a3e254aab61bd1e8c417dd4503102 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aedddb4e45b34426cfbfa84454b6f203712733c5

Other sources

A use-after-free flaw was found in ncirequest in net/nfc/nci/core.c in NFC Controller Interface (NCI) in the Linux kernel. This flaw could allow a local attacker with user privileges to cause a data race problem while the device is getting removed, leading to a privilege escalation problem.

— Launchpad

Affected Software

9 affected componentsFixes available
redhat/kernel<5.16
5.16
Linux Linux kernel>=3.2<4.4.294
Linux Linux kernel>=4.5<4.9.292
Linux Linux kernel>=4.10<4.14.257
Linux Linux kernel>=4.15<4.19.219
Linux Linux kernel>=4.20<5.4.163
Linux Linux kernel>=5.5.0<5.10.82
Linux Linux kernel>=5.11<5.15.5
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 5.16
  3. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch 3e3b5dfcd16a3e254aab61bd1e8c417dd4503102
  4. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch 48b71a9e66c2eab60564b1b1c85f4928ed04e406
  5. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch 86cdf8e38792545161dbe3350a7eced558ba4d15
  6. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch aedddb4e45b34426cfbfa84454b6f203712733c5

Event History

Jan 3, 2022
Data Sourced
via Red Hat·03:05 PM
DescriptionSeverityAffected Software
Mar 25, 2022
CVE Published
via MITRE·06:02 PM
Data Sourced
via MITRE·06:02 PM
DescriptionWeakness
Jan 12, 2024
Data Sourced
via Launchpad·12:01 AM
Description
Apr 28, 2025
Data Sourced
via Ubuntu·04:34 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2021-4202?

CVE-2021-4202 is classified as a medium-severity vulnerability due to the potential for data races within the Linux kernel.

2

How do I fix CVE-2021-4202?

To mitigate CVE-2021-4202, upgrade to the Linux kernel version 5.16 or higher.

3

Which systems are affected by CVE-2021-4202?

CVE-2021-4202 affects multiple versions of the Linux kernel, specifically those between versions 3.2 and 5.15.

4

What component in the kernel is affected by CVE-2021-4202?

The vulnerability in CVE-2021-4202 is found in the nci_request() function within the NFC NCI code of the Linux kernel.

5

Is CVE-2021-4202 similar to any other vulnerabilities?

Yes, CVE-2021-4202 is similar to CVE-2021-35373 as both involve data races in the Linux kernel.

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