CVE-2020-27786: Use After Free

Published Nov 24, 2020
·
Updated

A flaw was found in the Linux kernel’s implementation of MIDI, where an attacker with a local account and the permissions to issue ioctl commands to midi devices could trigger a use-after-free issue. A write to this specific memory while freed and before use causes the flow of execution to change and possibly allow for memory corruption or privilege escalation. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.

Other sources

A flaw was found in the Linux kernels implementation of MIDI, where an attacker with a local account and the permissions to issue an ioctl commands to midi devices, could trigger a use-after-free. A write to this specific memory while freed and before use could cause the flow of execution to change and possibly allow for memory corruption or privilege escalation.

This would only affect systems that have attached local MIDI hardware with the midi kernel modules loaded.

— Red Hat

In several functions of rawmidi.c, there is a possible use after free due to a race condition. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation.

— OSV

Affected Software

83 affected componentsFixes available
redhat/kernel<5.7
5.7
Linux Linux kernel<4.4.224
Linux Linux kernel>=4.5<4.9.224
Linux Linux kernel>=4.10<4.14.181
Linux Linux kernel>=4.15<4.19.124
Linux Linux kernel>=4.20<5.4.42
Linux Linux kernel>=5.5<5.6.14
redhat OpenShift Container Platform=4.4
redhat OpenShift Container Platform=4.5
redhat OpenShift Container Platform=4.6
redhat Enterprise Linux=7.0
redhat Enterprise Linux=8.0
redhat Enterprise MRG=2.0
NetApp Cloud Backup
NetApp Solidfire Baseboard Management Controller
android/:linux_kernel:>=:0<:2021-05-05
:2021-05-05
ubuntu/linux-aws<4.4.0-1074.78
4.4.0-1074.78
ubuntu/linux-azure<4.15.0-1091.101~14.04.1
4.15.0-1091.101~14.04.1
ubuntu/linux-lts-xenial<4.4.0-185.215~14.04.1
4.4.0-185.215~14.04.1
ubuntu/linux*
ubuntu/linux<4.4.0-185.215
4.4.0-185.215
ubuntu/linux-aws<4.4.0-1110.121
4.4.0-1110.121
ubuntu/linux-aws-hwe<4.15.0-1074.78~16.04.1
4.15.0-1074.78~16.04.1
ubuntu/linux-azure<4.15.0-1091.101~16.04.1
4.15.0-1091.101~16.04.1
ubuntu/linux-gcp<4.15.0-1078.88~16.04.1
4.15.0-1078.88~16.04.1
ubuntu/linux-hwe<4.15.0-107.108~16.04.1
4.15.0-107.108~16.04.1
ubuntu/linux-kvm<4.4.0-1076.83
4.4.0-1076.83
ubuntu/linux-oracle<4.15.0-1046.50~16.04.1
4.15.0-1046.50~16.04.1
ubuntu/linux-raspi2<4.4.0-1135.144
4.4.0-1135.144
ubuntu/linux-snapdragon<4.4.0-1139.147
4.4.0-1139.147
ubuntu/linux-hwe-edge*
ubuntu/linux-fips<4.4.0-1042.47
4.4.0-1042.47
ubuntu/linux-fips*
ubuntu/linux<4.15.0-109.110
4.15.0-109.110
ubuntu/linux-aws<4.15.0-1077.81
4.15.0-1077.81
ubuntu/linux-azure-4.15<4.15.0-1091.101
4.15.0-1091.101
ubuntu/linux-gcp-4.15<4.15.0-1078.88
4.15.0-1078.88
ubuntu/linux-gke-4.15<4.15.0-1064.67
4.15.0-1064.67
ubuntu/linux-gke-5.0<5.0.0-1043.44
5.0.0-1043.44
ubuntu/linux-gke-5.3<5.3.0-1030.32~18.04.1
5.3.0-1030.32~18.04.1
ubuntu/linux-hwe-5.4<5.4.0-40.44~18.04.1
5.4.0-40.44~18.04.1
ubuntu/linux-kvm<4.15.0-1069.70
4.15.0-1069.70
ubuntu/linux-oem-osp1<5.0.0-1063.68
5.0.0-1063.68
ubuntu/linux-oracle<4.15.0-1048.52
4.15.0-1048.52
ubuntu/linux-raspi2<4.15.0-1065.69
4.15.0-1065.69
ubuntu/linux-raspi2-5.3<5.3.0-1028.30~18.04.2
5.3.0-1028.30~18.04.2
ubuntu/linux-snapdragon<4.15.0-1081.88
4.15.0-1081.88
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-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-2022.22
4.15.0-2022.22
ubuntu/linux-azure-fips<4.15.0-2006.7
4.15.0-2006.7
ubuntu/linux-fips<4.15.0-1035.40
4.15.0-1035.40
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.4.0-40.44
5.4.0-40.44
ubuntu/linux-aws<5.4.0-1018.18
5.4.0-1018.18
ubuntu/linux-azure<5.4.0-1020.20
5.4.0-1020.20
ubuntu/linux-gcp<5.4.0-1019.19
5.4.0-1019.19
ubuntu/linux-kvm<5.4.0-1018.18
5.4.0-1018.18
ubuntu/linux-oem-5.6<5.6.0-1011.11
5.6.0-1011.11
ubuntu/linux-oracle<5.4.0-1019.19
5.4.0-1019.19
ubuntu/linux-raspi<5.4.0-1013.13
5.4.0-1013.13
ubuntu/linux-riscv<5.4.0-28.32
5.4.0-28.32
ubuntu/linux-azure-fde*
ubuntu/linux-azure-fde-5.15<5.15.0-1114.123~20.04.1
5.15.0-1114.123~20.04.1
ubuntu/linux-gke*
ubuntu/linux-raspi2*
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-raspi-realtime*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 5.7
  2. Upgrade

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

    Fixed in :2021-05-05
  3. Upgrade

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

    Fixed in 4.4.0-1074.78
  4. Upgrade

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

    Fixed in 4.15.0-1091.101~14.04.1
  5. Upgrade

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

    Fixed in 4.4.0-185.215~14.04.1
  6. Upgrade

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

    Fixed in 4.4.0-185.215
  7. Upgrade

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

    Fixed in 4.4.0-1110.121
  8. Upgrade

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

    Fixed in 4.15.0-1074.78~16.04.1
  9. Upgrade

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

    Fixed in 4.15.0-1091.101~16.04.1
  10. Upgrade

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

    Fixed in 4.15.0-1078.88~16.04.1
  11. Upgrade

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

    Fixed in 4.15.0-107.108~16.04.1
  12. Upgrade

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

    Fixed in 4.4.0-1076.83
  13. Upgrade

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

    Fixed in 4.15.0-1046.50~16.04.1
  14. Upgrade

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

    Fixed in 4.4.0-1135.144
  15. Upgrade

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

    Fixed in 4.4.0-1139.147
  16. Upgrade

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

    Fixed in 4.4.0-1042.47
  17. Upgrade

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

    Fixed in 4.15.0-109.110
  18. Upgrade

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

    Fixed in 4.15.0-1077.81
  19. Upgrade

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

    Fixed in 4.15.0-1091.101
  20. Upgrade

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

    Fixed in 4.15.0-1078.88
  21. Upgrade

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

    Fixed in 4.15.0-1064.67
  22. Upgrade

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

    Fixed in 5.0.0-1043.44
  23. Upgrade

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

    Fixed in 5.3.0-1030.32~18.04.1
  24. Upgrade

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

    Fixed in 5.4.0-40.44~18.04.1
  25. Upgrade

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

    Fixed in 4.15.0-1069.70
  26. Upgrade

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

    Fixed in 5.0.0-1063.68
  27. Upgrade

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

    Fixed in 4.15.0-1048.52
  28. Upgrade

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

    Fixed in 4.15.0-1065.69
  29. Upgrade

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

    Fixed in 5.3.0-1028.30~18.04.2
  30. Upgrade

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

    Fixed in 4.15.0-1081.88
  31. Upgrade

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

    Fixed in 4.15.0-2022.22
  32. Upgrade

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

    Fixed in 4.15.0-2006.7
  33. Upgrade

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

    Fixed in 4.15.0-1035.40
  34. Upgrade

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

    Fixed in 5.4.0-40.44
  35. Upgrade

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

    Fixed in 5.4.0-1018.18
  36. Upgrade

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

    Fixed in 5.4.0-1020.20
  37. Upgrade

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

    Fixed in 5.4.0-1019.19
  38. Upgrade

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

    Fixed in 5.4.0-1018.18
  39. Upgrade

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

    Fixed in 5.6.0-1011.11
  40. Upgrade

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

    Fixed in 5.4.0-1019.19
  41. Upgrade

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

    Fixed in 5.4.0-1013.13
  42. Upgrade

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

    Fixed in 5.4.0-28.32
  43. Upgrade

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

    Fixed in 5.15.0-1114.123~20.04.1

Event History

Dec 11, 2020
CVE Published
via MITRE·04:05 AM
Data Sourced
via MITRE·04:05 AM
DescriptionWeakness
Data Sourced
via OSV·05:15 AM
DescriptionSeverityAffected Software
May 1, 2021
Advisory Published
via OSV·12:00 AM

Frequently Asked Questions

1

What is the vulnerability ID for this flaw in the Linux kernel’s implementation of MIDI?

The vulnerability ID for this flaw is CVE-2020-27786.

2

What is the severity of CVE-2020-27786?

The severity of CVE-2020-27786 is high with a CVSS score of 7.8.

3

How can an attacker exploit CVE-2020-27786?

An attacker with a local account and permissions to issue ioctl commands to MIDI devices can exploit CVE-2020-27786 by triggering a use-after-free issue.

4

Which versions of the Linux kernel are affected by CVE-2020-27786?

The Linux kernel versions affected by CVE-2020-27786 are 4.4.224 up to exclusive 5.7.

5

How can I fix CVE-2020-27786 in the Linux kernel?

To fix CVE-2020-27786 in the Linux kernel, update to version 5.7 or apply the appropriate patch provided by your Linux 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