From: Daehyeon Ko <4ncienth@gmail.com>
To: netdev@vger.kernel.org
Cc: sgarzare@redhat.com, stefanha@redhat.com,
bobbyeshleman@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, mst@redhat.com, jasowangio@gmail.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
bryan-bt.tan@broadcom.com, vishnu.dasa@broadcom.com,
bcm-kernel-feedback-list@broadcom.com,
virtualization@lists.linux.dev, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net v3 0/2] vsock: validate packet sources after bound lookup fallback
Date: Mon, 24 Aug 2026 02:58:56 +0900 [thread overview]
Message-ID: <20260823175858.351431-1-4ncienth@gmail.com> (raw)
Both virtio and VMCI look up connected sockets by the full tuple before
falling back to a destination-only bound lookup. The fallback can select a
non-listening socket without validating the packet source.
V2 covered only the virtio path. Following Stefano's review, this series
moves the source and transport validation into a documented AF_VSOCK helper
and uses it for both virtio and VMCI. The VMCI patch checks both its
bottom-half and deferred workqueue receive paths.
The combined series was tested on x86_64 KASAN kernels. The original
cross-UID virtio injection remained blocked in three boots, CID_LOCAL and
CID_HOST loopback aliases passed, selected VSOCK selftests passed, and VMCI
accepted a matched RST while rejecting a mismatched-context RST in three
boots. All changed objects built without warnings under allmodconfig and
allyesconfig with W=1.
The current-tree guest-CID vhost probe could not be rerun because the test
user lacks access to /dev/vhost-vsock.
Changes in v3:
- Move transport and source validation into vsock_check_source().
- Trust the internally generated source CID for the local transport.
- Add VMCI validation in the bottom-half and workqueue receive paths.
- Send the related virtio and VMCI fixes in one series.
- Do not carry Bobby's v2 Reviewed-by because the helper and loopback logic
changed; renewed review is requested.
v2: https://lore.kernel.org/netdev/20260820001517.2148196-1-4ncienth@gmail.com/
v1: https://lore.kernel.org/netdev/20260813121236.2328599-1-4ncienth@gmail.com/
Daehyeon Ko (2):
vsock/virtio: validate packet source for connected sockets
vsock/vmci: validate packet source for connected sockets
include/net/af_vsock.h | 3 +++
net/vmw_vsock/af_vsock.c | 32 +++++++++++++++++++++++++
net/vmw_vsock/virtio_transport_common.c | 3 ++-
net/vmw_vsock/vmci_transport.c | 29 +++++++++++++++++-----
4 files changed, 60 insertions(+), 7 deletions(-)
base-commit: 7cbfb180945ce529608e4d4e24a6d483699fab1e
--
2.54.0
next reply other threads:[~2026-08-23 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 17:58 Daehyeon Ko [this message]
2026-08-23 17:58 ` [PATCH net v3 1/2] vsock/virtio: validate packet source for connected sockets Daehyeon Ko
2026-08-25 22:32 ` Bobby Eshleman
2026-08-23 17:58 ` [PATCH net v3 2/2] vsock/vmci: " Daehyeon Ko
2026-08-24 17:59 ` sashiko-bot
2026-08-25 9:19 ` Paolo Abeni
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=20260823175858.351431-1-4ncienth@gmail.com \
--to=4ncienth@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bobbyeshleman@gmail.com \
--cc=bryan-bt.tan@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=horms@kernel.org \
--cc=jasowangio@gmail.com \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=vishnu.dasa@broadcom.com \
--cc=xuanzhuo@linux.alibaba.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox