In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat’s execution, leading to a NULL pointer dereference and system crash.
git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6d8c50dcb029872b298eea68cc6209c866fd3e14
www.securityfocus.com/bid/104453
access.redhat.com/errata/RHSA-2018:2948
github.com/torvalds/linux/commit/6d8c50dcb029872b298eea68cc6209c866fd3e14
lkml.org/lkml/2018/6/5/14
patchwork.ozlabs.org/patch/926519/
usn.ubuntu.com/3752-1/
usn.ubuntu.com/3752-2/
usn.ubuntu.com/3752-3/