Commit f6f89127 authored by Norbert Slusarek's avatar Norbert Slusarek Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: net/vmw_vsock: fix NULL pointer dereference



In vsock_stream_connect(), a thread will enter schedule_timeout().
While being scheduled out, another thread can enter vsock_stream_connect()
as well and set vsk->transport to NULL. In case a signal was sent, the
first thread can leave schedule_timeout() and vsock_transport_cancel_pkt()
will be called right after. Inside vsock_transport_cancel_pkt(), a null
dereference will happen on transport->cancel_pkt.

Fixes: c0cfa2d8 ("vsock: add multi-transports support")
Signed-off-by: default avatarNorbert Slusarek <nslusarek@gmx.net>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/trinity-c2d6cede-bfb1-44e2-85af-1fbc7f541715-1612535117028@3c-app-gmx-bap12


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 5d1cbcc9)
Bug: 187129171
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
Change-Id: Idc7bc73ad1edbfea80806689cd6cc030966115c6
parent 8a819d0a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment