Race condition in net/packet/afpacket.c in the Linux kernel through 4.8.12 allows local users to gain privileges or cause a denial of service (use-after-free) by leveraging the CAPNETRAW capability to change a socket version, related to the packetsetring and packetsetsockopt functions.