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-09-18 10:54:36 +02:00
2014-11-06 15:11:10 -05:00
2014-11-26 12:25:44 -05:00
2013-12-29 16:34:25 -05:00
2013-10-08 23:19:24 -04:00
2014-05-12 14:03:41 -04:00
2014-12-09 16:29:03 -05:00
2014-02-19 11:41:25 +01:00
2014-12-09 16:29:03 -05:00
2014-12-09 16:29:03 -05:00
2014-09-01 18:12:45 -07:00
2014-11-04 15:09:52 -05:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-11-05 23:52:33 -08:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-11-05 23:52:33 -08:00
2014-05-23 16:28:53 -04:00
2013-05-31 17:19:05 -07:00