Jesse Gross 12069401d8 geneve: Fix races between socket add and release.
Currently, searching for a socket to add a reference to is not
synchronized with deletion of sockets. This can result in use
after free if there is another operation that is removing a
socket at the same time. Solving this requires both holding the
appropriate lock and checking the refcount to ensure that it
has not already hit zero.

Inspired by a related (but not exactly the same) issue in the
VXLAN driver.

Fixes: 0b5e8b8e ("net: Add Geneve tunneling protocol driver")
CC: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-18 12:38:13 -05:00
..
2014-10-15 10:25:04 +10:30
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-12-07 21:22:05 +01:00
2014-11-24 04:28:51 -05:00
2014-12-14 16:10:09 -08:00
2014-11-24 04:28:48 -05:00
2014-11-05 23:52:33 -08:00
2014-10-09 01:40:05 -04:00
2014-11-24 04:28:48 -05:00
2014-11-24 04:28:48 -05:00
2014-12-14 16:10:09 -08:00
2014-11-24 04:28:48 -05:00
2014-12-10 15:13:13 -08:00
2014-12-09 16:29:03 -05:00
2014-12-09 16:29:03 -05:00
2014-10-07 20:28:44 -04:00
2014-11-24 04:28:48 -05:00
2014-12-09 16:29:03 -05:00
2014-12-09 16:29:03 -05:00