SecPod

Learn Search

Search across all Learn content

← Back to Security Research
CVE-2016-0728 – Linux Kernel Flaw

CVE-2016-0728 – Linux Kernel Flaw

CVE-2016-0728 is the latest zero-day flaw in the Linux kernel which affects millions of users across the world. The Linux Kernel vulnerability is there for several years and discovered only recently. This flaw exists in all the Linux kernel versions 3.8 and later. CVE-2016-0728 is basically a memory...

Feb 2, 2016By Shakeel Bhat3 min read

CVE-2016-0728 is the latest zero-day flaw in the Linux kernel which affects millions of users across the world. The Linux Kernel vulnerability is there for several years and discovered only recently. This flaw exists in all the Linux kernel versions 3.8 and later. CVE-2016-0728 is basically a memory-leak vulnerability, where the flaw exists within the Linux’s security features-keyrings facility. A reference leak in the keyrings facility causes CVE-2016-0728. An attacker can exploit the vulnerability by running a malicious Linux application on the affected device. If successfully exploited, the vulnerability can allow attackers to get root access to the operating system, enabling them to do anything that a root user is allowed to do. Hence, it is essential to have a vulnerability management software.

linux kernel vulnerability exists actually due to an error in the “join_session_keyring” function within process_keys.c script of kernel code. However, below is a buggy code snippet taken from process_keys.c script for vulnerable Linux Kernel 3.18.x (3.18.25) found here. A patch management tool remediates this vulnerability.

linux-kernel-vulnerability-code-snippet
linux-kernel-vulnerability-code-snippet

Upon analyzing above code it is clear if a thread tries to set its current session keyring with the same one already set, the control passes over to error2 label. But there is no way that the reference for the keyring  discarded in this case and resulting in reference leak error. However, below code explains the scenario.
The above mentioned execution does not have a call to key_put() function so as to discard the reference for the keyring resulting in memory leak. Moreover, this memory leak error can carefully craft to create a fully-working exploit escalating users priveleges. The sequence of steps which exploit would need to do include:

1) Get hold of reference to key object.
2) Somehow overflow internal RefCount in usage field.
3) Free keyring object and hold a reference to it.
4) Allocating and controlling the kernel object that will override the freed keyring object.
5) Using the reference to the old key object and trigger code execution.

A fully Working exploit is here which successfully escalates privileges from a local user to root.

Check for Vulnerable Kernel:

The memory leak vulnerability in CVE-2016-0728 occurs when a thread replaces its current session keyring with the keyring that has been set as its session keyring. A simple program to test for this vulnerability is here.
The program simply tries to set 100 times the same keyring name that already exists to trigger the memory leak. If the program successfully creates references for the same keyring name, the running kernel is vulnerable.

Steps to Check include:
1) Compile provided test C-Code.
2) Check the keys before running the test script, by checking the contents of file /proc/keys that list all the currently viewable keys.
3) Run the created test-executable.
4) Check the contents of /proc/keys once again.
5) If 100 references for leaked-keyring are present, like the one shown below, Kernel is vulnerable.

Download SecPod Saner now and keep your systems updated and secure.

Featured Posts

Open GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation
GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

CVE Research

GT13 Campaign Targets 22 Organizations Through Check Point Security Management Server Exploitation

The GT13 campaign targeted at least 22 organizations worldwide by exploiting vulnerabilities in exposed services and Check Point Security Management Servers. The attackers used forged authentication sessions, SSH-based persistence, internal reconnaissance, lateral movement, and data exfiltration techniques to compromise systems and access sensitive information.

Nov 26, 2026

Open GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution
vulnerability researchGeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

CVE Research

GeoServer Flaws Under Attack: Inside the Exploit Chain to Remote Code Execution

Six vulnerabilities in GeoServer’s November 2026 security update can expose sensitive files, bypass service authorization, and enable administrator impersonation. Several of these flaws can be chained for unauthenticated remote code execution with the permissions of the GeoServer process. CVE-2026-120705 and CVE-2026-129243 have been reported as exploited. Fixed releases include GeoServer 3.0.2, 2.28.6, and 2.27.7. This article covers the flaws, the public five-CVE chain, impact, affected versions, and remediation guidance.

Nov 26, 2026

Open Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026
Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

CVE Research

Critical Security Flaws in Microsoft Office, Erlang/OTP and Mozilla Thunderbird: November 25, 2026

Critical security flaws disclosed in November 2026 affect Microsoft Office, Erlang/OTP, and Mozilla Thunderbird. Explore CVE-2026-112732, CVE-2026-124286, and CVE-2026-136226, including remote code execution, TLS server impersonation, email spoofing risks, affected versions, and fixes.

Nov 25, 2026

Open Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws
vulnerability researchCritical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

CVE Research

Critical Vulnerabilities, November 23, 2026: Ruby2Shell in GitLab CE/EE and Seven rclone Flaws

Nov 24, 2026