Thread (2 messages) flat view 2 messages, 2 authors, 2018-06-23

Re: [PATCH net] vhost_net: validate sock before trying to put its fd

From: David Miller <davem@davemloft.net>
Date: 2018-06-23 01:24:46
Also in: kvm, lkml, virtualization

From: Jason Wang <redacted>
Date: Thu, 21 Jun 2018 13:11:31 +0800
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: bab632d69ee4 ("vhost: vhost TX zero-copy support")
Reported-by: Dan Carpenter <redacted>
Signed-off-by: Jason Wang <redacted>
Applied and queued up for -stable, thanks Jason.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help