From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: David Vernet <void@manifault.com>, asmadeus@codewreck.org
Cc: linux-kernel@vger.kernel.org, ericvh@kernel.org,
lucho@ionkov.net, v9fs@lists.linux.dev, kernel-team@meta.com
Subject: Re: [PATCH] net/9p: Fix uaf / refcnt underflow for req object in virtio
Date: Mon, 22 Jul 2024 10:03:11 +0200 [thread overview]
Message-ID: <2328041.KKODgcftPW@silver> (raw)
In-Reply-To: <Zp4DSeHdOU0U1PZC@codewreck.org>
On Monday, July 22, 2024 8:59:21 AM CEST asmadeus@codewreck.org wrote:
[...]
> If the request really was cancelled we'll get the flush reply before the
> response and that'll drop the second ref in the cancelled callback,
> which would also blow up, but afaik qemu doesn't implement this so this
> code path so this was never tested.
It is implemented in QEMU 9p server according to the 9p protocol specs:
http://ericvh.github.io/9p-rfc/rfc9p2000.html#anchor28
So a Tflush request by client is immediately answered by a Rflush response and
in this case no answer is sent to the original request being flushed.
There are also QEMU test cases guarding the expected Tflush behaviour:
https://github.com/qemu/qemu/blob/a7ddb48b/tests/qtest/virtio-9p-test.c#L403
and
https://github.com/qemu/qemu/blob/a7ddb48b/tests/qtest/virtio-9p-test.c#L444
The 2nd test case handles the behaviour when the Tflush request arrived too
late, after the original request already completed successfully that is. So in
this case client first receives a success response to the original request,
then followed by Rflush response.
/Christian
next prev parent reply other threads:[~2024-07-22 8:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 16:29 [PATCH] net/9p: Fix uaf / refcnt underflow for req object in virtio David Vernet
2024-07-22 6:59 ` asmadeus
2024-07-22 8:03 ` Christian Schoenebeck [this message]
2024-07-22 9:06 ` asmadeus
2024-07-22 19:49 ` David Vernet
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=2328041.KKODgcftPW@silver \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=v9fs@lists.linux.dev \
--cc=void@manifault.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