From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, Hyunwoo Kim <v4bel@theori.io>,
Stefano Garzarella <sgarzare@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 6.12 1/3] hv_sock: Initializing vsk->trans to NULL to prevent a dangling pointer
Date: Wed, 20 Nov 2024 13:55:55 +0100 [thread overview]
Message-ID: <20241120124100.479662012@linuxfoundation.org> (raw)
In-Reply-To: <20241120124100.444648273@linuxfoundation.org>
6.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hyunwoo Kim <v4bel@theori.io>
commit e629295bd60abf4da1db85b82819ca6a4f6c1e79 upstream.
When hvs is released, there is a possibility that vsk->trans may not
be initialized to NULL, which could lead to a dangling pointer.
This issue is resolved by initializing vsk->trans to NULL.
Signed-off-by: Hyunwoo Kim <v4bel@theori.io>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/Zys4hCj61V+mQfX2@v4bel-B760M-AORUS-ELITE-AX
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/vmw_vsock/hyperv_transport.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/vmw_vsock/hyperv_transport.c
+++ b/net/vmw_vsock/hyperv_transport.c
@@ -549,6 +549,7 @@ static void hvs_destruct(struct vsock_so
vmbus_hvsock_device_unregister(chan);
kfree(hvs);
+ vsk->trans = NULL;
}
static int hvs_dgram_bind(struct vsock_sock *vsk, struct sockaddr_vm *addr)
next prev parent reply other threads:[~2024-11-20 12:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 12:55 [PATCH 6.12 0/3] 6.12.1-rc1 review Greg Kroah-Hartman
2024-11-20 12:55 ` Greg Kroah-Hartman [this message]
2024-11-20 12:55 ` [PATCH 6.12 2/3] media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format Greg Kroah-Hartman
2024-11-20 12:55 ` [PATCH 6.12 3/3] mm/mmap: fix __mmap_region() error handling in rare merge failure case Greg Kroah-Hartman
2024-11-20 15:13 ` [PATCH 6.12 0/3] 6.12.1-rc1 review Mark Brown
2024-11-20 18:14 ` SeongJae Park
2024-11-20 19:32 ` Florian Fainelli
2024-11-20 23:19 ` Shuah Khan
2024-11-21 4:07 ` Ron Economos
2024-11-21 4:10 ` Takeshi Ogasawara
2024-11-21 11:56 ` Naresh Kamboju
2024-11-21 14:08 ` Christian Heusel
2024-11-22 6:48 ` Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241120124100.479662012@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=patches@lists.linux.dev \
--cc=sgarzare@redhat.com \
--cc=stable@vger.kernel.org \
--cc=v4bel@theori.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.