This is a note to let you know that I've just added the patch titled

    vsock/vmci: Clear the vmci transport packet properly when initializing it

to the 6.15-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     
vsock-vmci-clear-the-vmci-transport-packet-properly-when-initializing-it.patch
and it can be found in the queue-6.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 223e2288f4b8c262a864e2c03964ffac91744cd5 Mon Sep 17 00:00:00 2001
From: HarshaVardhana S A <[email protected]>
Date: Tue, 1 Jul 2025 14:22:54 +0200
Subject: vsock/vmci: Clear the vmci transport packet properly when initializing 
it

From: HarshaVardhana S A <[email protected]>

commit 223e2288f4b8c262a864e2c03964ffac91744cd5 upstream.

In vmci_transport_packet_init memset the vmci_transport_packet before
populating the fields to avoid any uninitialised data being left in the
structure.

Cc: Bryan Tan <[email protected]>
Cc: Vishnu Dasa <[email protected]>
Cc: Broadcom internal kernel review list
Cc: Stefano Garzarella <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Paolo Abeni <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: stable <[email protected]>
Signed-off-by: HarshaVardhana S A <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
Acked-by: Stefano Garzarella <[email protected]>
Link: 
https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/vmw_vsock/vmci_transport.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -119,6 +119,8 @@ vmci_transport_packet_init(struct vmci_t
                           u16 proto,
                           struct vmci_handle handle)
 {
+       memset(pkt, 0, sizeof(*pkt));
+
        /* We register the stream control handler as an any cid handle so we
         * must always send from a source address of VMADDR_CID_ANY
         */
@@ -131,8 +133,6 @@ vmci_transport_packet_init(struct vmci_t
        pkt->type = type;
        pkt->src_port = src->svm_port;
        pkt->dst_port = dst->svm_port;
-       memset(&pkt->proto, 0, sizeof(pkt->proto));
-       memset(&pkt->_reserved2, 0, sizeof(pkt->_reserved2));
 
        switch (pkt->type) {
        case VMCI_TRANSPORT_PACKET_TYPE_INVALID:


Patches currently in stable-queue which might be from 
[email protected] are

queue-6.15/vsock-vmci-clear-the-vmci-transport-packet-properly-when-initializing-it.patch

Reply via email to