In FreeBSD 11.2-STABLE after r338618 and before r343786, 12.0-STABLE before r343781, and 12.0-RELEASE before 12.0-RELEASE-p3, a bug in the reference count implementation for UNIX domain sockets can cause a file structure to be incorrectly released potentially allowing a malicious local user to gain root privileges or escape from a jail.
https://security.FreeBSD.org/advisories/FreeBSD-SA-19:02.fd.asc
http://packetstormsecurity.com/files/155790/FreeBSD-fd-Privilege-Escalation.html