All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bartłomiej Dmitruk" <bartlomiej.dmitruk@isec.pl>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev
Subject: Re: [PATCH v2 2/2] vsock/vmci: enforce per-netns mode on the datagram receive path
Date: Sun, 20 Sep 2026 12:32:22 +0000	[thread overview]
Message-ID: <20260920123222.9DC431F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919123208.29032-2-bartlomiej.dmitruk@isec.pl>

> The send hook vmci_transport_dgram_allow() refuses datagrams when the socket's
> netns is not in global mode (vsock_net_mode_global()), but the receive path
> (vmci_transport_recv_dgram_cb() -> vmci_transport_allow_dgram()) did not, so a
> socket bound in a non-global (local) netns received datagrams from peers it
> could never send to, defeating namespace isolation.
> 
> Add the check at the start of the receive decision, before the
> VMADDR_CID_HYPERVISOR short-circuit, so the hypervisor CID is covered too
> (matching the send side).
> 
> This was found by code inspection; I do not have VMCI hardware to test on
> (compile-tested only).
> 
> Fixes: eafb64f40ca4 ("vsock: add netns to vsock core")
> Signed-off-by: Bartłomiej Dmitruk <bartlomiej.dmitruk@isec.pl>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260919123208.29032-1-bartlomiej.dmitruk@isec.pl?part=2


  reply	other threads:[~2026-09-20 12:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19 12:31 [PATCH v2 1/2] vsock/vmci: make the cached_peer dgram decision race-safe Bartłomiej Dmitruk
2026-09-19 12:31 ` [PATCH v2 2/2] vsock/vmci: enforce per-netns mode on the datagram receive path Bartłomiej Dmitruk
2026-09-20 12:32   ` sashiko-bot [this message]
2026-09-22 12:49   ` Stefano Garzarella
2026-09-22 17:54   ` Vishnu Dasa
2026-09-23 12:56   ` netdev-bot+sashiko
2026-09-20 12:32 ` [PATCH v2 1/2] vsock/vmci: make the cached_peer dgram decision race-safe sashiko-bot
2026-09-22 12:47 ` Stefano Garzarella
2026-09-23 12:56 ` netdev-bot+sashiko

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=20260920123222.9DC431F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bartlomiej.dmitruk@isec.pl \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /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.