Exploiting FreeBSD-SA-19:02.fd
https://secfault-security.com/blog/FreeBSD-SA-1902.fd.html [secfault-security.com]
2019-07-08 20:26
The advisory describes that FreeBSD 12.0 introduced a bug in this mechanism. As the file descriptor information is sent via a socket, the sender and the receiver have to allocate buffers for the procedure. If the receiving buffer is not large enough, the FreeBSD kernel attempts to close the received file descriptors to prevent a leak of these to the sender. However, while the responsible function closes the file descriptor, it fails to release the reference from the file descriptor to the file object. This could cause the reference counter to wrap.
source: L