CVE-2016-4557: Use After Free

Published May 9, 2016
·
Updated

A use after free vulnerability was found in kernel which allows privilege escalation for users with a local account on the system. When a program was loaded with a bpf program an attacker could exploit this to gain root privileges by an unprivileged user.

When bpf(BPFPROGLOAD, ...) was invoked with a BPF program whose bytecode references a non-map file descriptor as a map file descriptor, the error handling code called fdput() twice instead of once (in bpfmapget() and in replacemapfdwithmapptr()). If the file descriptor table of the current task is shared, this causes fcount to be decremented too much, allowing the struct file to be freed while it is still in use (use-after-free).

Bug was introduced in 0246e64d9a5f and is exploitable since 1be7f75d1668 without the need for CAPSYSADMIN capability.

Upstream patch:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7

Original report:

https://bugs.chromium.org/p/project-zero/issues/detail?id=808

CVE request:

http://seclists.org/oss-sec/2016/q2/263

Other sources

The replacemapfdwithmapptr 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.

Launchpad

Affected Software

3 affected componentsFixes available
Linux Linux kernel>=4.4<4.4.11
Linux Linux kernel>=4.5<4.5.5
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Event History

May 9, 2016
Data Sourced
via Red Hat·11:20 AM
DescriptionSeverityAffected Software
May 23, 2016
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
Description
Jan 11, 2024
Data Sourced
via Launchpad·10:19 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·01:14 AM
RemedyDescriptionSeverityAffected Software
Apr 16, 2025
Data Sourced
via Debian·03:30 AM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2016-4557?

CVE-2016-4557 is a vulnerability in the Linux kernel that allows local users to gain privileges or cause a denial of service.

2

How severe is CVE-2016-4557?

CVE-2016-4557 has a severity value of 7, which is considered high.

3

How can I fix CVE-2016-4557?

To fix CVE-2016-4557, update your Linux kernel to version 4.6 or higher.

4

Where can I find more information about CVE-2016-4557?

You can find more information about CVE-2016-4557 at the following references: [Link 1](http://www.openwall.com/lists/oss-security/2016/05/06/4), [Link 2](https://bugs.chromium.org/p/project-zero/issues/detail?id=808), [Link 3](http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8358b02bf67d3a5d8a825070e1aa73f25fb2e4c7).

5

What is the Common Weakness Enumeration (CWE) for CVE-2016-4557?

The Common Weakness Enumeration (CWE) for CVE-2016-4557 is CWE-416 (Use After Free).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203