CVE-2021-0512: Buffer Overflow

Published Jun 1, 2021
·
Updated

A flaw out of bounds memory write in the Linux kernel HID subsystem was found in the way user attach USB or other HID device that generates incorrect data inside HID report field. A local user could use this flaw to crash the system or possibly escalate their privileges on the system.

Other sources

In hidinputchangeresolutionmultipliers of hid-input.c, there is a possible out of bounds write due to a heap buffer overflow. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.

— OSV

Affected Software

89 affected componentsFixes available
redhat/kernel-rt<0:4.18.0-305.25.1.rt7.97.el8_4
0:4.18.0-305.25.1.rt7.97.el8_4
redhat/kernel<0:4.18.0-305.25.1.el8_4
0:4.18.0-305.25.1.el8_4
redhat/kernel-rt<0:4.18.0-193.65.2.rt13.117.el8_2
0:4.18.0-193.65.2.rt13.117.el8_2
redhat/kernel<0:4.18.0-193.65.2.el8_2
0:4.18.0-193.65.2.el8_2
Google Android
redhat/linux kernel<5.12
5.12
Google Android
ubuntu/linux-aws<4.4.0-1090.94
4.4.0-1090.94
ubuntu/linux-azure<4.15.0-1114.127~14.04.1
4.15.0-1114.127~14.04.1
ubuntu/linux-lts-xenial<4.4.0-208.240~14.04.1
4.4.0-208.240~14.04.1
ubuntu/linux*
ubuntu/linux<4.4.0-208.240
4.4.0-208.240
ubuntu/linux-aws<4.4.0-1126.140
4.4.0-1126.140
ubuntu/linux-kvm<4.4.0-1091.100
4.4.0-1091.100
ubuntu/linux-aws-hwe<4.15.0-1102.109~16.04.1
4.15.0-1102.109~16.04.1
ubuntu/linux-azure<4.15.0-1114.127~16.04.1
4.15.0-1114.127~16.04.1
ubuntu/linux-gcp<4.15.0-1099.112~16.04.1
4.15.0-1099.112~16.04.1
ubuntu/linux-hwe<4.15.0-143.147~16.04.3
4.15.0-143.147~16.04.3
ubuntu/linux-oracle<4.15.0-1071.79~16.04.1
4.15.0-1071.79~16.04.1
ubuntu/linux-hwe-edge*
ubuntu/linux-fips<4.4.0-1060.66
4.4.0-1060.66
ubuntu/linux-fips*
ubuntu/linux<4.15.0-143.147
4.15.0-143.147
ubuntu/linux-aws<4.15.0-1102.109
4.15.0-1102.109
ubuntu/linux-aws-5.4<5.4.0-1043.45~18.04.1
5.4.0-1043.45~18.04.1
ubuntu/linux-azure-4.15<4.15.0-1114.127
4.15.0-1114.127
ubuntu/linux-azure-5.4<5.4.0-1044.46~18.04.1
5.4.0-1044.46~18.04.1
ubuntu/linux-dell300x<4.15.0-1018.22
4.15.0-1018.22
ubuntu/linux-gcp-4.15<4.15.0-1099.112
4.15.0-1099.112
ubuntu/linux-gcp-5.4<5.4.0-1041.44~18.04.1
5.4.0-1041.44~18.04.1
ubuntu/linux-gke-5.4<5.4.0-1040.42~18.04.1
5.4.0-1040.42~18.04.1
ubuntu/linux-gkeop-5.4<5.4.0-1013.14~18.04.1
5.4.0-1013.14~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-71.79~18.04.1
5.4.0-71.79~18.04.1
ubuntu/linux-kvm<4.15.0-1091.93
4.15.0-1091.93
ubuntu/linux-oracle<4.15.0-1071.79
4.15.0-1071.79
ubuntu/linux-oracle-5.4<5.4.0-1042.45~18.04.1
5.4.0-1042.45~18.04.1
ubuntu/linux-raspi-5.4<5.4.0-1033.36~18.04.1
5.4.0-1033.36~18.04.1
ubuntu/linux-raspi2<4.15.0-1085.90
4.15.0-1085.90
ubuntu/linux-snapdragon<4.15.0-1102.111
4.15.0-1102.111
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-2044.46
4.15.0-2044.46
ubuntu/linux-azure-fips<4.15.0-2026.29
4.15.0-2026.29
ubuntu/linux-fips<4.15.0-1059.67
4.15.0-1059.67
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-71.79
5.4.0-71.79
ubuntu/linux-aws<5.4.0-1043.45
5.4.0-1043.45
ubuntu/linux-azure<5.4.0-1044.46
5.4.0-1044.46
ubuntu/linux-gcp<5.4.0-1041.44
5.4.0-1041.44
ubuntu/linux-gke<5.4.0-1041.43
5.4.0-1041.43
ubuntu/linux-gkeop<5.4.0-1013.14
5.4.0-1013.14
ubuntu/linux-hwe-5.8<5.8.0-53.60~20.04.1
5.8.0-53.60~20.04.1
ubuntu/linux-kvm<5.4.0-1037.38
5.4.0-1037.38
ubuntu/linux-oem-5.10<5.10.0-1021.22
5.10.0-1021.22
ubuntu/linux-oracle<5.4.0-1042.45
5.4.0-1042.45
ubuntu/linux-raspi<5.4.0-1033.36
5.4.0-1033.36
ubuntu/linux-riscv-5.8<5.8.0-25.27~20.04.1
5.8.0-25.27~20.04.1
ubuntu/linux-oem-5.6*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
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-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-gcp-fips*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-raspi-realtime*
android/:linux_kernel:>=:0<:2021-06-05
:2021-06-05
debian/linux<5.10.19-1
5.10.19-1
debian/linux<5.10.19-1
5.10.19-1
debian/linux<5.10.19-1
5.10.19-1
debian/linux
4.9.272-14.19.181-15.10.19-1

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-305.25.1.rt7.97.el8_4
  2. Upgrade

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

    Fixed in 0:4.18.0-305.25.1.el8_4
  3. Upgrade

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

    Fixed in 0:4.18.0-193.65.2.rt13.117.el8_2
  4. Upgrade

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

    Fixed in 0:4.18.0-193.65.2.el8_2
  5. Upgrade

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

    Fixed in 5.12
  6. Upgrade

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

    Fixed in 4.4.0-1090.94
  7. Upgrade

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

    Fixed in 4.15.0-1114.127~14.04.1
  8. Upgrade

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

    Fixed in 4.4.0-208.240~14.04.1
  9. Upgrade

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

    Fixed in 4.4.0-208.240
  10. Upgrade

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

    Fixed in 4.4.0-1126.140
  11. Upgrade

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

    Fixed in 4.4.0-1091.100
  12. Upgrade

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

    Fixed in 4.15.0-1102.109~16.04.1
  13. Upgrade

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

    Fixed in 4.15.0-1114.127~16.04.1
  14. Upgrade

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

    Fixed in 4.15.0-1099.112~16.04.1
  15. Upgrade

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

    Fixed in 4.15.0-143.147~16.04.3
  16. Upgrade

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

    Fixed in 4.15.0-1071.79~16.04.1
  17. Upgrade

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

    Fixed in 4.4.0-1060.66
  18. Upgrade

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

    Fixed in 4.15.0-143.147
  19. Upgrade

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

    Fixed in 4.15.0-1102.109
  20. Upgrade

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

    Fixed in 5.4.0-1043.45~18.04.1
  21. Upgrade

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

    Fixed in 4.15.0-1114.127
  22. Upgrade

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

    Fixed in 5.4.0-1044.46~18.04.1
  23. Upgrade

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

    Fixed in 4.15.0-1018.22
  24. Upgrade

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

    Fixed in 4.15.0-1099.112
  25. Upgrade

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

    Fixed in 5.4.0-1041.44~18.04.1
  26. Upgrade

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

    Fixed in 5.4.0-1040.42~18.04.1
  27. Upgrade

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

    Fixed in 5.4.0-1013.14~18.04.1
  28. Upgrade

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

    Fixed in 5.4.0-71.79~18.04.1
  29. Upgrade

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

    Fixed in 4.15.0-1091.93
  30. Upgrade

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

    Fixed in 4.15.0-1071.79
  31. Upgrade

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

    Fixed in 5.4.0-1042.45~18.04.1
  32. Upgrade

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

    Fixed in 5.4.0-1033.36~18.04.1
  33. Upgrade

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

    Fixed in 4.15.0-1085.90
  34. Upgrade

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

    Fixed in 4.15.0-1102.111
  35. Upgrade

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

    Fixed in 4.15.0-2044.46
  36. Upgrade

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

    Fixed in 4.15.0-2026.29
  37. Upgrade

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

    Fixed in 4.15.0-1059.67
  38. Upgrade

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

    Fixed in 5.4.0-71.79
  39. Upgrade

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

    Fixed in 5.4.0-1043.45
  40. Upgrade

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

    Fixed in 5.4.0-1044.46
  41. Upgrade

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

    Fixed in 5.4.0-1041.44
  42. Upgrade

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

    Fixed in 5.4.0-1041.43
  43. Upgrade

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

    Fixed in 5.4.0-1013.14
  44. Upgrade

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

    Fixed in 5.8.0-53.60~20.04.1
  45. Upgrade

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

    Fixed in 5.4.0-1037.38
  46. Upgrade

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

    Fixed in 5.10.0-1021.22
  47. Upgrade

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

    Fixed in 5.4.0-1042.45
  48. Upgrade

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

    Fixed in 5.4.0-1033.36
  49. Upgrade

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

    Fixed in 5.8.0-25.27~20.04.1
  50. Upgrade

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

    Fixed in 5.4.0-1069.73+fips2
  51. Upgrade

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

    Fixed in 5.4.0-1073.76+fips1
  52. Upgrade

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

    Fixed in 5.4.0-1067.71~20.04.1
  53. Upgrade

    Upgrade android/:linux_kernel: to a version that resolves this vulnerability.

    Fixed in :2021-06-05
  54. Upgrade

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

    Fixed in 5.10.19-1
  55. Upgrade

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

    Fixed in 4.9.272-1Fixed in 4.19.181-1Fixed in 5.10.19-1
  56. Upgrade

    Upgrade Android kernel to a version that resolves this vulnerability.

    Patch ed9be64eefe2

