Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2017-16995: Linux eBPF Verifier Sign-Extension Privilege Escalation

Published Dec 22, 2017 · Updated 17 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 2 in a dayToday
CVSS7.8High · v3.1
EPSS30.1%99th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendors
Debian ProjectLinuxCanonical
IdentifiersCVE-2017-16995CWE-194

CVE-2017-16995 is an incorrect sign-extension vulnerability in the Linux kernel eBPF verifier's check_alu_op() function, affecting kernels described as through version 4.4. Incorrect handling of arithmetic instructions causes verifier assumptions to diverge from runtime behavior, allowing a local user to submit a crafted eBPF program that bypasses intended safety checks. Exploitation can cause kernel memory corruption, denial of service, or escalation to root privileges.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can elevate an unprivileged local user to root, compromising system confidentiality and integrity. Kernel memory corruption can also crash the system and disrupt workloads. In containerized environments, exploitation may compromise the shared host kernel and defeat container isolation if the vulnerable BPF interface is accessible.

Mitigation

If you can’t patch tonight, do this now.

Disable unprivileged BPF by setting kernel.unprivileged_bpf_disabled=1 where supported. Restrict access to the bpf() system call for untrusted workloads, including through container seccomp policies. These measures reduce exposure but do not replace a patched kernel.

Remediation

Patch, then assume compromise.

Install the distribution vendor's kernel update addressing CVE-2017-16995 and reboot into the patched kernel. Confirm that the running kernel includes the fix; upstream version numbers alone may not reflect distribution backports. An exact fixed package version is not established by the available information.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
bpf_sign_extension_priv_esc.rbThis repository contains a single Metasploit module implementing a local privilege escalation exploit for the Linux kernel BPF sign extension vulnerability (CVE-2017-16995). The exploit targets Linux kernels from version 4.0 up to and including 4.14.11, provided BPF support is enabled and unprivileged BPF loading is permitted. The module checks for several kernel and system conditions (architecture, kernel version, BPF config, presence of LKRG/grsecurity) before attempting exploitation. The exploit works by uploading a compiled exploit binary and a Metasploit-generated payload to a writable directory (default: /tmp), executing the exploit to gain root, and then running the payload as root. The module is weaponized, allowing for arbitrary payload execution (e.g., shell, meterpreter) upon successful exploitation. The code is written in Ruby and is designed to be used within the Metasploit framework.Disclosed Nov 12, 2017 · Framework: metasploit · ruby · localWeaponizedCVE-2017-16995This repository contains a local privilege escalation exploit for CVE-2017-16995, targeting Ubuntu 16.04.4 and other Linux distributions (Debian/Ubuntu) running vulnerable kernels (4.4-4.14). The exploit leverages a flaw in the eBPF verifier, allowing a low-privileged user to gain arbitrary kernel memory read/write, ultimately overwriting their own credentials to escalate privileges to root. The repository consists of two files: a README.md (providing background, affected versions, demonstration, and mitigation steps) and exploit.c (the actual exploit code). The exploit must be compiled and executed locally on a vulnerable system. Upon success, it spawns a root shell. The README also provides mitigation advice, such as disabling unprivileged bpf(2) or upgrading the kernel.Al1ex · Disclosed Apr 26, 2018 · c · localOperationalCVE-2017-16995This repository contains two C-language local privilege escalation exploits (44298.c and 45010.c) targeting CVE-2017-16995, a vulnerability in the Linux kernel's eBPF implementation. Both exploits are designed to be compiled and run by an unprivileged user on a vulnerable system (notably Ubuntu 16.04 and Fedora 27 with specific kernel versions). The exploits work by abusing eBPF system calls to manipulate kernel memory, locate the current process's credentials structure, and overwrite the UID and GID fields to 0 (root). Upon success, they spawn a root shell (/bin/bash or /bin/sh), granting full administrative access. The README.md provides compilation and usage instructions, emphasizing that the code is for educational and testing purposes only. No network endpoints or remote attack vectors are present; exploitation requires local code execution on the target system.xxxTectationxxx · Disclosed Aug 12, 2025 · c · localOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
CanonicalUbuntu Linuxoperating_system
Debian ProjectDebian Linuxoperating_system
LinuxLinux Kerneloperating_system
FAQ

Frequently asked questions

Is CVE-2017-16995 exploited in the wild?
As of Nov 11, 2026, Mallory has no reports of CVE-2017-16995 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2017-16995?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2017-16995, the earliest disclosed Nov 12, 2017.
Is there a patch for CVE-2017-16995?
Install the distribution vendor's kernel update addressing CVE-2017-16995 and reboot into the patched kernel. Confirm that the running kernel includes the fix; upstream version numbers alone may not reflect distribution backports.
What products are affected by CVE-2017-16995?
Linux Kernel, Debian Project Debian Linux, and Canonical Ubuntu Linux.
How severe is CVE-2017-16995?
CVE-2017-16995 has a CVSS v3.1 score of 7.8 (High) and an EPSS score of 30.1% (99th percentile) as of Nov 11, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence1Every report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.