From: Daehyeon Ko <4ncienth@gmail.com>
To: Bobby Eshleman <bobbyeshleman@gmail.com>
Cc: netdev@vger.kernel.org, Stefan Hajnoczi <stefanha@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
virtualization@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH net] vsock/virtio: validate packet source for connected sockets
Date: Wed, 19 Aug 2026 03:37:47 +0900 [thread overview]
Message-ID: <20260818183747.3382905-1-4ncienth@gmail.com> (raw)
In-Reply-To: <aoNLVoPQssG1V6bt@devvm29614.prn0.facebook.com>
On Mon, Aug 17, 2026 at 10:56:38AM -0700, Bobby Eshleman wrote:
> Does this equality work for loopback, when the CID may be
> VMADDR_CID_LOCAL and/or VMADDR_CID_HOST on host or the guest CID in
> guest?
Not in all cases. I tested VMADDR_CID_HOST with no guest-to-host transport,
where it is routed over loopback but packets carry VMADDR_CID_LOCAL as their
source. The unpatched kernel transferred data in 3/3 runs, while v1 timed out
in 3/3 runs.
The v2 candidate requires the source port to match the socket's remote port
and accepts VMADDR_CID_LOCAL as the canonical source CID for loopback. It
preserved the CID_LOCAL, CID_HOST, and guest-CID loopback cases in my tests,
while the original cross-UID injection remained blocked. The selected VSOCK
selftests also passed with no KASAN report.
Stefano, to clarify the original description: the victim socket received the
exact 16 attacker-chosen bytes; the intended peer-side socket received none.
I will use your clearer description and keep the comment minimal in v2.
I also confirmed the analogous VMCI destination-only fallback. With two VMCI
contexts, an RST from a mismatched context reset another context's pending
connection in 3/3 runs. VMCI also has a notification fast path before the
workqueue handler, so I will address it separately with validation in both
paths. Hyper-V does not appear to share this packet lookup path.
I will post the virtio v2 as a separate thread.
Thanks,
Daehyeon
prev parent reply other threads:[~2026-08-18 18:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 12:12 [PATCH net] vsock/virtio: validate packet source for connected sockets Daehyeon Ko
2026-08-14 12:23 ` Stefano Garzarella
2026-08-17 17:56 ` Bobby Eshleman
2026-08-18 18:37 ` Daehyeon Ko [this message]
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=20260818183747.3382905-1-4ncienth@gmail.com \
--to=4ncienth@gmail.com \
--cc=bobbyeshleman@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox