CVE-2021-3640: Race Condition

Published Jul 9, 2021
·
Updated

A flaw use-after-free in function scosocksendmsg() of the Linux kernel HCI subsystem was found in the way user calls ioct UFFDIOREGISTER or other way triggers race condition of the call scoconndel() together with the call scosocksendmsg() with the expected controllable faulting memory page. A privileged local user could use this flaw to crash the system or escalate their privileges on the system.

Other sources

Unexpected locking behavior leads to a use-after-free vulnerability in function scosocksendmsg() allowing the attacker to inject a malicious payload.

— Red Hat

Affected Software

153 affected componentsFixes available
redhat/kernel-rt<0:4.18.0-425.3.1.rt7.213.el8
0:4.18.0-425.3.1.rt7.213.el8
redhat/kernel<0:4.18.0-425.3.1.el8
0:4.18.0-425.3.1.el8
redhat/kernel<0:5.14.0-162.6.1.el9_1
0:5.14.0-162.6.1.el9_1
redhat/kernel-rt<0:5.14.0-162.6.1.rt21.168.el9_1
0:5.14.0-162.6.1.rt21.168.el9_1
Linux Linux kernel<4.4.293
Linux Linux kernel>=4.5<4.9.291
Linux Linux kernel>=4.10<4.14.256
Linux Linux kernel>=4.15<4.19.218
Linux Linux kernel>=4.20<5.4.160
Linux Linux kernel>=5.5.0<5.10.80
Linux Linux kernel>=5.11<5.14.19
Linux Linux kernel>=5.15<5.15.3
Debian Debian Linux=9.0
Fedoraproject Fedora=34
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
Canonical Ubuntu Linux=21.10
NetApp H300s Firmware
NetApp H300s
NetApp H700s Firmware
NetApp H700s
NetApp H300e Firmware
NetApp H300e
NetApp H500e Firmware
NetApp H500e
NetApp H700e Firmware
NetApp H700e
NetApp H410s Firmware
NetApp H410s
NetApp H410c Firmware
NetApp H410c
NetApp H500s Firmware
NetApp H500s
All of the following
NetApp H300s Firmware
NetApp H300s
All of the following
NetApp H700s Firmware
NetApp H700s
All of the following
NetApp H300e Firmware
NetApp H300e
All of the following
NetApp H500e Firmware
NetApp H500e
All of the following
NetApp H700e Firmware
NetApp H700e
All of the following
NetApp H410s Firmware
NetApp H410s
All of the following
NetApp H410c Firmware
NetApp H410c
All of the following
NetApp H500s Firmware
NetApp H500s
ubuntu/linux-azure<4.15.0-1130.143~14.04.1
4.15.0-1130.143~14.04.1
ubuntu/linux<3.13.0-219.270
3.13.0-219.270
ubuntu/linux-aws<4.4.0-1161.167
4.4.0-1161.167
ubuntu/linux-lts-xenial<4.4.0-290.324~14.04.1
4.4.0-290.324~14.04.1
ubuntu/linux-aws-hwe<4.15.0-1119.126~16.04.2
4.15.0-1119.126~16.04.2
ubuntu/linux-azure<4.15.0-1130.143~16.04.1
4.15.0-1130.143~16.04.1
ubuntu/linux-gcp<4.15.0-1115.129~16.04.1
4.15.0-1115.129~16.04.1
ubuntu/linux-hwe<4.15.0-167.175~16.04.1
4.15.0-167.175~16.04.1
ubuntu/linux-oracle<4.15.0-1086.94~16.04.1
4.15.0-1086.94~16.04.1
ubuntu/linux<4.4.0-290.324
4.4.0-290.324
ubuntu/linux-hwe-edge*
ubuntu/linux-kvm<4.4.0-1162.173
4.4.0-1162.173
ubuntu/linux-fips<4.4.0-1131.138
4.4.0-1131.138
ubuntu/linux-fips*
ubuntu/linux<4.15.0-167.175
4.15.0-167.175
ubuntu/linux-aws<4.15.0-1119.127
4.15.0-1119.127
ubuntu/linux-aws-5.4<5.4.0-1064.67~18.04.1
5.4.0-1064.67~18.04.1
ubuntu/linux-azure-4.15<4.15.0-1131.144
4.15.0-1131.144
ubuntu/linux-azure-5.4<5.4.0-1068.71~18.04.1
5.4.0-1068.71~18.04.1
ubuntu/linux-dell300x<4.15.0-1034.39
4.15.0-1034.39
ubuntu/linux-gcp-4.15<4.15.0-1115.129
4.15.0-1115.129
ubuntu/linux-gcp-5.4<5.4.0-1063.67~18.04.1
5.4.0-1063.67~18.04.1
ubuntu/linux-gke-5.4<5.4.0-1061.64~18.04.1
5.4.0-1061.64~18.04.1
ubuntu/linux-gkeop-5.4<5.4.0-1032.33~18.04.1
5.4.0-1032.33~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-97.110~18.04.1
5.4.0-97.110~18.04.1
ubuntu/linux-ibm-5.4<5.4.0-1014.15~18.04.1
5.4.0-1014.15~18.04.1
ubuntu/linux-kvm<4.15.0-1106.108
4.15.0-1106.108
ubuntu/linux-oracle<4.15.0-1086.94
4.15.0-1086.94
ubuntu/linux-oracle-5.4<5.4.0-1062.66~18.04.1
5.4.0-1062.66~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1052.58~18.04.1
5.4.0-1052.58~18.04.1
ubuntu/linux-raspi2<4.15.0-1102.109
4.15.0-1102.109
ubuntu/linux-snapdragon<4.15.0-1119.128
4.15.0-1119.128
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-edge*
ubuntu/linux-gke-4.15*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-fips<4.15.0-2060.62
4.15.0-2060.62
ubuntu/linux-azure-fips<4.15.0-2042.46
4.15.0-2042.46
ubuntu/linux-fips<4.15.0-1076.85
4.15.0-1076.85
ubuntu/linux-gcp-fips<4.15.0-2025.27
4.15.0-2025.27
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-97.110
5.4.0-97.110
ubuntu/linux-aws<5.4.0-1064.67
5.4.0-1064.67
ubuntu/linux-aws-5.11<5.11.0-1028.31~20.04.1
5.11.0-1028.31~20.04.1
ubuntu/linux-aws-5.13<5.13.0-1012.13~20.04.1
5.13.0-1012.13~20.04.1
ubuntu/linux-azure<5.4.0-1068.71
5.4.0-1068.71
ubuntu/linux-azure-5.11<5.11.0-1028.31~20.04.2
5.11.0-1028.31~20.04.2
ubuntu/linux-azure-5.13<5.13.0-1013.15~20.04.1
5.13.0-1013.15~20.04.1
ubuntu/linux-bluefield<5.4.0-1026.29
5.4.0-1026.29
ubuntu/linux-gcp<5.4.0-1063.67
5.4.0-1063.67
ubuntu/linux-gcp-5.11<5.11.0-1029.33~20.04.3
5.11.0-1029.33~20.04.3
ubuntu/linux-gcp-5.13<5.13.0-1013.16~20.04.1
5.13.0-1013.16~20.04.1
ubuntu/linux-gke<5.4.0-1061.64
5.4.0-1061.64
ubuntu/linux-gkeop<5.4.0-1032.33
5.4.0-1032.33
ubuntu/linux-hwe-5.13<5.13.0-28.31~20.04.1
5.13.0-28.31~20.04.1
ubuntu/linux-ibm<5.4.0-1013.14
5.4.0-1013.14
ubuntu/linux-kvm<5.4.0-1054.56
5.4.0-1054.56
ubuntu/linux-oem-5.10<5.10.0-1053.55
5.10.0-1053.55
ubuntu/linux-oem-5.13<5.13.0-1029.36
5.13.0-1029.36
ubuntu/linux-oem-5.14<5.14.0-1013.13
5.14.0-1013.13
ubuntu/linux-oracle<5.4.0-1062.66
5.4.0-1062.66
ubuntu/linux-oracle-5.11<5.11.0-1028.31~20.04.1
5.11.0-1028.31~20.04.1
ubuntu/linux-oracle-5.13<5.13.0-1016.20~20.04.1
5.13.0-1016.20~20.04.1
ubuntu/linux-raspi<5.4.0-1052.58
5.4.0-1052.58
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.8*
ubuntu/linux-gcp-5.8*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux-aws-fips<5.4.0-1069.73+fips2
5.4.0-1069.73+fips2
ubuntu/linux-azure-fips<5.4.0-1073.76+fips1
5.4.0-1073.76+fips1
ubuntu/linux-fips<5.4.0-1041.47
5.4.0-1041.47
ubuntu/linux-gcp-fips<5.4.0-1067.71~20.04.1
5.4.0-1067.71~20.04.1
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-raspi-realtime*
debian/linux
4.9.303-14.19.232-15.10.84-15.15.3-1
debian/linux-4.19
4.19.232-1~deb9u1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 0:4.18.0-425.3.1.rt7.213.el8
  2. Upgrade

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

    Fixed in 0:4.18.0-425.3.1.el8
  3. Upgrade

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

    Fixed in 0:5.14.0-162.6.1.el9_1
  4. Upgrade

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

    Fixed in 0:5.14.0-162.6.1.rt21.168.el9_1
  5. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1130.143~14.04.1
  6. Upgrade

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

    Fixed in 3.13.0-219.270
  7. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.4.0-1161.167
  8. Upgrade

    Upgrade ubuntu/linux-lts-xenial to a version that resolves this vulnerability.

    Fixed in 4.4.0-290.324~14.04.1
  9. Upgrade

    Upgrade ubuntu/linux-aws-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-1119.126~16.04.2
  10. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 4.15.0-1130.143~16.04.1
  11. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 4.15.0-1115.129~16.04.1
  12. Upgrade

    Upgrade ubuntu/linux-hwe to a version that resolves this vulnerability.

    Fixed in 4.15.0-167.175~16.04.1
  13. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1086.94~16.04.1
  14. Upgrade

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

    Fixed in 4.4.0-290.324
  15. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 4.4.0-1162.173
  16. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 4.4.0-1131.138
  17. Upgrade

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

    Fixed in 4.15.0-167.175
  18. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 4.15.0-1119.127
  19. Upgrade

    Upgrade ubuntu/linux-aws-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1064.67~18.04.1
  20. Upgrade

    Upgrade ubuntu/linux-azure-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1131.144
  21. Upgrade

    Upgrade ubuntu/linux-azure-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1068.71~18.04.1
  22. Upgrade

    Upgrade ubuntu/linux-dell300x to a version that resolves this vulnerability.

    Fixed in 4.15.0-1034.39
  23. Upgrade

    Upgrade ubuntu/linux-gcp-4.15 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1115.129
  24. Upgrade

    Upgrade ubuntu/linux-gcp-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1063.67~18.04.1
  25. Upgrade

    Upgrade ubuntu/linux-gke-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1061.64~18.04.1
  26. Upgrade

    Upgrade ubuntu/linux-gkeop-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1032.33~18.04.1
  27. Upgrade

    Upgrade ubuntu/linux-hwe-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-97.110~18.04.1
  28. Upgrade

    Upgrade ubuntu/linux-ibm-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1014.15~18.04.1
  29. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 4.15.0-1106.108
  30. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 4.15.0-1086.94
  31. Upgrade

    Upgrade ubuntu/linux-oracle-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1062.66~18.04.1
  32. Upgrade

    Upgrade ubuntu/linux-raspi-5.4 to a version that resolves this vulnerability.

    Fixed in 5.4.0-1052.58~18.04.1
  33. Upgrade

    Upgrade ubuntu/linux-raspi2 to a version that resolves this vulnerability.

    Fixed in 4.15.0-1102.109
  34. Upgrade

    Upgrade ubuntu/linux-snapdragon to a version that resolves this vulnerability.

    Fixed in 4.15.0-1119.128
  35. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2060.62
  36. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2042.46
  37. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-1076.85
  38. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 4.15.0-2025.27
  39. Upgrade

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

    Fixed in 5.4.0-97.110
  40. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 5.4.0-1064.67
  41. Upgrade

    Upgrade ubuntu/linux-aws-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1028.31~20.04.1
  42. Upgrade

    Upgrade ubuntu/linux-aws-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-1012.13~20.04.1
  43. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 5.4.0-1068.71
  44. Upgrade

    Upgrade ubuntu/linux-azure-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1028.31~20.04.2
  45. Upgrade

    Upgrade ubuntu/linux-azure-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-1013.15~20.04.1
  46. Upgrade

    Upgrade ubuntu/linux-bluefield to a version that resolves this vulnerability.

    Fixed in 5.4.0-1026.29
  47. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 5.4.0-1063.67
  48. Upgrade

    Upgrade ubuntu/linux-gcp-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1029.33~20.04.3
  49. Upgrade

    Upgrade ubuntu/linux-gcp-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-1013.16~20.04.1
  50. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 5.4.0-1061.64
  51. Upgrade

    Upgrade ubuntu/linux-gkeop to a version that resolves this vulnerability.

    Fixed in 5.4.0-1032.33
  52. Upgrade

    Upgrade ubuntu/linux-hwe-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-28.31~20.04.1
  53. Upgrade

    Upgrade ubuntu/linux-ibm to a version that resolves this vulnerability.

    Fixed in 5.4.0-1013.14
  54. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 5.4.0-1054.56
  55. Upgrade

    Upgrade ubuntu/linux-oem-5.10 to a version that resolves this vulnerability.

    Fixed in 5.10.0-1053.55
  56. Upgrade

    Upgrade ubuntu/linux-oem-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-1029.36
  57. Upgrade

    Upgrade ubuntu/linux-oem-5.14 to a version that resolves this vulnerability.

    Fixed in 5.14.0-1013.13
  58. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 5.4.0-1062.66
  59. Upgrade

    Upgrade ubuntu/linux-oracle-5.11 to a version that resolves this vulnerability.

    Fixed in 5.11.0-1028.31~20.04.1
  60. Upgrade

    Upgrade ubuntu/linux-oracle-5.13 to a version that resolves this vulnerability.

    Fixed in 5.13.0-1016.20~20.04.1
  61. Upgrade

    Upgrade ubuntu/linux-raspi to a version that resolves this vulnerability.

    Fixed in 5.4.0-1052.58
  62. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1069.73+fips2
  63. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1073.76+fips1
  64. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1041.47
  65. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 5.4.0-1067.71~20.04.1
  66. Upgrade

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

    Fixed in 4.9.303-1Fixed in 4.19.232-1Fixed in 5.10.84-1Fixed in 5.15.3-1
  67. Upgrade

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

    Fixed in 4.19.232-1~deb9u1

