]> git.baikalelectronics.ru Git - kernel.git/commit
tcp/dccp: fix potential NULL deref in __inet_inherit_port()
authorEric Dumazet <edumazet@google.com>
Wed, 14 Oct 2015 12:58:38 +0000 (05:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Oct 2015 02:06:31 +0000 (19:06 -0700)
commitf796ac65e245be2adbda01dd2794f9c96d8b1624
tree1c6ceda4dc9a0e2c0287ceae9d3e96159894cc16
parentd1126091a3a0c8a450200fbaabba83111f0e010e
tcp/dccp: fix potential NULL deref in __inet_inherit_port()

As we no longer hold listener lock in fast path, it is possible that a
child is created right after listener freed its bound port, if a close()
is done while incoming packets are processed.

__inet_inherit_port() must detect this and return an error,
so that caller can free the child earlier.

Fixes: d3095cf46591 ("tcp: do not lock listener to process SYN packets")
Fixes: abe93be0399c ("tcp/dccp: install syn_recv requests into ehash table")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_hashtables.c