Event History

Jun 1, 2021
Advisory Published
via OSV·12:00 AM
Data Sourced
via OSV·12:00 AM
DescriptionAffected Software
Jun 7, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
SeverityWeaknessAffected Software
Data Sourced
12:00 AM
RemedyDescription
Jun 21, 2021
CVE Published
via MITRE·04:01 PM
Data Sourced
via MITRE·04:01 PM
DescriptionWeakness
Data Sourced
via OSV·05:15 PM
Severity
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 17, 2022
Data Sourced
via Red Hat·09:27 PM
DescriptionSeverityAffected Software
Oct 25, 2022
Data Sourced
via Android·12:00 AM
SeverityWeaknessAffected Software
Feb 7, 2024
Updated
via Android·12:00 AM
Affected Software
Mar 11, 2024
Updated
via Android·12:00 AM
Affected Software
Mar 18, 2024
Updated
via Android·12:00 AM
Affected Software
Apr 29, 2024
Updated
via Android·12:00 AM
Affected Software
Aug 26, 2024
Updated
via Android·12:00 AM
Affected Software
Jun 23, 2026
Updated
via Android·12:00 AM
Affected Software
Nov 11, 2026
Updated
via OSV·09:36 AM
Affected Software
Nov 12, 2026
Updated
via OSV·05:20 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 CVE-2021-0512?

CVE-2021-0512 is a vulnerability in the Linux kernel HID subsystem that allows for a possible out-of-bounds write due to a heap buffer overflow.

2

How does CVE-2021-0512 affect Android?

CVE-2021-0512 affects Android versions.

3

How severe is CVE-2021-0512?

CVE-2021-0512 has a severity score of 7.8 out of 10.

4

What is the impact of CVE-2021-0512?

CVE-2021-0512 could lead to local escalation of privilege with no additional execution privileges needed.

5

How can CVE-2021-0512 be fixed?

To fix CVE-2021-0512, update to Linux kernel version 5.12 or apply the relevant security patches for your specific distribution.

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