In the Linux kernel, the following vulnerability has been resolved:
sockmap: fix a NULL pointer dereference in sockmaplinkupdate_prog()
The following race condition could trigger a NULL pointer dereference:
sockmaplinkdetach(): sockmaplinkupdateprog(): mutexlock(&sockmapmutex); ... sockmaplink->map = NULL; mutexunlock(&sockmapmutex); mutexlock(&sockmapmutex); ... sockmapproglinklookup(sockmaplink->map); mutexunlock(&sockmap_mutex); <continue>
Fix it by adding a NULL pointer check. In this specific case, it makes no sense to update a link which is being released.