Skip to content
Snippets Groups Projects
Commit 1530d11f authored by Hyunwoo Kim's avatar Hyunwoo Kim Committed by Lee Jones
Browse files

UPSTREAM: vsock/virtio: Initialization of the dangling pointer occurring in vsk->trans


commit 6ca57537 upstream.

During loopback communication, a dangling pointer can be created in
vsk->trans, potentially leading to a Use-After-Free condition.  This
issue is resolved by initializing vsk->trans to NULL.

Bug: 378870958
Cc: stable <stable@kernel.org>
Fixes: 06a8fc78 ("VSOCK: Introduce virtio_vsock_common.ko")
Signed-off-by: default avatarHyunwoo Kim <v4bel@theori.io>
Signed-off-by: default avatarWongi Lee <qwerty@theori.io>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Message-Id: <2024102245-strive-crib-c8d3@gregkh>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b110196f)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: I5eb7b5ccf7f0d96644cc4313548c0114e8836149
parent 7d7b7d02
No related branches found
No related tags found
No related merge requests found
......@@ -691,6 +691,7 @@ void virtio_transport_destruct(struct vsock_sock *vsk)
struct virtio_vsock_sock *vvs = vsk->trans;
kfree(vvs);
vsk->trans = NULL;
}
EXPORT_SYMBOL_GPL(virtio_transport_destruct);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment