![](https://nsfocusglobal.com/wp-content/uploads/2019/06/linux.jpg)
Vulnerability Description
Recently, NSFOCUS detected a privilege escalation vulnerability in the Linux kernel (CVE-2020-14386). An integer overflow exists in the way net/packet/af_packet.c processes AF_PACKET, which leads to out-of-bounds write, thereby escalating privileges. An attacker could exploit this vulnerability to gain system root privileges from unprivileged processes. This vulnerability may affect virtualized products using the Linux kernel, such as OpenShift, Kubernetes, and docker, thus leading to VM escape. Affected users should take preventive measures.
Scope of Impact
Affected versions
- 4.6<= Linux kernel < 5.9-rc4
- CentOS = 8
- Ubuntu => 18.04
- RHEL = 8
- Debian = 9-10
Unaffected versions
- Linux kernel => 5.9-rc4
Check for the Vulnerability
- Version Check
Users of the Linux system could run the following command to check the current version to determine whether it is vulnerable:
cat /proc/version |
![This image has an empty alt attribute; its file name is 1020-1.jpg](https://nsfocusglobal.com/wp-content/uploads/2020/10/1020-1.jpg)
Mitigation
- Official Fix
Method 1: Upgrade the Linux kernel.
Download link: https://github.com/torvalds/linux/releases
Method 2: The Linux code library has released patches. Affected users are advised to apply the patches.
commit id: acf69c946233259ab4d64f8869d4037a198c7f06
- Other Protection Measures
I. Disable the CAP_NET_RAW function
The procedure on Red Hat Enterprise Linux 8 (RHEL8) is as follows:
# echo"user.max_user_namespaces=0" > /etc/sysctl.d/userns.conf |
For a single executable, perform the following steps:
# View the CAP privilege of the executable getcap /bin/ping /bin/ping cap_net_raw=ep # Remove the CAP_NET_RAW privilege setcap cap_net_raw-ep /bin/ping # Check getcap /bin/ping /bin/ping = |
II. Affected container products can also be protected by disabling the CAP_NET_RAW function:
Kubernetes: Configure Pod security policies to delete the CAP_NET_RAW function in the running container by clicking the following link: https://cloud.google.com/kubernetes-engine/docs/security-bulletins.
Statement
This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.
About NSFOCUS
NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.
NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA). A wholly owned subsidiary of NSFOCUS Technologies Group Co., Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.