]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Since r353292 on input path we are always in network epoch, when
authorglebius <glebius@FreeBSD.org>
Thu, 7 Nov 2019 20:49:56 +0000 (20:49 +0000)
committerglebius <glebius@FreeBSD.org>
Thu, 7 Nov 2019 20:49:56 +0000 (20:49 +0000)
commit76a6e088e65643061c6c0b84b7be00fe2b5c4e73
treea120f299ee87b33cfc66f22c5ea7673344495cc3
parentd7a93f36238081b988c2ee0337eb5edcb4c54514
Since r353292 on input path we are always in network epoch, when
we lookup PCBs.  Thus, do not enter epoch recursively in
in_pcblookup_hash() and in6_pcblookup_hash().  Same applies to
tcp_ctlinput() and tcp6_ctlinput().

This leaves several sysctl(9) handlers that return PCB credentials
unprotected.  Add epoch enter/exit to all of them.

Differential Revision: https://reviews.freebsd.org/D22197
sys/netinet/in_pcb.c
sys/netinet/tcp_subr.c
sys/netinet/udp_usrreq.c
sys/netinet6/in6_pcb.c
sys/netinet6/udp6_usrreq.c