Files
Linux/drivers/vhost
Jason Wang b8f1f65882 vhost_net: validate sock before trying to put its fd
Sock will be NULL if we pass -1 to vhost_net_set_backend(), but when
we meet errors during ubuf allocation, the code does not check for
NULL before calling sockfd_put(), this will lead NULL
dereferencing. Fixing by checking sock pointer before.

Fixes: bab632d69e ("vhost: vhost TX zero-copy support")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2018-06-23 10:23:49 +09:00
..
2017-02-11 20:59:41 -05:00
2016-08-02 16:54:28 +03:00
2018-06-12 16:19:22 -07:00
2018-06-12 16:19:22 -07:00