KernelScan.io

CRITICAL Introduced in 2.6.33

net Recvmmsg UAF

CVE-2016-7117

CVSS 9.8 / 10.0 NVD

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

KernelScan AI9.8CRITICAL

01

Use-after-free vulnerability in the __sys_recvmmsg function in net/socket.c in the Linux kernel before 4.5.2 allows remote attackers to execute arbitrary code via vectors involving a recvmmsg system call that is mishandled during error processing.

02

Engine v0.6.0

Risk summary

A vulnerable kernel can suffer a use-after-free while processing a multi-message socket receive that ends in an error, potentially causing a denial of service or kernel-level code execution. A remote peer can trigger the condition against an affected network-facing socket when another process is using the batch receive operation.

Affectednet/socket.c (net core)

Vulnerability analysis

During a batch receive, the original code could receive one or more messages and then encounter an error. It could release the socket's last reference before recording that pending error, causing the remaining error handling to access freed kernel memory and potentially crash the kernel or execute code. The fix keeps the socket alive until error handling is complete and only then releases it. A remote peer with connectivity to a socket being processed by the batch receive operation can trigger the sequence without special privileges or special hardware, provided a receiving process is actively using the normal socket operation.

03

BranchIntroducedFixed inPatch commit
3.102.6.333.10.1028ba9ba1ab9b1
4.52.6.334.5.2—
5.102.6.335.10.1811b33bdd76635
5.152.6.335.15.113159a81d5e5a9
5.42.6.335.4.2441747aa98ab13
6.12.6.336.1.30bd0f360ee864
mainline2.6.334.6-rc134b88a68f26a
cip/4.42.6.334.4.42-cip1405f10a39443
cip/4.4-rt2.6.334.4.75-cip6-rt1405f10a39443

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/4.4Fixed in 4.4.42-cip1
cip/4.4-rtFixed in 4.4.75-cip6-rt1