Linux kernel: CVE-2017-7308: a signedness issue in AF_PACKET sockets
A signedness issue in the Linux kernel's AF_PACKET socket implementation allowed an unprivileged local process to gain kernel code execution and escalate to root. The kernel had to be built with CONFIG_PACKET, which many distributions enable by default.
- Fixed in 12 days
- Disclosed after 12 days
Hi!
CVE-2017-7308 is a vulnerability I found in the Linux kernel caused by a signedness issue in AF_PACKET sockets. It can be exploited to gain kernel code execution from an unprivileged process. The kernel has to be built with CONFIG_PACKET for the vulnerability to be present. A lot of modern distributions enable this option by default.
I initially reported this vulnerability to [email protected] following the coordinated disclosure process. As advised by them I've developed a fix for this vulnerability and sent it upstream. The fix was committed on Mar 30, 2017.
I wrote a proof-of-concept exploit for the 4.8.0-41-generic Ubuntu kernel which gains root from an unprivileged user, which can be found here. More details about the vulnerability and exploitation can be found here.
The reason I'm reporting this now is that a similar bug that I've reported a while ago has recently been triaged and addressed, so it seems that LPE Linux kernel bugs are within the scope of this IBB program.
Thanks!
Impact
This vulnerability allows a local attacker to elevate privileges to root on a machine with vulnerable Linux kernel version.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a signedness error in the AF_PACKET socket code that leads to memory corruption.
Impact
This vulnerability allows a local attacker to elevate privileges to root on a machine with vulnerable Linux kernel version.
What the attacker needed
Local access to the system; kernel built with CONFIG_PACKET
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The Linux kernel is the core of the operating system. A signedness issue means a number that should be treated as unsigned (only positive) is treated as signed (can be negative), which can cause memory corruption. An unprivileged user could exploit this to run code with the highest privileges (root).
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.