Vulnerability & Exploit Database

Back to search

Linux BPF doubleput UAF Privilege Escalation

Linux kernel 4.4 < 4.5.5 extended Berkeley Packet Filter (eBPF) does not properly reference count file descriptors, resulting in a use-after-free, which can be abused to escalate privileges. The target system must be compiled with `CONFIG_BPF_SYSCALL` and must not have `kernel.unprivileged_bpf_disabled` set to 1. This module has been tested successfully on: Ubuntu 16.04 (x64) kernel 4.4.0-21-generic (default kernel); Ubuntu 16.04 (x64) kernel 4.4.0-38-generic; Ubuntu 16.04 (x64) kernel 4.4.0-42-generic; Ubuntu 16.04 (x64) kernel 4.4.0-98-generic; Ubuntu 16.04 (x64) kernel 4.4.0-140-generic.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name

exploit/linux/local/bpf_priv_esc

Authors

  • jannh <jannh [at] google.com>
  • h00die <mike [at] shorebreaksecurity.com>

References

Targets

  • Linux x86
  • Linux x64

Platforms

  • linux

Architectures

  • x86
  • x64
  • x86
  • x64

Reliability

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/bpf_priv_esc msf exploit(bpf_priv_esc) > show targets ...targets... msf exploit(bpf_priv_esc) > set TARGET <target-id> msf exploit(bpf_priv_esc) > show options ...show and set options... msf exploit(bpf_priv_esc) > exploit