CVE-2020-27170: Infoleak

Published Mar 18, 2021
·
Updated

A flaw was found in the Linux kernels eBPF verification code. By default accessing the eBPF verifier is only accessible to privileged users with CAPSYSADMIN. A local user with the ability to insert eBPF instructions can use the eBPF verifier to abuse a spectre like flaw where they can infer all system memory.

Other sources

An issue was discovered in the Linux kernel before 5.11.8. kernel/bpf/verifier.c performs undesirable out-of-bounds speculation on pointer arithmetic, leading to side-channel attacks that defeat Spectre mitigations and obtain sensitive information from kernel memory, aka CID-f232326f6966. This affects pointer types that do not define a ptrlimit.

Linux Kernel could allow a local authenticated attacker to obtain sensitive information, caused by an out-of-bounds loads flaw. By executing specially-crafted BPF programs, an attacker could exploit this vulnerability to obtain contents of kernel memory, and use this information to launch further attacks against the affected system.

IBM

Speculation on pointer arithmetic against bpfcontext pointer allows unprivileged local users to leak content of kernel memory.

Bug Fix

The minimal fix is:

bpf: Prohibit alu ops for pointer types not defining ptrlimit [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=f232326f6966cf2a1d1db7bc917a4ce5f9f55f76 ]

However it is recommended to use the whole series that also includes fix for another similar vulnerability reported at the same time and improvements of the affected code:

bpf: Prohibit alu ops for pointer types not defining ptrlimit [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=f232326f6966cf2a1d1db7bc917a4ce5f9f55f76 ] bpf: Fix off-by-one for area size in creating mask to left [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=10d2bb2e6b1d8c4576c56a748f697dbeb8388899 ] bpf: Simplify alulimit masking for pointer arithmetic [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=b5871dca250cd391885218b99cc015aca1a51aea ] bpf: Add sanity check for upper ptrlimit [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=1b1597e64e1a610c7a96710fc4717158e98a08b3 ] bpf, selftests: Fix up some testverifier cases for unprivileged [ https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/patch/?id=0a13e3537ea67452d549a6a80da3776d6b7dedb3 ]

Red Hat

Affected Software

13 affected componentsFixes available
redhat/kernel-rt<0:3.10.0-1160.31.1.rt56.1169.el7
0:3.10.0-1160.31.1.rt56.1169.el7
redhat/kernel<0:3.10.0-1160.31.1.el7
0:3.10.0-1160.31.1.el7
IBM DRM<=2.0.6
Linux Linux kernel<5.11.8
Fedoraproject Fedora=32
Fedoraproject Fedora=33
Fedoraproject Fedora=34
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=20.04
Debian Debian Linux=9.0
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Remediation

Information

The default Red Hat Enterprise Linux kernel prevents unprivileged users from being able to use eBPF by the kernel.unprivileged_bpf_disabled sysctl. This would require a privileged user with CAP_SYS_ADMIN or root to be able to abuse this flaw reducing its attack space. For the Red Hat Enterprise Linux 7 the eBPF for unprivileged users is always disabled. For the Red Hat Enterprise Linux 8 to confirm the current state, inspect the sysctl with the command: # cat /proc/sys/kernel/unprivileged_bpf_disabled The setting of 1 would mean that unprivileged users can not use eBPF, mitigating the flaw. A kernel update will be required to mitigate the flaw for the root or users with CAP_SYS_ADMIN capabilities.

Event History

Mar 18, 2021
Data Sourced
via Red Hat·06:40 PM
DescriptionSeverityAffected Software
Mar 19, 2021
CVE Published
12:00 AM
Mar 20, 2021
CVE Published
via MITRE·09:30 PM
Data Sourced
via MITRE·09:30 PM
Description
Jan 11, 2024
Data Sourced
via Launchpad·11:47 PM
Description
May 2, 2025
Data Sourced
via Ubuntu·03:45 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2020-27170?

The severity of CVE-2020-27170 is classified as medium.

2

How do I fix CVE-2020-27170?

To fix CVE-2020-27170, update to the latest kernel version that contains the patch for this vulnerability.

3

Which Linux kernel versions are affected by CVE-2020-27170?

CVE-2020-27170 affects Linux kernel versions prior to 5.11.8.

4

Is CVE-2020-27170 exploitable remotely?

CVE-2020-27170 is a local vulnerability and cannot be exploited remotely.

5

What types of systems are impacted by CVE-2020-27170?

CVE-2020-27170 impacts systems running affected versions of the Linux kernel and certain distributions like Red Hat, Ubuntu, and Debian.

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