Event History

Jul 9, 2021
Data Sourced
06:34 AM
DescriptionSeverityAffected Software
Jul 18, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyWeakness
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
Data Sourced
via OSV·12:00 PM
DescriptionSeverityAffected Software
Event
via OSV·12:00 PM
Mar 3, 2022
CVE Published
via MITRE·10:04 PM
Data Sourced
via MITRE·10:04 PM
DescriptionWeakness
Nov 7, 2023
Data Sourced
via NVD·03:38 AM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
03:38 AM
WeaknessAffected Software
Updated
03:38 AM
Affected Software
Dec 7, 2023
Data Sourced
via Red Hat·02:31 PM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·06:22 AM
RemedyAffected Software
Jun 17, 2026
Updated
via NVD·04:05 AM
Affected Software
Nov 11, 2026
Updated
via OSV·09:37 AM
Affected Software
Nov 12, 2026
Updated
via OSV·05:22 PM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2021-3640?

The severity of CVE-2021-3640 is rated as medium, posing a potential risk for denial of service or data corruption.

2

How do I fix CVE-2021-3640?

To fix CVE-2021-3640, upgrade to the recommended versions of the Linux kernel, specifically 0:4.18.0-425.3.1.el8 or higher.

3

What systems are affected by CVE-2021-3640?

CVE-2021-3640 affects multiple versions of the Linux kernel across various distributions including Red Hat, Ubuntu, and Debian.

4

Is CVE-2021-3640 a remote exploit?

CVE-2021-3640 is not a remote exploit but rather requires local access to trigger the vulnerability.

5

What mitigations exist for CVE-2021-3640?

Mitigations for CVE-2021-3640 involve applying the latest kernel updates that address the use-after-free flaw.

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