]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r332120:
authorjtl <jtl@FreeBSD.org>
Fri, 20 Apr 2018 13:58:48 +0000 (13:58 +0000)
committerjtl <jtl@FreeBSD.org>
Fri, 20 Apr 2018 13:58:48 +0000 (13:58 +0000)
commite17863c2bbbb758ec907074d94d8ad63d188aeda
tree615165019d529da4d5278a07f7cbb1f922ded2ef
parentb466e4b36193df1ab93064f5f2755d46012911bb
MFC r332120:
  If a user closes the socket before we call tcp_usr_abort(), then
  tcp_drop() may unlock the INP.  Currently, tcp_usr_abort() does not
  check for this case, which results in a panic while trying to unlock
  the already-unlocked INP (not to mention, a use-after-free violation).

  Make tcp_usr_abort() check the return value of tcp_drop(). In the case
  where tcp_drop() returns NULL, tcp_usr_abort() can skip further steps
  to abort the connection and simply unlock the INP_INFO lock prior to
  returning.

Sponsored by: Netflix, Inc.
sys/netinet/tcp_usrreq.c