
Proof-of-concept exploit for CVE-2017-16995, a local privilege escalation vulnerability in Ubuntu 16.04 kernels via eBPF bpf(2) syscall. Compile with gcc and execute to gain root.
The latest version of Ubuntu (Ubuntu 16.04) has a high-risk local privilege escalation vulnerability, numbered CVE-2017-16995. This vulnerability exists in the Linux kernel system that calls eBPF bpf(2). When a user provides a malicious BPF program, the eBPF verifier module generates a calculation error, leading to arbitrary memory read and write issues. Low-privileged users can exploit this vulnerability to gain root privileges.
Affected versions: Ubuntu 16.04.1 ~ 16.04.4 all have this vulnerability.
Usage: gcc -o upstream44 upstream44.c to escalate privileges.