Exploit database

Vulnerability

CVE-2016-4557

Vulnerability details

Score
7.8
Severity
high

CVSS 3.1 · NVD

Vector string

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Description

The replace_map_fd_with_map_ptr function in kernel/bpf/verifier.c in the Linux kernel before 4.5.5 does not properly maintain an fd data structure, which allows local users to gain privileges or cause a denial of service (use-after-free) via crafted BPF instructions that reference an incorrect file descriptor.

CVE Program

Exploit source choices

3 sources
Linux BPF doubleput UAF Privilege Escalation
MSF-linux--local--bpf_priv_escMetasploitLinux / remote

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. Note, this module will overwrite the first few lines of `/etc/crontab` with a new cron job. The job will need to be manually removed. This module has been tested successfully on Ubuntu 16.04 (x64) kernel 4.4.0-21-generic (default kernel).

2016-05-04bpf_priv_esc.rb